Page MenuHomePhabricator

Update gradle wrapper and fix dependencies. Fixes T331.
Needs ReviewPublic

Authored by Hackintosh5 on Feb 28 2019, 2:22 PM.

Details

Summary

Update gradle wrapper and fix dependencies.

Test Plan

Unit tests and see if it intergrates correctly with a kotlin project

Diff Detail

Repository
rLIBWFJVA WildFyre Java Libary
Branch
arcpatch-D223
Lint
Lint OK
Unit
Unit Tests OK
Build Status
Buildable 657
Build 657: arc lint + arc unit

Event Timeline

Hackintosh5 created this revision.Feb 28 2019, 2:22 PM
Harbormaster completed remote builds in B584: Diff 793.

I don't understand what you're trying to do with the resource handling.

src/test/java/net/wildfyre/http/RequestTest.kt
38

Why?

114

Why?

127

Why?

149

Why?

Harbormaster completed remote builds in B585: Diff 794.
Hackintosh5 added inline comments.Feb 28 2019, 2:57 PM
src/test/java/net/wildfyre/http/RequestTest.kt
38

SpotBugs is the new version of FindBugs and it gets angry otherwise.

114

See above. FindBugs says that its a security risk because it allows access to files via an object (idk why its dangerous but it says that)

127

See above

149

See above

Hackintosh5 added inline comments.Feb 28 2019, 3:01 PM
src/main/java/net/wildfyre/http/IssueInTransferException.kt
87–88

Again, spotbugs doesnt like the redundant !! (the whole line is in a json != null)

Hackintosh5 added inline comments.Feb 28 2019, 3:10 PM
src/main/java/net/wildfyre/http/IssueInTransferException.kt
87–88

I don't know why arc let me push this, it doesnt compile...

CLOVIS added inline comments.Feb 28 2019, 3:13 PM
src/main/java/net/wildfyre/http/IssueInTransferException.kt
87–88

Isn't json a bar? If so, this shouldn't compile

src/test/java/net/wildfyre/http/RequestTest.kt
114

The way it was before because there is no redundancy of the paths. Also, it is cleaner.

Sometimes, tools cannot know what is better. There are not here so we follow them blindly, but so they help find errors.

Hackintosh5 added inline comments.Feb 28 2019, 3:16 PM
src/main/java/net/wildfyre/http/IssueInTransferException.kt
87–88

I dont even know any more. I'm going to rewrite that bit with easier to ask for forgiveness than permission, because thats the only way that the kotlin compiler, you, and spotbugs can all be happy at the same time.

Harbormaster completed remote builds in B587: Diff 796.
Hackintosh5 updated this revision to Diff 798.Feb 28 2019, 4:58 PM
  • Make SpotBugs sad :(
  • Make SpotBugs ignore security errors in the RequestTest
Harbormaster completed remote builds in B589: Diff 798.
Hackintosh5 marked 6 inline comments as done.Feb 28 2019, 5:02 PM

Made spotbugs ignore these security errors in the tests. In IssueWithTransferException, it is absolutely correct, that could *in some extreme cases where someone is abusing the API*, cause a crash.

CLOVIS added inline comments.Mar 20 2019, 10:45 AM
src/main/java/net/wildfyre/http/IssueInTransferException.kt
91

This looks like programming by exception, which is not really a good practice

Maybe something like this could work better?

return json?.let {
  "${super.message}\n${it.toString(WriterConfig.PRETTY_PRINT)}"
} ?: super.message
WyldBot requested changes to this revision.Wed, Mar 27, 3:35 PM
This revision now requires changes to proceed.Wed, Mar 27, 3:35 PM
Hackintosh5 updated this revision to Diff 891.Thu, Apr 25, 12:47 PM

Remove programming by exception

Harbormaster completed remote builds in B657: Diff 891.