Clément Fournier
e63edf358e
[java] Fix #5263 - UnnecessaryFullyQualifiedName FP with forward reference.
2024-11-21 15:26:54 +01:00
Clément Fournier
0d11f151bd
[java] Add more details to parse failures in signatures
2024-11-21 14:55:51 +01:00
Juan Martín Sotuyo Dodero
e60f460e02
Merge branch 'pr-5340'
2024-11-15 18:40:37 -03:00
Juan Martín Sotuyo Dodero
15cab177d2
Remove added test
2024-11-15 18:30:03 -03:00
Juan Martín Sotuyo Dodero
b6f45ed618
Ensure types don't match
2024-11-15 17:55:07 -03:00
Juan Martín Sotuyo Dodero
1ceae38880
[java] TooFewBranchesForSwitch - allow list of case constants ( #5289 )
2024-11-15 13:48:50 -06:00
Juan Martín Sotuyo Dodero
f7de8d3e7e
Merge branch 'pr-5331'
2024-11-15 16:47:09 -03:00
Juan Martín Sotuyo Dodero
aad8e93a2f
Add test case ensuring we don't incur in FNs
2024-11-15 16:13:44 -03:00
Clément Fournier
b264fa14e1
Fix #5083 - mref without target type but with exact method
...
has compile time decl
2024-11-15 16:36:52 +01:00
Clément Fournier
c1aa4e0381
Merge branch 'main' into typeres-problem-with-unchecked-conversion
2024-11-15 16:18:22 +01:00
Clément Fournier
a72ac5845b
Add test for #5113
2024-11-15 16:16:08 +01:00
Juan Martín Sotuyo Dodero
4e1f4be009
Merge branch 'main' into issue-5287
2024-11-15 08:51:52 -06:00
Clément Fournier
5931b6601c
[java] Fix #5097 - problem with unchecked conversion
2024-11-15 15:27:55 +01:00
Andreas Dangel
d60b234a47
Merge branch 'main' into issue-5314
2024-11-14 19:47:41 +01:00
Andreas Dangel
3fdbf7d6cb
[java] InsufficientStringBufferDeclaration: Fix CCE for Character
...
Fixes #5314
2024-11-14 17:48:08 +01:00
Clément Fournier
bf388d7fd0
Propagate unknown type better when mref is unresolved
2024-11-14 17:39:31 +01:00
Andreas Dangel
61eb116833
[java] PreserveStackTrace - consider instance type patterns
...
Fixes #5318
2024-11-14 17:39:07 +01:00
Clément Fournier
2df68ed168
Disable type inf logging by default
2024-11-14 16:32:09 +01:00
Clément Fournier
04dfb782f0
Merge branch 'typeres-fix-inference-issue'
2024-11-14 16:14:50 +01:00
Clément Fournier
a79d3e6557
Add unit tests
2024-11-14 16:13:30 +01:00
Andreas Dangel
e5a1236981
Update pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/UnusedPrivateMethod.xml
2024-11-14 15:48:47 +01:00
Clément Fournier
529693c916
[java] fix inference dependency issue
...
Reported in #5324
I improved the verbose logging output a bit so
some of the changes are not directly relevant.
2024-11-13 22:39:34 +01:00
Andreas Dangel
b05b8240a7
Merge branch 'main' into issue-5287
2024-11-07 19:51:00 +01:00
Andreas Dangel
ee7d6fed3e
[java] TooFewBranchesForSwitch - add test case from comment on #5311
2024-11-07 19:50:29 +01:00
Andreas Dangel
9dcb697f13
Improve DeadlockTest
2024-11-07 12:38:11 +01:00
Andreas Dangel
1ee6494429
[java] Fix #5293 : Parse number of type parameters eagerly
...
When creating a LazyClassSignature or LazyMethodType, make sure
to parse the number of type parameters eagerly, so that AstDisambiguationPass
can get this number without triggering additional parsing.
2024-11-04 11:23:49 +01:00
Andreas Dangel
a1996554d8
[java] Add DeadlockTest for verifying #5293
...
- Improve logging for Parselock
Refs #5293
2024-11-04 11:23:48 +01:00
Andreas Dangel
16eafc89c2
[java] TooFewBranchesForSwitch - allow list of case constants
...
Fixes #5287
2024-10-27 16:24:05 +01:00
Andreas Dangel
c179834288
[release] Prepare next development version [skip ci]
2024-10-25 09:28:54 +02:00
Andreas Dangel
7739f2b840
[release] prepare release pmd_releases/7.7.0
2024-10-25 09:07:54 +02:00
Andreas Dangel
e2d59c0e64
Fix #5244 : [java] UselessOperationOnImmutable: consider java.time.* types ( #5279 )
...
Merge pull request #5279 from adangel:issue-5244
2024-10-24 14:24:16 +02:00
Andreas Dangel
e6097d6090
[java] Rename rule SwitchStmtsShouldHaveDefault to NonExhaustiveSwitch ( #5267 )
...
Merge pull request #5267 from adangel:issue-4286
2024-10-24 14:21:04 +02:00
Andreas Dangel
62c2858f70
Fix #5257 : [java] NonCaseLabelInSwitch - support switch expressions ( #5256 )
...
Merge pull request #5256 from adangel:rename-nocaselabelswitch
2024-10-24 14:15:06 +02:00
Andreas Dangel
0d8878d58e
[java] Rename rule DefaultLabelNotLastInSwitch ( #5255 )
...
Merge pull request #5255 from adangel:rename-defaultlabelswitch
2024-10-24 14:10:16 +02:00
Andreas Dangel
4b23718aac
Fix #4813 : [java] SwitchStmtsShouldHaveDefault false positive with pattern matching ( #5252 )
...
Merge pull request #5252 from adangel:issue-4813
2024-10-24 14:08:12 +02:00
Andreas Dangel
36654ed52e
[java] UselessOperationOnImmutable: false positive on void results
2024-10-24 13:08:09 +02:00
Andreas Dangel
45b1217485
[java] TooFewBranchesForSwitch: don't report empty switch
...
Empty switch statements are already reported
by EmptyControlStatement
2024-10-24 12:51:42 +02:00
Andreas Dangel
662759755d
[java] SwitchStmtsShouldHaveDefault.xml: don't report empty switch
...
Empty switch statements are already reported
by EmptyControlStatement
2024-10-24 12:47:53 +02:00
Andreas Dangel
d9d6b57f2a
[java] TooFewBranchesForSwitch: report empty switch
...
This fixes a false negative
2024-10-24 12:38:45 +02:00
Andreas Dangel
6c35c73919
[java] SwitchStmtsShouldHaveDefault: use new PatternLabel attribute
2024-10-24 11:29:40 +02:00
Andreas Dangel
e37f82b62d
Merge branch 'main' into issue-4813
2024-10-24 11:24:17 +02:00
Andreas Dangel
6f5af6e585
[java] TooFewBranchesForSwitch: use new PatternLabel attribute
2024-10-24 11:22:47 +02:00
Andreas Dangel
66d879f707
Merge branch 'main' into issue-5249-5250
2024-10-24 11:20:39 +02:00
Andreas Dangel
93f6279ea7
Fix #3362 : [java] ImplicitSwitchFallThrough should consider switch expressions ( #5248 )
2024-10-24 10:46:59 +02:00
Andreas Dangel
156f293ef3
Fix #5030 : [java] SwitchDensity false positive with pattern matching ( #5247 )
2024-10-24 10:45:56 +02:00
Andreas Dangel
c95817a75d
Merge branch 'main' into issue-4813
2024-10-22 20:55:38 +02:00
Andreas Dangel
09b0864eff
Apply suggestions from code review
...
Co-authored-by: Clément Fournier <clement.fournier@tu-dresden.de>
2024-10-22 20:50:10 +02:00
Andreas Dangel
6d55f6f053
[java] UselessOperationOnImmutable: consider java.time.* types
...
Fixes #5244
2024-10-18 17:42:44 +02:00
Andreas Dangel
f4941433ce
Merge branch 'main' into rename-defaultlabelswitch
2024-10-18 16:39:12 +02:00
Andreas Dangel
ef0db9a166
Merge branch 'main' into issue-5249-5250
2024-10-18 16:30:01 +02:00