383 Commits

Author SHA1 Message Date
Felix Otto
9f1f63ffe6 fixes #1552 [java] continue does not require break
Similar to RETURN after a CONTINUE statement break is not required in a
case section
2016-12-07 13:10:23 -03:00
Juan Martín Sotuyo Dodero
7e3546c130 UnnecessaryFullyQualifiedName can detect conflicts
- Fixes https://sourceforge.net/p/pmd/bugs/1546/
2016-11-26 18:13:10 +01:00
Juan Martín Sotuyo Dodero
b5ca7baa9a Ensure className is never null 2016-11-26 11:04:29 +01:00
Juan Martín Sotuyo Dodero
19a8d0d060 Minor optimizations to type resolution 2016-11-26 11:04:00 +01:00
Juan Martín Sotuyo Dodero
95101fddaf Don't look twice for the same variables
- This reduces calls to all scope resolution methods
2016-11-26 10:29:02 +01:00
Juan Martín Sotuyo Dodero
28e2f11003 Avoid creating a new String to qualify types
- This is now slightly faster, which for a method that gets called
    over 1 million times on large projects is significant.
 - We should still look for ways to reduce the number of calls to this
    method.
2016-11-20 18:27:06 +01:00
Andreas Dangel
e78f80416a [maven-release-plugin] prepare for next development iteration 2016-11-04 21:01:18 +01:00
Andreas Dangel
5019eb11e4 [maven-release-plugin] prepare release pmd_releases/5.4.3 2016-11-04 21:01:18 +01:00
Andreas Dangel
7bfc1b9545 Merge branch 'bug-1532' into pmd/5.4.x 2016-11-04 12:47:21 +01:00
Andreas Dangel
a9d0de9450 Fixes #1532 [java] CloneMethodMustImplementCloneable: Implemented Interface extends Cloneable 2016-11-04 12:41:57 +01:00
Andreas Dangel
15ff7ca944 Fixes #1490 [java] PMD Error while processing - NullPointerException 2016-11-04 08:46:00 +01:00
Andreas Dangel
4ac34af067 Merge branch 'bug-1494' into pmd/5.4.x 2016-11-02 20:22:53 +01:00
Andreas Dangel
0c75e5123c Fixes #1494 [java] SingularField: lombok.Data false positive 2016-11-02 20:22:15 +01:00
Andreas Dangel
315ea28d4c Merge branch 'pr-113' into pmd/5.4.x 2016-10-30 17:25:47 +01:00
Juan Martín Sotuyo Dodero
f8d1162886 Fix ClassCastException on SignatureDeclareThrowsException
- Java 8 code allows for things such as
   `class UnmodifiableList<T> implements @Readonly List<@Readonly T> {}`
    where not all token in the ASTImplementsList are ASTClassOrInterfaceType
2016-10-30 17:19:16 +01:00
Andreas Dangel
020170bd76 Add test for #1535 [java] SignatureDeclareThrowsException: ClassCastException with Annotation 2016-10-30 17:18:31 +01:00
Andreas Dangel
b0fb0cadc1 Merge branch 'pr-112' into pmd/5.4.x 2016-10-29 18:28:36 +02:00
Andreas Dangel
127a2be871 whitespaces 2016-10-29 18:19:59 +02:00
Juan Martín Sotuyo Dodero
238f6b721b Fix ClassCastException on CloneMethodMustImplementCloneable
- Java 8 code allows for things such as
    `class UnmodifiableList<T> implements @Readonly List<@Readonly T> {}`
    where not all token in the ASTImplementsList are ASTClassOrInterfaceType
2016-10-29 18:19:00 +02:00
Andreas Dangel
f4f2402661 Add test for #1534 [java] CloneMethodMustImplementCloneable: ClassCastException with Annotation (java8) 2016-10-29 18:17:59 +02:00
Andreas Dangel
b2c59bcbdb Merge branch 'pr-111' into pmd/5.4.x 2016-10-29 17:20:32 +02:00
Juan Martín Sotuyo Dodero
1e5c1c05ca In Java 8, annotations may appear as first child
- For instance `Object o = new @Interned MyObject();` would fail with a ClassCastException
 - The current code deals with it gracefully
