Clément Fournier
4f36ac3bd2
Merge branch 'master' into pr/2934
2020-11-28 14:40:09 +01:00
Clément Fournier
7eb530f035
Merge branch 'master' into pr/2940
2020-11-28 14:25:28 +01:00
Clément Fournier
9aaae814c4
Handle TNPE and LinkageE when loading type params
2020-11-23 14:40:32 +01:00
Clément Fournier
a5bcdb328a
Merge branch 'master' into issue-2911-class-leak
2020-11-23 14:37:17 +01:00
Andreas Dangel and Igor Moreno
1783b1daa1
Update pmd-java/src/main/resources/category/java/bestpractices.xml
...
Co-authored-by: Igor Moreno <igormoreno@gmail.com >
2020-11-23 13:55:48 +01:00
Andreas Dangel
e701f52d96
[java] Catch additional TypeNotPresentExceptions / LinkageErrors
...
These exceptions are indications of an incomplete auxclasspath
but should not fail PMD entirely.
Incomplete auxclasspath can still result in invalid violations,
either false positives or false negatives.
2020-11-21 16:38:26 +01:00
Andreas Dangel
02135513c9
[java] CompareObjectsWithEquals: Fix more false positives
2020-11-20 20:39:45 +01:00
Andreas Dangel
cda99a1629
[java] CompareObjectsWithEquals - whitelist java.lang.class and this
2020-11-20 16:41:41 +01:00
Andreas Dangel
2c950641d2
[java] Avoid false positives with literals
2020-11-20 15:50:30 +01:00
Andreas Dangel
a1297dfd09
[java] Consider comparison with null literal as valid
2020-11-20 12:20:25 +01:00
Igor Moreno
ff77650801
Fix typo: "an accessor" not "a"
2020-11-19 22:59:17 +01:00
Andreas Dangel
1e6c79c19f
[java] CompareObjectsWithEquals / UseEqualsToCompareStrings - Fix FN
...
Fixes false negatives in case fields are referenced with this.
Type resolution on PrimaryExpression works well enough to
simply check the type.
2020-11-19 21:08:15 +01:00
abhishek-kumar09
84e6c0997b
Correct Annotation Array Initialiation indents from checkstyle #8083
2020-11-16 00:36:30 +05:30
Clément Fournier
51c0df8770
Remove cache entirely
2020-11-14 17:48:14 +01:00
Clément Fournier
3ccdb5597a
Make overload without varargs
2020-11-14 17:15:42 +01:00
Clément Fournier
30124fef11
Don't cache enclosing class (pretty rare to hit it)
2020-11-14 16:54:11 +01:00
Clément Fournier
4ee7b7ae02
Load fewer class names
2020-11-14 16:44:27 +01:00
Clément Fournier
307eacd20a
Fix errors
2020-11-14 15:37:04 +01:00
Clément Fournier
00d76b03ab
Restrict caching to classes loaded by the bootstrap loader
2020-11-14 15:02:15 +01:00
Clément Fournier
4fe3874824
Simplify constructor of JavaTypeDefinitionSimple
2020-11-14 14:57:25 +01:00
Clément Fournier
dfb5c4e2d2
Merge branch 'finish-905'
2020-11-11 22:18:32 +01:00
Clément Fournier
a5c42ddefc
Add test case for #2595
2020-11-11 15:33:38 +01:00
Clément Fournier
56a5ee536b
Deprecations for #905
2020-11-10 14:02:02 +01:00
Clément Fournier
873206e657
Replace usages, update reference files
2020-10-31 15:34:54 +01:00
Clément Fournier
bc9557830a
Deprecate ASTPackageDeclaration#getPackageNameImage
2020-10-31 15:18:46 +01:00
Clément Fournier
2b9e3057a7
Deprecate ASTTypeParameter#getParameterName
2020-10-31 15:18:36 +01:00
Andreas Dangel
9f701ee460
Merge branch 'pr-2870' into master
...
[lang-test] Upgrade Kotlin, Dokka and Kotest #2870
2020-10-28 16:53:53 +01:00
Andreas Dangel
718b72d00a
[java] Add tests for UnusedAssignments
...
Refs #2843
2020-10-28 16:38:48 +01:00
Clément Fournier
a95c67c31e
Upgrade to kotlin 1.4.1 and kotest 4.3.0
2020-10-26 17:08:08 +01:00
Andreas Dangel
4837c8dbc8
[maven-release-plugin] prepare for next development iteration
2020-10-24 10:17:24 +02:00
Andreas Dangel
81f12d3e5d
[maven-release-plugin] prepare release pmd_releases/6.29.0
2020-10-24 10:17:15 +02:00
Andreas Dangel
cfb21d226a
Merge branch 'pr-2866' into master
...
[java] (doc) Fix example for CouplingBetweenObjects #2866
2020-10-23 09:02:42 +02:00
Gustavo Krieger
ccb7fd25aa
Programming correction in docs
...
Docs of CouplingBetweenObjects has a Programming issue. I also made "something" a method.
2020-10-22 19:46:46 -03:00
Gustavo Krieger
151400d95b
Update ExcessiveImports example code for clarity
...
Since the default minimum is 30, I believe it would make more sense if the comment said "28" instead of "18".
2020-10-22 19:38:40 -03:00
Andreas Dangel
873564e69f
Merge branch 'pr-2811' into master
...
[java] CloseResource - Fix #2764 : False-negative when re-assigning variable #2811
2020-10-22 09:40:06 +02:00
andi
77b183704f
fix #2764 : false-negative when re-assigning variable
2020-10-14 17:41:28 +02:00
Clément Fournier
e3804da978
Update and rename DoNotTerminateVM.java to DoNotTerminateVMTest.java
2020-10-13 23:04:43 +02:00
Andreas Dangel
1130ee45a7
Merge branch 'pr-2813' into master
...
[core] Use JUnit's TemporaryFolder rule #2813
2020-10-10 14:01:03 +02:00
Andreas Dangel
e76b0b6946
Merge branch 'pr-2803' into master
...
[java] Improve DoNotCallSystemExit (Fixes #2157 ) #2803
2020-10-10 13:07:05 +02:00
Andreas Dangel
1150e61ddd
[java] Rename DoNotCallSystemExit -> DoNotTerminateVM
2020-10-10 13:05:58 +02:00
Stefan Birkner
22db2fdebc
Use JUnit's TemporaryFolder rule
...
Don't reinvent the wheel. TemporaryFolder already takes care of cleaning
up the created files.
2020-10-03 22:59:16 +02:00
Vitaly Polonetsky
095f96a966
Added tests to verify the fix for #2157
2020-10-02 00:09:31 -07:00
Stefan Birkner
6b23b13497
Move test config from file to test class
...
Keep it simple. The config file stored only a single line for years.
2020-09-30 22:48:43 +02:00
Andreas Dangel
aa245c6e1b
[maven-release-plugin] prepare for next development iteration
2020-09-26 10:25:16 +02:00
Andreas Dangel
722f3ca997
[maven-release-plugin] prepare release pmd_releases/6.28.0
2020-09-26 10:25:05 +02:00
Vitaly Polonetsky
e8b95f1a21
Fixes #2157
...
System.exit() and its equivalents should be allowed in static main() methods, added check for Runtime.getRuntime().halt()
2020-09-25 09:42:51 -07:00
Clément Fournier
d3ca0319b3
Merge branch 'master' into issue-2755
2020-09-25 14:24:08 +02:00
Andreas Dangel
f046268058
[java] CloseResource: add simple test case for var
2020-09-21 19:47:42 +02:00
Andreas Dangel
87890b852a
[java] CloseResource: Fix test code
2020-09-21 19:39:24 +02:00
Clément Fournier
8c97300af8
Fix doc
...
Parameters were in the wrong order.
2020-09-18 04:04:35 +02:00