Commit Graph
5869 Commits
Author SHA1 Message Date
Andreas Dangel 072f4a8124 Add additional test case 2021-05-18 19:46:55 +02:00
Andreas Dangel 7346c4974c [java] Update rule InsufficientStringBufferDeclaration 2021-05-14 17:03:51 +02:00
Andreas Dangel 399106116f Merge pull request #3253 from oowekyala:update-UseDiamondOperator
[java] Update rule UseDiamondOperator #3253
2021-05-13 11:18:25 +02:00
Andreas Dangel 5b814aa4b1 Merge pull request #3270 from oowekyala:java-classpath-resilience
[java] Improve resilience to broken classpath #3270
2021-05-13 10:49:19 +02:00
Clément Fournier 4e9d06b8da Add wrap function for ContextedRuntimeException 2021-05-10 21:49:00 +02:00
Andreas Dangel 497cf39e32 Merge branch 'master' into pmd/7.0.x 2021-05-10 20:33:26 +02:00
Andreas Dangel 9c7286bcf2 Merge pull request #3264 from oowekyala:issue2780-doc-DataClass
[java] Fix #2780 DataClass example from documentation results in false
negative
2021-05-10 19:33:28 +02:00
Andreas Dangel 558a4056eb Merge pull request #3263 from
oowekyala:issue1175-UnusedPrivateMethod-MethodSource

[java] Fix #1175 - UnusedPrivateMethod FP with Junit 5 @MethodSource
2021-05-10 19:20:33 +02:00
Clément Fournier 27549ba430 Merge branch '7.0.x' into update-UseDiamondOperator 2021-05-09 17:24:48 +02:00
Clément Fournier dca0bf9545 Merge branch 'master' into fix-NPE-methodtyperesolution 2021-05-09 13:45:43 +02:00
Clément Fournier b166d8e231 Move test data class in dir ignored by checkstyle 2021-05-08 21:08:25 +02:00
Clément Fournier 04d9e8986b Merge branch '7.0.x' into java-classpath-resilience 2021-05-08 21:02:46 +02:00
Andreas Dangel baf929f178 Merge branch 'master' into pmd/7.0.x 2021-05-08 20:34:49 +02:00
Andreas Dangel 8208dc9cd6 Merge pull request #3259 from
oowekyala:issue2737-doc-SwitchStmtsShouldHaveDefault

[java] Fix misleading rule message on rule SwitchStmtsShouldHaveDefault
with non-exhaustive enum switch
2021-05-08 19:51:44 +02:00
Andreas Dangel c757369268 Merge pull request #3257 from
oowekyala:issue3248-doc-SingletonClassReturningNewInstance

[java] Fix #3248 - doc of SingletonClassReturningNewInstance
2021-05-08 19:33:06 +02:00
Andreas Dangel 96e9b46b81 Merge pull request #3256 from oowekyala:issue3236-literalsFirstInComparison-and-constants
[java] Fix LiteralsFirstInComparison ignoring constants
2021-05-08 19:28:00 +02:00
Andreas Dangel 3f11c5b4de Merge branch 'master' into pr-3237 2021-05-08 18:54:31 +02:00
Clément Fournier 471ded7da7 Doc 2021-05-08 13:55:55 +02:00
Clément Fournier 43d9250503 Save 'broken' class files in regular source tree
Since we have the classpath abstraction, we can just
mask off some class files to get a broken classpath
for use in tests.
2021-05-08 12:44:34 +02:00
Clément Fournier fe304c12fa Fix test 2021-05-07 23:34:25 +02:00
Clément Fournier 7557357f4a More doc 2021-05-07 23:30:22 +02:00
Clément Fournier b594bb23fe Checkstyle + pmd 2021-05-07 23:18:26 +02:00
Clément Fournier 1c2604f770 Doc 2021-05-07 22:58:15 +02:00
Clément Fournier 8cec99fcb7 Fix bug with repeated withTypeArguments 2021-05-07 22:56:24 +02:00
Clément Fournier 6e9480bc9f Fix overriding test
previously this test was ill-posed. We had an unresolved List type,
and also, had a type param <S extends List<S>> which is an unsatisfiable
recursive bound.
2021-05-07 22:46:24 +02:00
Clément Fournier 658f689750 Format 2021-05-07 22:24:46 +02:00
Clément Fournier d4dd12b943 Make sure malformed types don't break algos 2021-05-07 19:11:55 +02:00
Clément Fournier 7eefea221d Add test for broken classpath 2021-05-07 17:43:21 +02:00
Clément Fournier 06f1b566bf Add classpath abstraction - meant to ease testing 2021-05-07 17:00:35 +02:00
Clément Fournier 371f83f3aa Fix context of relational exprs 2021-05-07 16:45:48 +02:00
Clément Fournier 495c120ed9 Improve error messages when an AssertionError occurs
Prints eg

