Commit Graph

3665 Commits

Author SHA1 Message Date
033e817ed6 [java] LooseCoupling - backport test case (#3672) 2021-12-02 16:56:24 +01:00
2d3e9d2f37 [java] Backport test cases (#3668, #3671) 2021-12-02 16:29:14 +01:00
e1387951bd [java] ClassWithOnlyPrivateConstructorsShouldBeFinal - add test case
from #3668
2021-12-01 12:33:55 +01:00
898331165f Merge pull request #3666 from adangel:close-resource-local-record
[java] Local records are a find boundary #3666

* pr-3666:
  [java] Local records are a find boundary
2021-12-01 09:36:14 +01:00
c9c7d05ac7 [java] UnusedLocalVariable - add test case from #3656 2021-12-01 09:05:41 +01:00
74aa2772bf [java] Local records are a find boundary
This fixes a ClassCastException in CloseResource
2021-11-30 16:29:13 +01:00
3a97618d5d [maven-release-plugin] prepare for next development iteration 2021-11-27 11:21:17 +01:00
ac68de1f51 [maven-release-plugin] prepare release pmd_releases/6.41.0 2021-11-27 11:21:12 +01:00
3f9805882f Merge pull request #3638 from
adangel:issue-3595-primitivewrapperinstantiation

[java] Fix PrimitiveWrapperInstantion false negative with new Boolean
#3638

* pr-3638:
  [java] Fix PrimitiveWrapperInstantion false negative with new Boolean
2021-11-26 09:11:27 +01:00
c6635b4942 Merge pull request #3621 from adangel:java-rule-improvements-3
[java] Rule improvements part 3 #3621

* pr-3621:
  [doc] Update release notes (#3620)
  [java] CheckSkipResult - use rulechain
  [java] AvoidUsingOctalValues - use rulechain
  [java] AvoidMultipleUnaryOperators - remove unnecessary super
  [java] SwitchDensity - use super.visit
  [java] SingularField - fix false negative with anonymous classes
2021-11-26 08:47:58 +01:00
af3c3fb9cb Merge pull request #3619 from adangel:java-rule-improvements-2
[java] Rule improvements part 2 #3619

* pr-3619:
  [java] MethodReturnsInternalArray - add test case (#3630)
  [doc] Update release notes (#3618)
  [java] ExceptionAsFlowControl - use rulechain
  [java] CouplingBetweenObjects - consider nested classes in interfaces
  [java] UnnecessaryReturn - use rulechain
  [java] UnnecessaryFullyQualifiedName - remove unnecessary super
  [java] UseCollectionIsEmpty - use rulechain
  [java] UnusedFormalParameter - fix false negative with anonymous
classes
  [java] MethodReturnsInternalArray - use rulechain
2021-11-26 08:46:28 +01:00
2d76292ae8 Merge pull requets #3615 from adangel:java-rule-improvements-1
[java] Rule improvements part 1 #3615

* pr-3615:
  [java] JUnitAssertionsShouldIncludeMessage false positive
  [java] Rewrite JUnitAssertionsShouldIncludeMessage to fix false
negatives
  [java] TestClassWithoutTestCases - add test for #3624
  [java] Rewrite TestClassWithoutTestCases to fix false positives
  [doc] Update release notes (#3613, #3614)
  [java] LooseCoupling - use rule chain
  [java] Refactor AbstractJUnitRule
  [java] JUnitTestsShouldIncludeAssert - support nested test classes
  [java] ArrayIsStoredDirectly - fix false negative with nested classes
  [java] AccessorMethodGeneration - use rulechain
2021-11-26 08:44:36 +01:00
d5df3bf573 Merge branch 'master' into pr-3600 2021-11-25 11:03:38 +01:00
1393e7d830 [java] UselessStringValueOf - skip String.valueOf with more than one arg 2021-11-18 17:48:44 +01:00
3374983be9 [java] Fix PrimitiveWrapperInstantion false negative with new Boolean
Fixes #3595
2021-11-18 12:10:35 +01:00
ce15c11b19 [java] JUnitAssertionsShouldIncludeMessage false positive 2021-11-15 19:45:02 +01:00
48714f8161 [java] MethodReturnsInternalArray - add test case (#3630) 2021-11-15 19:20:41 +01:00
d9b6eb45b9 [java] Rewrite JUnitAssertionsShouldIncludeMessage to fix false
negatives

Not extending AbstractJUnitRule anymore
2021-11-15 19:04:07 +01:00
956077f4d4 [java] TestClassWithoutTestCases - add test for #3624 2021-11-14 19:58:05 +01:00
b1a294f170 [java] Rewrite TestClassWithoutTestCases to fix false positives
Reusing visitors is a bad idea...
Providing new utility methods in AbstractJUnitRule.
2021-11-13 12:24:18 +01:00
9747f76f5c [java] CheckSkipResult - use rulechain
While there is no fixed false negative, this is more correct
and in PMD 7, rule chain is already used.
2021-11-13 11:29:21 +01:00
62dd4c89fd [java] AvoidUsingOctalValues - use rulechain
While there is no fixed false negative, this is more correct
and in PMD 7, rule chain is already used.
2021-11-13 11:26:40 +01:00
3957a8f46c [java] AvoidMultipleUnaryOperators - remove unnecessary super 2021-11-13 11:24:56 +01:00
008141cd92 [java] SwitchDensity - use super.visit
There are no fixed false negatives, but it looks more correct.
2021-11-13 11:21:33 +01:00
85f67d7e24 [java] SingularField - fix false negative with anonymous classes 2021-11-13 11:14:20 +01:00
7b4f26cd4d [java] ExceptionAsFlowControl - use rulechain
While there is no fixed false negative, this is more correct.
2021-11-13 10:04:51 +01:00
2128ce824a [java] CouplingBetweenObjects - consider nested classes in interfaces 2021-11-13 10:00:38 +01:00
a44491cbb8 [java] UnnecessaryReturn - use rulechain
While there is no fixed false negative, this is more correct
and in PMD 7, rule chain is already used.
2021-11-13 09:46:35 +01:00
ee580fc47a [java] UnnecessaryFullyQualifiedName - remove unnecessary super 2021-11-13 09:31:02 +01:00
e2bb172588 [java] UseCollectionIsEmpty - use rulechain
While there is no fixed false negative, this is more correct
and in PMD 7, rule chain is already used.
2021-11-13 09:26:09 +01:00
485c8d97b6 [java] UnusedFormalParameter - fix false negative with anonymous classes 2021-11-12 12:22:15 +01:00
5c4ff57874 [java] MethodReturnsInternalArray - use rulechain
Fixes a false negative when defining a class inside
a interface.
2021-11-12 12:04:06 +01:00
c344b8b389 [java] LooseCoupling - use rule chain
While there is no fixed false negative, this is more correct
and in PMD 7, rule chain is already used.
2021-11-12 11:39:24 +01:00
732a97048b [java] Refactor AbstractJUnitRule 2021-11-12 11:28:33 +01:00
d164f7d884 [java] JUnitTestsShouldIncludeAssert - support nested test classes 2021-11-12 10:35:01 +01:00
83eebb4fb3 [java] ArrayIsStoredDirectly - fix false negative with nested classes 2021-11-12 09:15:32 +01:00
3bf755ee37 [java] AccessorMethodGeneration - use rulechain
While there is no fixed false negative, this is more correct
and in PMD 7, rule chain is already used.
2021-11-12 09:04:49 +01:00
668136cfbc Created fix for UselessStringValueOf false positive 2021-11-11 19:15:21 -06:00
206b657709 seperate and current work 2021-11-06 13:20:36 -05:00
e7d8b8ad28 add additional unit tests regarding long options, successfully implement the feature https://github.com/pmd/pmd/issues/3424 and https://github.com/pmd/pmd/issues/3425, and compile and build the project 2021-11-03 14:02:27 -05: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