767c9aae79
Bugfix singular field + lambda
2017-01-06 10:07:19 +01:00
6283316e51
Avoid redundant method calls and improve codebase
...
- Avoid making calls within for loops, specially costly ones
such as `getQualifiedTypeNames`
- Don't create lists when they are empty.
- Create lists of proper size to avoid resizing / oversizing
- I'm seeing a ~5% improvement. We are reaching the point were noise
makes it hard to detect improvements. We should attack GC cycles soon.
2017-01-03 11:41:33 +01:00
54db0ffbd9
[java] UnnecessaryFullyQualifiedNameRule handles same file class conflicts
...
- This resolves [#1555 ](https://sourceforge.net/p/pmd/bugs/1555/ )
- If a class is defined in the same file that conflicts with an import,
it's not considered a violation
2017-01-03 10:18:29 +01:00
28a24dec2a
[java] Speedup PreserveStackTrace by over 7X
...
- By avoiding to look at all variable declarators we can greatly improve
analysis speed without loosing accurancy
2016-12-10 10:13:37 +01:00
f4e727d274
[java] Make CloneMethodMustImplementCloneable over 500x faster
...
- This was an excruciatingly slow rule, the slowest by far of all PMD
- We speed it up by:
* checking early if we are analyzing a `clone()` method to cut the AST tree
* making better use of type information available
* only performing additional checks when we know we can't rely on
available type information
2016-12-09 09:44:23 +01:00
61e0fc5875
[java] Fix #1547 : UnusedImports: Adjust regex to support underscores
2016-12-07 14:14:07 -03:00
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
7e3546c130
UnnecessaryFullyQualifiedName can detect conflicts
...
- Fixes https://sourceforge.net/p/pmd/bugs/1546/
2016-11-26 18:13:10 +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
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
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
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
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
15ff7ca944
Fixes #1490 [java] PMD Error while processing - NullPointerException
2016-11-04 08:46:00 +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
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
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
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
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
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
354b9a9cbc
Merge branch 'bug-1522' into pmd/5.4.x
2016-09-25 18:37:38 +02:00
db44bc4745
Fixes #1522 [java] CommentRequired: false positive
2016-09-25 18:32:26 +02:00
42a5c6a537
Merge branch 'bug-1508' into pmd/5.4.x
2016-07-26 21:42:55 +02:00
88d1823c2e
Fixes #1508 [core] [java] PMD is leaking file handles
...
Fixes InputStreams and Readers
2016-07-25 21:25:34 +02:00
9240f98cce
Merge branch 'pr-103' into pmd/5.4.x
2016-07-07 22:35:26 +02:00
0660097db2
Add unit test for #1501 [java] CyclomaticComplexity rule causes OOM when class reporting is disabled
2016-07-07 22:27:16 +02:00
afc0f25795
Fix for 1501: CyclomaticComplexity rule causes OOM when class reporting is disabled
2016-07-07 22:26:27 +02:00
4512da8f3f
[maven-release-plugin] prepare for next development iteration
2016-05-29 20:04:35 +02:00
5fa4b309ed
[maven-release-plugin] prepare release pmd_releases/5.4.2
2016-05-29 20:04:34 +02:00
be1a996ba5
Merge branch 'bug-1479' into pmd/5.4.x
2016-05-29 18:31:09 +02:00
04f16d7627
Fixes #1479 CloseResource false positive on Statement
2016-05-29 18:20:04 +02:00
8f4a262e8e
Merge branch 'bug-1480' into pmd/5.4.x
2016-05-28 16:40:27 +02:00
6afe513225
Fixes #1480 false positive on public modifier used with inner interface in enum
2016-05-28 16:33:10 +02:00
a4baf5c2a8
Merge branch 'bug-1484' into pmd/5.4.x
2016-05-21 11:38:18 +02:00
0d20fe7e1c
Fixes #1484 UnusedLocalVariable - false positive - parenthesis
2016-05-21 11:37:10 +02:00
2afd30c283
[maven-release-plugin] prepare for next development iteration
2016-04-30 23:15:13 +02:00