Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to jdk9 and latest dependency versions #120

Merged
merged 12 commits into from
Apr 11, 2018
Merged

Conversation

avandeursen
Copy link
Member

@avandeursen avandeursen commented Apr 9, 2018

  • Update dependencies to their latest versions
  • Adjust checkstyle/pmd configurations conform latest versions
  • Deprecate findbugs in favor of spotbugs
  • Add jdk8 and jdk9 profies to handle plugins not yet ready for jdk9 (checker framework)
  • Enforce maven 3.1.1

Fixes #119.

Java8:
- enable checker framework checks

Java9:
- disable checker framework checks
- configure cucumber to avoid certain warnings
To do: See if other categories containing meaningful rules.
Then remove commented out obsolete rule sets.
Warnings can be suppressed through comments or annotations.

Simplify configuration by allowing annotations only
(which are also clearer, as they come with a reason).

Change to this configuration needed anyway the comment filters
were moved in checkstyle 8.6.
Enforce maven 3.1.1 as needed by the spotbugs plugin.
No default manifest, no need to specify jar besides test jar.
@@ -23,7 +23,7 @@
*/
Board(Square[][] grid) {
assert grid != null;
this.board = grid;
this.board = (Square[][]) grid.clone();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we using clone and a cast here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted ;-).

This relates to the PMD rule Array is stored directly.

The deeper issue is that we should rethink the pmd rule set, conform #121.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will run into more problems than it would solve. If we do want to address it, we must make sure that we can actually copy a Square properly. That said, if we need to keep this in to keep PMD happy let's add a TODO to make sure we address this as soon as possible (once #121 is resolved)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what about Arrays.copy?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. "Solving" this non-problem would require a deep copy, which Arrays.copyOf also does not do.

My proposal is to undo the clone addition, add a SuppressWarnings here referencing the rule, and then revisit this when we recheck the pmd rule set to be used. (And I'm beginning to be in favor of dropping this rule).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@avandeursen Yes that seems to be an appropriate solution 👍

Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending the reversal of the .clone() invocation and using a SuppressWarnings, this PR LGTM

@avandeursen
Copy link
Member Author

Thanks @mjwsteenbergen @LiamClark @TimvdLippe!

@avandeursen avandeursen merged commit 2f94279 into master Apr 11, 2018
@avandeursen avandeursen deleted the dependencies branch April 11, 2018 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants