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
52a8758262
Merge branch 'bug-1532'
2016-11-04 12:49:26 +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
567be45b8c
Simplify VariableDeclaratorId parsing
...
- Don't look for arrays where there can be none
2016-10-14 10:06:29 -03:00
478ed3463c
Simplify lambda pursing even further
...
- Remove a redundant case
- Restrict grammar according to spec with a simpler scenario
2016-10-14 09:24:06 -03:00
09ac963709
Improve SymbolTable times further
...
- Expand hashCode calculation for `MethodNameDeclaration` to avoid collisions
when overloading.
- Also make sure `builtInMethodDeclaration` provides a complete syntax tree to avoid NPE
when calling `hashCode` or `equals`
2016-10-13 20:40:46 -03:00
d8344b0672
Simplify varargs detection
...
- Make use of our Java knowledge when analyzing Java code
2016-10-13 18:03:51 -03:00
382699b766
Improve type resolution
...
- Notice the `couldResolve` doesn't guarantee a positive resolution, but still
manages to kill early some resolver checks
- `PrimiiveTypeResolver.resolve()` and `VoidTypeResolver.resolve()`
were the 2nd and 5th most time consuming methods on several profiles
I ran. This change fixes it.
2016-10-13 18:03:31 -03:00
be83d154d0
Don't assume the List supports random access
2016-10-13 17:17:43 -03:00
a046b8f93d
Simplify lambda parsing
...
- Handle less scenarios
- Have scenarios be defined more broadly (ie: allow more than 3 params)
- This improves parsing performance by roughly ~10%
2016-10-13 14:53:51 -03:00
61b55bd7e5
Minor improvements
...
- Use `Deque` and `ArrayDeque` instead of `Stack`
- Use presized `ArrayList` instead of a dynamic `LinkedList` when possible
- Don't create empty `HashSet` when `Collections.emptySet()` suffices
- User `Collections.singletonList()` were apropriate
2016-10-13 01:53:47 -03:00
fccd26b2d0
Dont use synchronized structures onnon-shared data
...
- AFAIK ScopeAndDeclarationFinder is only used as a local,
used as alocal by SymbolFacade, used as a local by SourceCodeProcessor.
Synchronizing is needless.
2016-10-11 17:48:39 -03:00
b773da1441
Merge branch 'bug-1529'
2016-10-01 17:58:53 +02:00
1b52e0192a
Merge branch 'bug-1529' into pmd/5.4.x
2016-10-01 17:54:11 +02:00
8667aea076
Fixes #1529 [java] UnusedImports: The created rule violation has no class name
2016-10-01 17:45:47 +02:00
f9deb34809
Merge branch 'bug-1522'
2016-09-25 18:42:51 +02:00