net.sourceforge.pmd.internal.util.ContextedAssertionError: Detail message
Exception Context:
	[1:Rule applied on node=[CastExpression:92:53](long ) (2 * (4 / 2 ) )]
2021-05-07 16:38:19 +02:00
Andreas Dangel d7b01ced47 [java] Catch TypeNotPresentExceptions, fix NPE in MethodTypeResolution 2021-05-07 16:19:22 +02:00
Clément Fournier df3c3c2547 Fix wrong syntax in UnusedPrivateMethod 2021-05-07 15:19:25 +02:00
Clément Fournier 435df090e7 Checkstyle 2021-05-07 15:04:09 +02:00
Clément Fournier cb7a455c14 Fix context problem,
do inference for entire subtree instead of just one level
2021-05-07 15:01:54 +02:00
Clément Fournier ed99668be8 Merge branch '7.0.x' into update-UseDiamondOperator 2021-05-07 13:28:59 +02:00
Clément Fournier 00a087774a Fix tests of LocalVariableCouldBeFinal
The rule ignores unused variables since 7.0.0

Refs #3266
2021-05-07 13:00:41 +02:00
Clément Fournier 63e06eb005 Remove unresolved reference 2021-05-07 12:57:37 +02:00
Clément Fournier a8716a13f9 Merge branch 'master' into 7.0.x 2021-05-07 12:39:00 +02:00
Clément Fournier abc86702a2 Merge branch 'master' into pr/3262 2021-05-07 12:31:35 +02:00
Clément Fournier a99dfdb41b Merge branch 'pr/3265' 2021-05-07 12:12:22 +02:00
Andreas Dangel db244b0e3b [doc] Update release notes, refs #3266 2021-05-06 15:49:29 +02:00
Andreas Dangel 68c2b9954e [java] LocalVariableCouldBeFinal - fix FN with interfaces, anon classes 2021-05-06 15:44:33 +02:00
Andreas Dangel d3c1dbeb47 [doc] Update release notes, refs #3265 2021-05-06 15:40:47 +02:00
Andreas Dangel 150fec0f6f [java] AvoidReassigningLoopVariables - add more test cases 2021-05-06 15:32:09 +02:00
Andreas Dangel d48cee2258 [java] MethodArgumentCouldBeFinal - fix FN with interfaces 2021-05-06 15:31:43 +02:00
Clément Fournier e73b5484a0 Fix #2780 DataClass example from documentation results in false negative 2021-05-06 15:02:12 +02:00
Andreas Dangel ea35221739 [java] FieldDeclarationsShouldBeAtStartOfClass - FN with anon classes 2021-05-06 14:51:31 +02:00
Clément Fournier ddde7cf484 Fix #1175 - UnusedPrivateMethod FP with Junit 5 @MethodSource 2021-05-06 14:48:21 +02:00
Clément Fournier 6c9ae9b837 Typo 2021-05-06 14:08:39 +02:00