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
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
522d0ea311
Verify #1519 [java] UselessParenthesis: False Positive: "Prohibits the use of useless parentheses" when more than one line
2016-09-02 18:22:43 +02:00
579853385d
Keep constructor names under ignoreIdentifiers
...
- Unrelated classes that just happen to have matching constructor types
(maybe sibling classes extening the same base class, and simply
calling super on all constructors) should not be reported as copy-paste
- If you copied a whole class, CPD should still match it due to other
member methods / fields, only case it would no longer catch is that of
a class exclusively containing constructors, but that should probably be
a PMD rule, and not catched by CPD itself
2016-09-01 16:57:24 -03:00
c8a9f43ee0
Refactor InvalidSlf4jMessageFormatRule
2016-08-07 11:59:36 +02:00
cd9a8186db
reformat, whitespaces
2016-08-07 11:52:50 +02:00
a74105faa4
Fixes #1500 [java] InvalidSlf4jMessageFormat: doesn't ignore exception param
2016-08-05 11:08:36 +02:00
869ee8569e
verify #1505 [java] ConstantsInInterface false negative
2016-08-03 20:06:02 +02:00
a6acf7ca81
Fixes #1509 [java] InvalidSlf4jMessageFormat NPE
2016-08-03 19:43:10 +02:00
6746b7522c
[maven-release-plugin] prepare for next development iteration
2016-07-27 20:40:56 +02:00
cc3ad9aeb7
[maven-release-plugin] prepare release pmd_releases/5.5.1
2016-07-27 20:40:56 +02:00
20c4f168c1
Merge branch 'close-read-files' of https://github.com/wolfs/pmd into pr-104
2016-07-26 22:10:15 +02:00
a491cef61c
Merge branch 'bug-1508'
2016-07-26 21:56:14 +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
9fe399f3b3
Close classes read by PMDASMClassLoader
...
When having a long running process like the Gradle daemon,
then not closing read resources makes it impossible to delete
files on Windows.
2016-07-25 13:20:56 +02:00
1916bcfd00
Merge branch 'pr-103'
2016-07-07 22:44:15 +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
4d52be5cf2
PMDASMClassloader: minor refactoring
2016-07-07 20:47:53 +02:00
9823f17cf8
Merge branch 'master' of https://github.com/fjalvingh/pmd into pr-101
2016-07-07 20:32:53 +02:00
46ad3a4700
Improve multithreading performance: do not lock on classloader.
2016-06-25 17:59:42 +02:00
ef2a97d267
[maven-release-plugin] prepare for next development iteration
2016-06-25 17:53:11 +02:00
64d9ef96fc
[maven-release-plugin] prepare release pmd_releases/5.5.0
2016-06-25 17:53:10 +02:00
9d6692976a
Merge branch 'ignore-method-name-on-override' of https://github.com/Monits/pmd into pr-97
2016-06-12 19:03:15 +02:00
fda753813b
Don't report bad method names on @Override
2016-06-08 19:59:58 -03:00
5c9a8eb895
Merge branch 'pmd/5.4.x'
2016-05-29 21:17:50 +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
8b34b2ef23
Merge branch 'bug-1479'
2016-05-29 18:37:19 +02:00