2016-10-29 17:13:33 +02:00
Andreas Dangel
5d11e77208 Add test for #1533 [java] BooleanInstantiation: ClassCastException with Annotation 2016-10-29 17:12:20 +02:00
Andreas Dangel
578d854632 Merge branch 'bug-1530' into pmd/5.4.x 2016-10-16 14:08:13 +02:00
Juan Martín Sotuyo Dodero
283dc00a43 Replace syntactic lookahead with semantic one
- They are the same, but JavaCC seems to handle this one better.
2016-10-16 14:01:26 +02:00
Juan Martín Sotuyo Dodero
e9f14e4496 Add failing test scenario 2016-10-16 13:59:17 +02:00
Andreas Dangel
1b52e0192a Merge branch 'bug-1529' into pmd/5.4.x 2016-10-01 17:54:11 +02:00
Andreas Dangel
8667aea076 Fixes #1529 [java] UnusedImports: The created rule violation has no class name 2016-10-01 17:45:47 +02:00
Andreas Dangel
354b9a9cbc Merge branch 'bug-1522' into pmd/5.4.x 2016-09-25 18:37:38 +02:00
Andreas Dangel
db44bc4745 Fixes #1522 [java] CommentRequired: false positive 2016-09-25 18:32:26 +02:00
Andreas Dangel
42a5c6a537 Merge branch 'bug-1508' into pmd/5.4.x 2016-07-26 21:42:55 +02:00
Andreas Dangel
88d1823c2e Fixes #1508 [core] [java] PMD is leaking file handles
Fixes InputStreams and Readers
2016-07-25 21:25:34 +02:00
Andreas Dangel
9240f98cce Merge branch 'pr-103' into pmd/5.4.x 2016-07-07 22:35:26 +02:00
Andreas Dangel
0660097db2 Add unit test for #1501 [java] CyclomaticComplexity rule causes OOM when class reporting is disabled 2016-07-07 22:27:16 +02:00
Frits Jalvingh
afc0f25795 Fix for 1501: CyclomaticComplexity rule causes OOM when class reporting is disabled 2016-07-07 22:26:27 +02:00
Andreas Dangel
4512da8f3f [maven-release-plugin] prepare for next development iteration 2016-05-29 20:04:35 +02:00
Andreas Dangel
5fa4b309ed [maven-release-plugin] prepare release pmd_releases/5.4.2 2016-05-29 20:04:34 +02:00
Andreas Dangel
be1a996ba5 Merge branch 'bug-1479' into pmd/5.4.x 2016-05-29 18:31:09 +02:00
Andreas Dangel
04f16d7627 Fixes #1479 CloseResource false positive on Statement 2016-05-29 18:20:04 +02:00
Andreas Dangel
8f4a262e8e Merge branch 'bug-1480' into pmd/5.4.x 2016-05-28 16:40:27 +02:00
Andreas Dangel
6afe513225 Fixes #1480 false positive on public modifier used with inner interface in enum 2016-05-28 16:33:10 +02:00
Andreas Dangel
a4baf5c2a8 Merge branch 'bug-1484' into pmd/5.4.x 2016-05-21 11:38:18 +02:00
Andreas Dangel
0d20fe7e1c Fixes #1484 UnusedLocalVariable - false positive - parenthesis 2016-05-21 11:37:10 +02:00
Andreas Dangel
2afd30c283 [maven-release-plugin] prepare for next development iteration 2016-04-30 23:15:13 +02:00
Andreas Dangel
d89549f994 [maven-release-plugin] prepare release pmd_releases/5.3.7 2016-04-30 23:15:13 +02:00
Andreas Dangel
ad6ae9edb6 Merge branch 'bug-1470' into pmd/5.4.x 2016-04-30 19:23:47 +02:00
Andreas Dangel
7d053d41c2 Merge branch 'bug-1470' into pmd/5.3.x 2016-04-30 19:18:08 +02:00
Andreas Dangel
81378fe8ed Fixes #1470 Error with type-bound lambda 2016-04-30 19:14:46 +02:00
Andreas Dangel
7ee8e28484 Merge branch 'bug-1475' into pmd/5.4.x 2016-04-30 18:40:02 +02:00
Andreas Dangel
ce8c4bf1a8 Merge branch 'bug-1475' into pmd/5.3.x 2016-04-30 18:36:44 +02:00