Commit Graph

3613 Commits

Author SHA1 Message Date
202079eeca Fix stack overflow error 2021-10-07 20:04:17 +02:00
701938de1c [java] HardcodedCryptoKey false negative with variable assignments #3368 2021-10-07 19:09:06 +02:00
0399bbbfc8 [maven-release-plugin] prepare for next development iteration 2021-09-25 13:46:09 +02:00
90b051bfff [maven-release-plugin] prepare release pmd_releases/6.39.0 2021-09-25 13:46:04 +02:00
d6e2911b81 Merge pull request #3497 from adangel:fix-cpd
[core] Enable CPD check #3497
2021-09-23 10:47:26 +02:00
4377ca0ef9 [doc] Mention deprecation of Security Manager for AvoidAccessAlteration 2021-09-10 16:38:51 +02:00
64ef8957bc Fix code duplications 2021-09-07 20:12:27 +02:00
3dd4eda7ea [java] AvoidAccessibilityAlteration: more tests for setAccessible(false) 2021-09-03 09:41:15 +02:00
83d56dab28 [java] AvoidAccessibilityAlteration: allow setAccessible(false)
This restores the cheks for the Java language access control.
2021-09-03 09:31:03 +02:00
1f520a9f6f [java] AvoidAccessibilityAlteration - improve rule message 2021-09-02 16:18:28 +02:00
c00d84aa9a [core] Fix XPath rulechain optimization bug
For XPath query "//dummyNode[ends-with(@Image,
'foo')][pmd-dummy:typeIs('bar')]"
we lost the first condition (ends-with...) and
only applied the second one (pmd-dummy:typeIs).
2021-09-02 16:18:03 +02:00
e6d2b5815f [java] AvoidAccessibilityAlteration: add tests and fix rule 2021-08-30 20:21:33 +02:00
65af1c0675 [maven-release-plugin] prepare for next development iteration 2021-08-28 17:27:18 +02:00
7d11a02052 [maven-release-plugin] prepare release pmd_releases/6.38.0 2021-08-28 17:27:12 +02:00
b2adc915bb Merge pull request #3447 from oowekyala:issue3446-apex-file-name
[core] Add access to file name in XPath rules #3447
2021-08-22 14:37:29 +02:00
7e15f1781c [java] Suppress ReturnEmptyCollectionRatherThanNull violations
in InferenceRuleType - as null is used as a additional value...
and null/empty is different.
2021-08-19 18:38:58 +02:00
e64d485384 Add xpath function for file name 2021-08-08 14:40:25 +02:00
b9d3685b10 Fix java test 2021-08-07 14:54:26 +02:00
8153ce9a7a [java] fix MethodNamingConventions test 2021-08-06 15:14:47 +02:00
8acb7dc781 [java] Update tests for MethodNamingConventions 2021-08-06 14:56:19 +02:00
f76c5eec1a [java] Update rule MethodNamingConventions 2021-08-06 14:43:39 +02:00
821f7a849b [maven-release-plugin] prepare for next development iteration 2021-07-31 19:02:07 +02:00
18df47ce6e [maven-release-plugin] prepare release pmd_releases/6.37.0 2021-07-31 19:01:59 +02:00
7f537581d2 Merge pull request #3428 from adangel:issue-3420-inefficientstringbuffering
[java] Fix NPE in InefficientStringBuffering with Records #3428
2021-07-30 12:13:07 +02:00
b47db0a151 Merge branch 'master' into issue-3366-support-jdk-17 2021-07-30 11:16:53 +02:00
30124628f7 [java] Disallow local sealed/non-sealed classes
This is apparently not valid.
2021-07-30 11:06:51 +02:00
d641b3a506 [java] Add simple rule test for latest java version
This fixes some parsing errors in java files under
src/test/resources
2021-07-30 10:32:01 +02:00
03d8728b1e [java] NPE in InefficientStringBuffering with Records
Fixes #3420
2021-07-29 18:40:06 +02:00
05f2bd6b06 Merge branch 'master' into pr-3365 2021-07-29 17:05:43 +02:00
ee4cbae4ac [java] Deprecate rule BooleanInstantiation 2021-07-29 17:01:36 +02:00
33f9ff3394 [java] Integrate BooleanInstantiation into PrimitiveWrapperInstantiation 2021-07-29 16:58:26 +02:00
d1a21b128a Merge branch 'master' into pr/3393 2021-07-29 13:19:46 +02:00
cf4b44ec0f Merge branch 'master' into pr/3415 2021-07-29 13:18:17 +02:00
2f9aa60aae [doc] Fix rule references 2021-07-29 10:56:41 +02:00
5ace072df2 Merge branch 'master' into isue2908-merge-junit-rules 2021-07-24 15:56:28 +02:00
4306d0d108 [core] Fix LanguageVersion compareTo
This didn't work with java 9 compared to java 10,
as the full name was compared ("Java 9" vs. "Java 10")
as a string rather than using version numbers.

Now the logic is much simpler: The versions defined
for a language are ordered, new versions are always added
at the end.

Also backports the useful method "compareToVersion" from pmd 7
and use this in the rules BigIntegerInstatiation and
UnnecessaryWrapperObjectCreation.
2021-07-23 09:55:17 +02:00
4a81ec4357 [java] Change how "case null" is parsed 2021-07-22 10:29:11 +02:00
7f84db3223 [java] Fix javadoc in ASTGuardedPattern
Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
2021-07-22 09:58:30 +02:00
66b642c8c6 [java] Add support for @ParenthesisDepth in Patterns 2021-07-22 09:56:08 +02:00
bccca39dcd Merge branch 'master' into issue-3366-support-jdk-17 2021-07-22 09:17:21 +02:00
9f84438027 Merge branch 'master' into pr/3411 2021-07-16 17:32:19 +02:00
161c9f4923 [doc] Update release notes (#3382) 2021-07-16 11:57:50 +02:00
7b6dad43d5 [java] Rename rule MissingBreakInSwitch to ImplicitSwitchFallThrough
Fixes #3361
2021-07-16 11:44:57 +02:00
2c8dbea5a7 SimplifiableTestAssertion: Stop looking for test annotations to find methods
We now focus on what method is called. This whole logic
should be torn off in the pmd 7 branch and replaced by
invocation matchers
2021-07-11 18:18:21 +02:00
9b9ce19975 Update pmd-java/src/main/resources/category/java/errorprone.xml
Add reference to Effective Java
2021-07-10 16:41:20 -03:00
ec27419235 [java] Fix NPE in UseTryWithResources 2021-07-10 10:46:31 +02:00
f8f6391eb6 [java] UseTryWithResources false positive with not local vars
when closeable is provided as a method argument or class field
Fixes #3235
2021-07-08 15:06:52 +02:00
6266b1ce03 [java] Reimplement UseTryWithResources as Java rule 2021-07-08 12:26:50 +02:00
9601b91fa5 Update quickstart ruleset 2021-07-05 18:17:26 -03:00
e27883666c [java] New ReturnEmptyCollectionRatherThanNull rule
- Deprecate the old ReturnEmptyArrayRatherThanNull, and supersede it
with a new rule that contmplates not only arrays, but all members of the
Java Collection Framework (Maps, Lists, Sets and even the legacy Vector
and Hashtable).
2021-07-05 18:07:42 -03:00