438 Commits

Author SHA1 Message Date
d9675bbc6f [maven-release-plugin] prepare release pmd_releases/5.4.6 2017-03-27 22:07:00 +02:00
19ee0cd37b InefficientEmptyStringCheck: Fix NPE 2017-03-27 21:55:38 +02:00
abe2e8561c Fixes #309: [java] Parse error on method reference 2017-03-27 21:07:28 +02:00
6458883a61 Improve test, cover cases whith no rule / assert 2017-03-26 23:38:26 -03:00
493e289200 Added test case 2017-03-26 23:38:26 -03:00
80a469c4c7 Removed debug outputs 2017-03-26 23:38:25 -03:00
0a25010869 Cleaned up 2017-03-26 23:38:25 -03:00
d2642920ec Added original test case 2017-03-26 23:38:25 -03:00
b9bb0ca373 Completed bug fix 2017-03-26 23:38:25 -03:00
b74e205663 Added test case 2017-03-26 23:38:25 -03:00
746f7c0682 Get the @Rule annotated ExpectedExceptions fields 2017-03-26 23:38:25 -03:00
38d3f4f67f Cleaned up one method 2017-03-26 23:38:22 -03:00
a07b8c7fd0 Separated test cases 2017-03-23 13:02:08 -03:00
beac88cef6 Optimised conditionals 2017-03-23 13:01:58 -03:00
94e3e25c03 Cleaned up 2017-03-23 13:01:50 -03:00
c63d8f3191 Fixed bug with inverted ternary expression 2017-03-23 13:01:45 -03:00
c62ad45cf6 Specialized condition 2017-03-22 15:14:09 -03:00
3454c6eb4e Removed test class 2017-03-22 15:13:59 -03:00
6bf8138aaf Added violation case for InefficientEmptyStringCheckRule
String.trim().isEmpty() now triggers a violation.

Fixed checkstyle
2017-03-22 15:13:41 -03:00
19114a7030 Simplify XPath expression 2017-03-03 19:03:26 +01:00
fb405fef08 [java] fields in annotations are public static
- Fixes #275
2017-03-03 19:03:26 +01:00
4c7774ebf0 [maven-release-plugin] prepare for next development iteration 2017-02-25 19:03:45 +01:00
0eec906467 [maven-release-plugin] prepare release pmd_releases/5.4.5 2017-02-25 19:03:37 +01:00
227060e5f8 corrected invalid reporting of LoD violation 2017-02-21 23:07:51 -03:00
8f22e69560 Ugly workaround that don't need to change AST 2017-02-20 16:00:39 +01:00
907972f0ca [java] Improve grammar for CastExpression
- Provide a definite fix for casts. This allowed to remove a bunch of hacks.
 - I had to change the grammar a bit... `(int)` is now a cast with a
    PrimitiveType as child, not a Type with a nested PrimitiveType. This is due
    to JavaCC completely ignoring whatever you place in the LOOKAHEAD in favor
    of just looking the follow-up expression completely.
 - Removing the hacks raised an issue with expression orders, caused also by JavaCC's
    disregard to LOOKAHEAD contents
2017-02-20 16:00:39 +01:00
756e9a713a Update docs to reflect on changes 2017-02-15 19:47:08 +01:00
b4d05e5f14 Checkstyle fixes 2017-02-15 19:47:08 +01:00
1fb05d995f [java] Revamp UnusedModifier
- This covers a ton of missing cases
 - Fixes #246
 - Fixes #247
 - Fixes #248
 - Notice `isNested` has been improved on `ASTClassOrInterfaceDeclaration`
    to cover being nested in an annotation definition
2017-02-15 19:47:08 +01:00
ed7714391a [java] Fix FP in SimplifiedTernary with null value
- Fixes #232
 - Alo improve the docs formatting, it's getting garbled on the web..
2017-02-12 09:35:08 +01:00
c5d4951728 [java] Tidy up ClassScope code
- Sibling node search cn be easier
 - Remove dead code in generic resolution
 - Make sure generics resolution goes up through nested classes
2017-02-11 15:25:26 +01:00
03306df325 [doc] [java] Improve docs on NonThreadSafeSingleton 2017-02-06 20:11:30 +01:00
1950aeb001 [java] Fix ClassCastException in UnnecessaryLocalBeforeReturn
- This fixes #219
2017-02-06 19:52:41 +01:00
630b92b64e [java] Treat annotation members as public static final
- This fixes #215
 - I created a new method so we didn't change public APIs
2017-02-05 17:44:55 +01:00
e9149551b7 [maven-release-plugin] prepare for next development iteration 2017-01-28 13:15:11 +01:00
12758ef777 [maven-release-plugin] prepare release pmd_releases/5.4.4 2017-01-28 13:15:10 +01:00
6899c63597 Fixes #1495 [java] UnnecessaryLocalBeforeReturn with assert 2017-01-28 11:45:59 +01:00
7fbb304c8f java: ImmutableFieldRule - use enum 2017-01-28 10:43:17 +01:00
fa3a9b0d66 java: ImmutableFieldRule - take usages inside lambdas into account
Fixes #1448 ImmutableField Rule: Private field in inner class gives false positive[java] ImmutableField: Private field in inner class gives false positive with lambdas
2017-01-28 10:38:49 +01:00
c53e1790e1 [java] Allow more than 1 annotation in local classes
- This fixes #208
2017-01-27 20:00:08 +01:00
455b1c4ded Fix grammar for annotation members
- The lookahead (3 tokens) was too small, and without reaching the opening
    parenthesis assumed it was parsing a method and not a field.
 - Using a larger lookahead solves the issue.
 - Fixes #206
2017-01-27 19:38:48 +01:00
33fd84d521 [java] Support generics in method references
- Fixes #207
 - Extend the Java grammar to support generics in
    method references: `Type::<Generic>method`
2017-01-27 19:10:42 +01:00
47137e3789 Improve docs on ConsecutiveAppendsShouldReuse
- This should help with people having doubts for this rule such as #202
    and http://stackoverflow.com/questions/37672785/how-can-i-improve-performance-if-append-is-called-on-stringbuffer-or-stringb
 - Fixes #202
2017-01-27 17:30:13 +01:00
420c6d45a3 Fixes #199 - False positives with ternary operator
- I deected a couple of extra related issues with ternary operators which are now fixed.
2017-01-27 16:42:24 +01:00
ba260e753c Adjust unit test to verify console encoding of XML formatter 2017-01-21 11:58:59 +01:00
4c1890d56c Add unit test to verify encoding of XML formatter 2017-01-21 11:58:59 +01:00
c0e1c3e731 Slightly improve performance of XPath Rule UseLocaleWithCaseConversions 2017-01-08 13:51:44 +01:00
af3ad2bc02 Fixes #1556 [java] UseLocaleWithCaseConversions does not works with ResultSet (false negative) 2017-01-08 12:12:56 +01:00
af9d78c01a Update changelog 2017-01-06 10:16:45 +01:00
767c9aae79 Bugfix singular field + lambda 2017-01-06 10:07:19 +01:00