Commit Graph

3072 Commits

Author SHA1 Message Date
08b922429c [java] Catch possible LinkageErrors for other rules 2020-07-31 12:23:59 +02:00
693613a6a8 [java] ImportWrapper - catch and report LinkageErrors 2020-07-31 12:13:24 +02:00
4ce394eca3 [java] ImportWrapper - only consider static fields/methods
Fixes #2663
2020-07-31 11:45:17 +02:00
91579173fd [java] Formatting of rule doc of AvoidReassigningCatchVariables 2020-07-31 11:12:57 +02:00
9b6dcfef3a Merge branch 'pr-2682'
[java] New Rule: AvoidReassigningCatchVariables #2682
2020-07-31 11:00:18 +02:00
c447319fbe [doc] Update release notes and new rules
Fixes #2471
Refs #2682
2020-07-31 10:59:00 +02:00
207d9c544c Merge branch 'pr-2679'
[java] InvalidLogMessageFormatRule throws IndexOutOfBoundsException when only logging exception message #2679
2020-07-31 10:52:56 +02:00
c50f36e2ce Merge branch 'pr-2678'
[java] AvoidCatchingThrowable can not detect the case: catch (java.lang.Throwable t) #2678
2020-07-31 10:37:34 +02:00
d8642de069 Merge branch 'pr-2670'
[java] UnusedAssignment false positive with leaking this in constructor #2670
2020-07-30 21:46:55 +02:00
a5eb60243d [java] Deprecate ASTThrowStatement#getFirstClassOrInterfaceTypeImage()
Refs #2665
2020-07-30 11:37:29 +02:00
5bff6ac52e Merge branch 'pr-2657'
[lang-test] Upgrade kotlintest to Kotest #2657
2020-07-30 10:31:43 +02:00
eb683569af Merge branch 'pr-2617'
[core] Deprecate missing language attribute on rule definition #2617
2020-07-30 10:19:03 +02:00
bd2cd1b263 [java] AvoidReassigningCatchVariables 2020-07-29 20:20:22 +03:00
6fd5d7c66b Merge branch 'master' into red_field_init 2020-07-29 15:00:46 +02:00
c0eba42f29 [java] InvalidLogMessageFormatRule throws IndexOutOfBoundsException when only logging exception message 2020-07-28 18:57:29 +03:00
91b942b1dc [java]AvoidCatchingThrowable can not detect the case: catch (java.lang.Throwable t) 2020-07-28 17:11:14 +03:00
a707d94513 [java] RedundantFieldInitializer can not detect a special case for char initialize: char foo = '\0'; 2020-07-28 15:54:01 +03:00
c737b194f5 Ignore threading
We consider that reaching field defs are observable
at the point of the leak. But we assume the ctor
executes atomically, so following def chains work
normally.

Maybe, if the field is volatile, we should be more
conservative and assume that all its assignments after
any leak are observable. This looks very rare though
2020-07-27 17:02:22 +02:00
554c8031ee Handle this reference leak in ctor 2020-07-27 16:15:47 +02:00
fe82f6a448 Dogfood - update PMD to 6.26.0, update build-tools 2020-07-25 15:27:24 +02:00
49ab75aeb7 [maven-release-plugin] prepare for next development iteration 2020-07-25 13:45:36 +02:00
a9632e2a06 [maven-release-plugin] prepare release pmd_releases/6.26.0 2020-07-25 13:45:27 +02:00
0738797738 Merge branch 'pr-2658'
[core][java] Deprecate pmd-core::lang.rule.ImportWrapper #2658
2020-07-24 09:47:32 +02:00
e4b2c4ccbd Merge branch 'pr-2632'
[java] ArrayIsStoredDirectly false positive with private constructor/… #2632
2020-07-24 09:45:29 +02:00
4444ef279d Merge branch 'pr-2631'
[java] NPathComplexity can't handle switch expressions #2631
2020-07-24 09:42:58 +02:00
2fad9acfbd Merge branch 'master' into issue-2546 2020-07-23 15:52:30 +02:00
fce20e0b7c Merge branch 'master' into issue-2181 2020-07-23 15:49:54 +02:00
6a9a834c67 Same for NPath 2020-07-23 14:51:26 +02:00
9a47d658e6 Handle switch exprs properly 2020-07-23 14:42:29 +02:00
fbeaa5bc74 Merge branch 'master' into issue-2625 2020-07-23 14:26:33 +02:00
d239987d26 Merge branch 'master' into issue-2615 2020-07-23 14:15:47 +02:00
62666213ba Deprecate pmd-core::lang.rule.ImportWrapper 2020-07-23 11:15:03 +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
7941d8d610 Merge branch 'master' into issue-2625 2020-07-23 09:57:57 +02:00
677bfd4ae4 [java] Added additional test case for CycloMetric
And fixed comments in test cases

Refs #2631
2020-07-23 09:46:50 +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
6d73eaf3c7 Fix custom parser spec
Add kotest-runner-junit5-jvm as a dependency,
in pmd-java. This makes kotest discoverable
as Junit tests, which IDEs can pick up on (at
least IntelliJ does).

Update kotlin version to latest stable (1.3.72)
2020-07-20 16:33:29 +02:00
68ae318f02 Update to kotest 2020-07-20 00:12:40 +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