Commit Graph

502 Commits

Author SHA1 Message Date
268c62e772 Symbol table can now handle inner classes
- Types are now attempted to be resolved as inner classes if public attempt fails
 - ClassScope offers a `resolveType` method that qualifies the name as per local rules
    before resolution
2016-11-26 19:53:53 +01:00
ef98657965 Merge branch 'issue-1546' into pmd/5.5.x 2016-11-26 18:20:43 +01:00
7e3546c130 UnnecessaryFullyQualifiedName can detect conflicts
- Fixes https://sourceforge.net/p/pmd/bugs/1546/
2016-11-26 18:13:10 +01:00
390cbd1ffc Merge branch 'pr-128' into pmd/5.5.x 2016-11-26 11:10:13 +01:00
b5ca7baa9a Ensure className is never null 2016-11-26 11:04:29 +01:00
19a8d0d060 Minor optimizations to type resolution 2016-11-26 11:04:00 +01:00
1f467a9165 Merge branch 'pr-127' into pmd/5.5.x 2016-11-26 10:35:12 +01:00
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
a7b74d1eff Merge branch 'pr-126' into pmd/5.5.x 2016-11-20 18:33:34 +01:00
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
e4dc70c5d5 [java] Properly handle enums with ignore identifiers
- Right now it throws an NPE
 - Having fixed the NPE, it threw an ArrayIndexOutOfBounds
 - Finally, it was just not working as expected
 - Fixes https://sourceforge.net/p/pmd/bugs/1542/
2016-11-14 20:06:41 +01:00
5f13cc20e9 [maven-release-plugin] prepare for next development iteration 2016-11-05 11:02:08 +01:00
96fffcaadd [maven-release-plugin] prepare release pmd_releases/5.5.2 2016-11-05 11:02:08 +01:00
e78f80416a [maven-release-plugin] prepare for next development iteration 2016-11-04 21:01:18 +01:00
5019eb11e4 [maven-release-plugin] prepare release pmd_releases/5.4.3 2016-11-04 21:01:18 +01:00
52a8758262 Merge branch 'bug-1532' 2016-11-04 12:49:26 +01:00
7bfc1b9545 Merge branch 'bug-1532' into pmd/5.4.x 2016-11-04 12:47:21 +01:00
a9d0de9450 Fixes #1532 [java] CloneMethodMustImplementCloneable: Implemented Interface extends Cloneable 2016-11-04 12:41:57 +01:00
6dcf301e4d Merge branch 'bug-1490' 2016-11-04 08:55:45 +01:00
15ff7ca944 Fixes #1490 [java] PMD Error while processing - NullPointerException 2016-11-04 08:46:00 +01:00
ba50b3183e Refactor out AbstractLombokAwareRule 2016-11-02 20:34:50 +01:00
e611dc8412 Merge branch 'bug-1494' 2016-11-02 20:27:22 +01:00
4ac34af067 Merge branch 'bug-1494' into pmd/5.4.x 2016-11-02 20:22:53 +01:00
0c75e5123c Fixes #1494 [java] SingularField: lombok.Data false positive 2016-11-02 20:22:15 +01:00
2158a792ff Merge branch 'simplify-variable-declarator-id-parsing' of https://github.com/Monits/pmd into pr-118
# Conflicts:
#	pmd-java/etc/grammar/Java.jjt
2016-10-30 18:51:44 +01:00
2f5a7058cb Merge branch 'faster-symbol' of https://github.com/Monits/pmd into pr-117 2016-10-30 18:38:08 +01:00
c6680e2f66 Merge branch 'better-collections' of https://github.com/Monits/pmd into pr-116 2016-10-30 18:25:35 +01:00
15b36498f3 More test cases for lambda parsing 2016-10-30 18:14:23 +01:00
10e4cc7290 Merge branch 'faster-parse' of https://github.com/Monits/pmd into pr-115
# Conflicts:
#	pmd-java/etc/grammar/Java.jjt
2016-10-30 18:12:54 +01:00
2d1337b300 Merge branch 'pr-113' 2016-10-30 17:31:50 +01:00
315ea28d4c Merge branch 'pr-113' into pmd/5.4.x 2016-10-30 17:25:47 +01:00
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
020170bd76 Add test for #1535 [java] SignatureDeclareThrowsException: ClassCastException with Annotation 2016-10-30 17:18:31 +01:00
646a4b0650 Merge branch 'pr-112' 2016-10-29 18:34:00 +02:00
b0fb0cadc1 Merge branch 'pr-112' into pmd/5.4.x 2016-10-29 18:28:36 +02:00
127a2be871 whitespaces 2016-10-29 18:19:59 +02:00
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
f4f2402661 Add test for #1534 [java] CloneMethodMustImplementCloneable: ClassCastException with Annotation (java8) 2016-10-29 18:17:59 +02:00
04257e657d Merge branch 'pr-111' 2016-10-29 17:24:40 +02:00
b2c59bcbdb Merge branch 'pr-111' into pmd/5.4.x 2016-10-29 17:20:32 +02:00
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
5d11e77208 Add test for #1533 [java] BooleanInstantiation: ClassCastException with Annotation 2016-10-29 17:12:20 +02:00
f88e86cdb1 Merge branch 'bug-1530' 2016-10-16 14:14:30 +02:00
578d854632 Merge branch 'bug-1530' into pmd/5.4.x 2016-10-16 14:08:13 +02:00
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
e9f14e4496 Add failing test scenario 2016-10-16 13:59:17 +02:00
9b7372eec0 Minor improvements
- Typos, extra whitespace, a missing static, clearer loops..
2016-10-15 02:55:02 -03:00
8c82dae34c Fully implemente couldResolve 2016-10-14 19:35:32 -03:00
565a9aa0d8 Add a cache to ImplicitImportResolver
- Classes in java.lang.* aren't that many, yet they hit a lot (String,
    all boxed primitives, Math, etc.), so it makes sense to cache them
2016-10-14 18:59:52 -03:00
d350bcb49e Make explicit imports orders of times faster
- We can tell if a name can be resolved or not, and we can do so in
    constant time.
2016-10-14 16:06:28 -03:00