Commit Graph

3029 Commits

Author SHA1 Message Date
d239987d26 Merge branch 'master' into issue-2615 2020-07-23 14:15:47 +02:00
5c1a11c0b4 Merge branch 'pr-2652'
[java] UseCollectionIsEmpty can not detect the case this.foo.size() #2652
2020-07-23 10:47:02 +02:00
6b44e326ce [java] UseCollectionIsEmpty: improve test cases 2020-07-23 10:44:22 +02:00
ed77b3dc46 Merge branch 'pr-2651'
[java] False negative: LiteralsFirstInComparisons for methods... (2569) #2651
2020-07-23 10:15:09 +02:00
66d243efa1 [java] LiteralsFirstInComparison: additional test case 2020-07-23 10:10:26 +02:00
c351314f30 LiteralsFirstInComparisonsRule: ignore two string literals comparison 2020-07-22 13:46:08 +03:00
d03640b25e Merge branch 'pr-2641'
[java] AvoidThrowingNullPointerException marks all NullPointerException… #2641
2020-07-21 19:57:29 +02:00
892b16c805 AvoidThrowingNullPointerException: isNullPointerException usage fix 2020-07-21 15:56:44 +03:00
68f90687af AvoidThrowingNullPointerException: NPE instances tracking fix 2020-07-21 14:54:23 +03:00
2e9f5ad897 Merge branch 'master' into issue-2615 2020-07-20 16:36:16 +02:00
25405eb870 Merge branch 'pr-2643'
[java] AvoidCallingFinalize detects some false positives (2578) #2643
2020-07-17 20:30:01 +02:00
db21d589d4 [java] AvoidCallingFinalizeRule - use rulechain
And improve tests
2020-07-17 20:28:55 +02:00
585b9099ca Merge branch 'pr-2640'
[java] NullPointerException in rule ProperCloneImplementation #2640
2020-07-17 19:47:30 +02:00
74fb7ba1fb [java] UseCollectionIsEmpty can not detect the case this.foo.size() (2543) 2020-07-17 16:30:37 +03:00
7b3d31246e Merge branch 'master' into pr-2624 2020-07-17 15:16:24 +02:00
7ae424a35b Add deprecation javadocs 2020-07-17 14:43:43 +02:00
e24a26e211 Merge branch 'pr-2629'
[all] Dependencies cleanup #2629
2020-07-17 12:07:03 +02:00
94afdb117d Add test engines as surefire plugin dependencies
This removes junit-vintage-engine as a test dependency
as well as kotlintest-runner-junit5.
The engines are only needed during test execution, but should
not be available for test compilation.

For this to work, the latest surefire plugin is required.
2020-07-17 12:03:45 +02:00
01e48c882b AvoidCallingFinalize: expected lines added to test 2020-07-17 11:05:55 +03:00
9887d5a387 Merge branch 'pr-2618'
[java] New rule: UnusedAssignment #2618
2020-07-16 19:56:22 +02:00
88ac918e4f [java] UnusedAssignmentRule - add rule chain visit 2020-07-16 19:53:41 +02:00
a8a3fccdf5 [doc] Update release notes, new rule UnusedAssignment 2020-07-16 19:22:38 +02:00
9bbb6aab4d AvoidCallingFinalize: constructor false negative fix 2020-07-16 19:21:22 +03:00
a3670e4135 [java] False negative: LiteralsFirstInComparisons for methods returning Strings (2569) 2020-07-16 18:10:36 +03:00
24af109454 Merge branch 'master' into pr-2560 2020-07-16 13:17:45 +02:00
693c870f28 [java] LawOfDemeter - add test cases 2020-07-16 13:12:17 +02:00
65e37cadca AvoidThrowingNullPointerException: addViolation usage fix 2020-07-16 12:37:01 +03:00
2eedff056c AvoidCallingFinalize: addViolation, getArgsCount fix 2020-07-16 11:55:09 +03:00
a60615f542 [java] AvoidInstantiatingObjectsInLoopsRule - add test case for fixed FN
By changing this rule to use rule chain, this FN for anonymous classes
has been fixed as well.
2020-07-16 10:39:30 +02:00
5a6e3d609e [java]AvoidCallingFinalize detects some false positives (2578) 2020-07-15 15:44:54 +03:00
061c9656cc [java]AvoidThrowingNullPointerException marks all NullPointerException objects as wrong, whether or not thrown (2580) 2020-07-14 15:53:26 +03:00
782cb9d262 [java] NullPointerException in rule ProperCloneImplementation 2020-07-14 14:00:42 +03:00
cc408d2876 [java] AvoidInstantiatingObjectsInLoopsRule - fix false negative 2020-07-13 20:00:46 +02:00
c5364a81f8 [java] Fix and simplify AvoidInstantiatingObjectsInLoopsRule 2020-07-09 18:55:10 +02:00
e48489450f [java] Add test for #2207: AvoidInstantiatingObjectsInLoops false positives 2020-07-09 18:54:53 +02:00
8766d54a07 [java] Fix and simplify UseStringBufferForStringAppendsRule 2020-07-09 16:08:30 +02:00
6f6f87c7dc [java] Add test for #1736: UseStringBufferForStringAppends false positive 2020-07-09 15:21:36 +02:00
e6c32ecbaa Update UseStringBufferForStringAppendsRule.java 2020-07-09 15:12:32 +02:00
b782575951 Update AvoidInstantiatingObjectsInLoopsRule.java 2020-07-09 15:12:32 +02:00
6cff647681 fix issue #2207 2020-07-09 15:11:03 +02:00
f5ccc94130 fix issue #1736 2020-07-09 15:11:00 +02:00
11a0ec51fd fix issue 1736 2020-07-09 15:10:40 +02:00
2e006697e0 [core] Refactor XMLRenderer to use XMLStreamWriter
In order to properly support different encodings, a OutputStream
is needed. Then Java will take care of unmappaple characters
and encode them as entities for XML.

For backwards compatibility, a writer is still created and exposed.
2020-07-09 10:56:44 +02:00
d927973244 [core] PMD XMLRenderer - correctly support encoding
The XMLRenderer uses by default UTF-8 encoding, but the
writer uses the system default encoding, which doesn't work
well together.

Provide new experimental API Renderer::setReportFile, so that
renderer implementations can create their own writers.
The default implementation in AbstractRenderer is backwards compatible.
2020-07-05 14:21:46 +02:00
370c0b0b6d Remove unused dependency, explicitly declare used dependencies 2020-07-02 15:12:31 +02:00
c7ccb8a087 javacc is only needed during parser generation 2020-07-02 10:27:26 +02:00
43dd6567e2 [java] Update test dependency log4j
This fixes https://github.com/advisories/GHSA-vwqq-5vrc-xw9h
2020-07-02 10:13:08 +02:00
f4bf540bc3 [java] Remove usages of DummyJavaNode 2020-07-02 09:48:23 +02:00
49635c2a66 Deprecate Rulechain visitors 2020-07-01 11:27:38 +02:00
659066ee02 Deprecate BaseLanguageModule constructor 2020-07-01 11:27:38 +02:00