Commit Graph

3626 Commits

Author SHA1 Message Date
5c4ff57874 [java] MethodReturnsInternalArray - use rulechain
Fixes a false negative when defining a class inside
a interface.
2021-11-12 12:04:06 +01:00
f12710071f [maven-release-plugin] prepare for next development iteration 2021-10-30 10:00:20 +02:00
be09a31654 [maven-release-plugin] prepare release pmd_releases/6.40.0 2021-10-30 10:00:15 +02:00
ac26d3dc6d Merge pull request #3584 from adangel:issue-3563-classnamingconventions
[java] ClassNamingConventions: Disable utilityClassPattern by default
#3584
2021-10-29 19:16:58 +02:00
9a07b81612 Merge pull request #3544 from adangel:issue-3368-hardcoded-crypto-key
[java] HardcodedCryptoKey false negative with variable assignments #3368

* pr-3544:
  Simplify getUsages call
  Fix stack overflow error
  [java] HardcodedCryptoKey false negative with variable assignments
#3368
2021-10-29 19:14:31 +02:00
ec164b4bf0 Simplify getUsages call
Co-authored-by: Clément Fournier <clement.fournier76@gmail.com>
2021-10-29 19:12:17 +02:00
15270c8bd9 Merge pull request #3543 from adangel:issue-3542-missing-override-enum
[java] MissingOverride: False negative for enum method #3542
2021-10-29 19:07:49 +02:00
3093013ff7 [java] ClassNamingConventions: Disable utilityClassPattern by default
- Fixes #1595
- Fixes #3563
2021-10-25 18:37:08 +02:00
5c9581113a Merge pull request #3561 from
essobedo:3560/block-lambda-InvalidLogMessageFormat

[java] InvalidLogMessageFormat: False positive with message and
exception in a block inside a lambda #3561
2021-10-16 09:39:02 +02:00
afab7d7881 [java] InvalidLogMessageFormat: False positive with message and exception in a block inside a lambda 2021-10-15 16:02:57 +02:00
becd447a4a update testcase 2021-10-09 16:49:53 +03:00
83dfeb5533 Ignore AddEmptyString rule in annotations 2021-10-09 16:37:08 +03:00
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
a1a358619c [java] MissingOverride: False negative for enum method #3542
Improves type resolution to support enum constants
2021-10-07 18:31:03 +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