Commit Graph

3095 Commits

Author SHA1 Message Date
e51519c5fd [java] Support Records with Java 15 Preview 2020-08-13 20:42:08 +02:00
e596a67297 [java] Support Pattern Matching for instanceof with Java 15 Preview. 2020-08-13 20:11:25 +02:00
40f0eedf88 [java] Text Blocks are now a permanent language feature with JDK 15 2020-08-13 20:05:54 +02:00
2a2fa20883 [java] Update ASM for bytecode parsing 2020-08-13 19:29:45 +02:00
02a78f5bea [java] Add versions 15 (new default) and 15-preview, remove 13-preview 2020-08-13 19:15:02 +02:00
575d1262a9 Merge branch 'pr-2659' into master
[java] StringToString can not detect the case: getStringMethod().toString() #2659
2020-08-13 18:29:13 +02:00
278e4f3414 Fix pmd, add missing test classes for typeres 2020-08-13 17:00:34 +02:00
c48f407e28 [java] StringToString: fix impl for method calls as args 2020-08-13 15:52:09 +02:00
7765ee178a [java] StringToString: Add more tests 2020-08-13 15:50:37 +02:00
bb8edec8c9 Merge branch 'pr-2703' into master
[java] Fix UnusedAssignment FP with methods throwing exceptions #2703
2020-08-13 12:23:56 +02:00
fdf652e032 [java] UnusedAssignment: ignore params of native methods 2020-08-13 10:40:45 +02:00
5564d89e18 Cleanup useless thing 2020-08-06 17:51:19 +02:00
682fa0a3b3 Fix UnusedAssignment FP with methods throwing exceptions 2020-08-06 17:40:48 +02:00
7c9c6e128d Skip abstract methods in UnusedAssignment 2020-08-06 15:32:05 +02:00
5631a72922 [java] StringToString - compare subtypes of arguments/parameters 2020-08-06 11:14:56 +02:00
0a7d3ff922 Merge branch 'pr-2690'
[core] Fix java7 compatibility #2690
2020-08-06 10:25:48 +02:00
942ec01e8f Merge branch 'master' into kotlin-license-headers 2020-08-03 23:00:08 +02:00
8782eaeb1a Merge branch 'pr-2681'
[core] Deprecate DFA #2681
2020-08-02 17:04:44 +02:00
dafacf3d78 [doc] Use rule tags 2020-08-02 17:02:12 +02:00
54637c60ec [core] Remove dependency to commons text, it is actually not needed
Escaping in CDATA section is not necessary.
2020-08-02 12:28:21 +02:00
33e0239243 StringToString: return type null check 2020-08-01 15:59:00 +03:00
32a8c042e3 StringToString: NPE at method param type fix 2020-08-01 15:13:20 +03:00
acf58f1887 Check for license headers in kotlin source files 2020-07-31 20:26:27 +02:00
f975ebf7b3 [java] AvoidReassigningCatchVariables: fix missing lang attr, add to quickstart 2020-07-31 12:34:50 +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
b48da45701 [java] StringToString can not detect the case: getStringMethod().toString() 2020-07-31 10:57:03 +03: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
091bff7793 Deprecate java stuff 2020-07-28 23:43:47 +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