Juan Martín Sotuyo Dodero
44573d8bbe
[java] JUnitTestContainsTooManyAsserts uses XPath 2
...
- We are already using `pmd-java:typeIs`, so it's the correct thing to
do.
- Plus, this way it's 6X faster
2019-04-12 16:57:03 -03:00
Juan Martín Sotuyo Dodero
23185f9e6d
[java] Fix NPE in type resolution
...
- Fixes #1532
2019-04-12 14:45:53 -03:00
Juan Martín Sotuyo Dodero
bb1ede5598
Update changelog, refs #1691
2019-04-12 14:29:44 -03:00
Juan Martín Sotuyo Dodero
12afff4f5b
[java] Fix race conditions in JavaTypeDefinitionSimple
...
- The data is now a fixed-size array instead of a fixed-size arraylist,
this removes the need to manually add null elements all over.
- This in turn avoids the resizing / runtime exceptions under
multithreaded accesses.
- Take the change to fix the way `isGeneric` is resolved to be
consistent over time and correct.
- Fixes #1691
2019-04-12 14:29:26 -03:00
Andreas Dangel
96a14ede0a
Simplify test xml
...
CDATA is not necessary for test case descriptions
2019-04-05 14:44:45 +02:00
Björn Kautler
f3c0d39f66
Fix UseObjectForClearerAPI rule that treated String and String[] the same
2019-04-03 12:00:40 +02:00
Björn Kautler
06625b23f9
Fix UseObjectForClearerAPI rule that checked non-public methods
2019-04-03 10:14:59 +02:00
Andreas Dangel
58677de21d
Merge branch 'pr-1746'
2019-04-02 16:58:48 +02:00
Itai Gilo
044473aa02
Update rule to prevent UnusedImport when using JavaDoc see with array type
2019-04-01 20:55:11 +03:00
Itai Gilo
ae535ce594
Update rule to prevent UnusedImport when using JavaDoc with array type
2019-04-01 11:06:47 +03:00
Juan Martín Sotuyo Dodero
8468c4e2bc
[java] Report class name for package-private only classes
...
- Fixes #1729
2019-03-31 15:02:10 -03:00
Andreas Dangel
5818abc0c7
[maven-release-plugin] prepare for next development iteration
2019-03-31 12:07:07 +02:00
Andreas Dangel
4ed549f0b2
[maven-release-plugin] prepare release pmd_releases/6.13.0
2019-03-31 12:06:56 +02:00
Andreas Dangel
ec68c2979c
[java] avoid most lookaheads for SwitchStatements
2019-03-31 10:33:02 +02:00
Andreas Dangel
f8652fbf9a
[java] Add SwitchLabeledRule interface, remove SwitchBlockGroup
2019-03-31 00:21:34 +01:00
Andreas Dangel
087e0a62c8
Merge branch 'master' into pr-1725
2019-03-30 19:28:11 +01:00
Andreas Dangel
8bbf5a3727
Merge branch 'pr-1743'
2019-03-30 18:02:45 +01:00
Andreas Dangel
6f6160f355
Merge branch 'pr-1742'
2019-03-30 18:01:50 +01:00
Andreas Dangel
d613b08ce1
Merge branch 'pr-1726'
2019-03-30 18:01:09 +01:00
Andreas Dangel
ae4b56e70f
[java] UseUnderscoresInNumericLiterals - check the length before
...
and after decimal point separately
2019-03-29 19:57:48 +01:00
Andreas Dangel
878db5617f
[java] AvoidDuplicateLiterals warning about deprecated separator property when not used
...
Fixes #1570
2019-03-29 19:35:57 +01:00
Andreas Dangel
921ee050bd
Add additional test case
2019-03-29 18:22:47 +01:00
Andreas Dangel
a0876f71f5
[java] UseUnderscoresInNumericLiterals false positive on floating point numbers
...
Fixes #1527
2019-03-29 18:16:45 +01:00
Itai Gilo
e7f7422f50
Update the right file
2019-03-25 21:32:35 +02:00
Andreas Dangel
1337dce1fb
Add escaping to the test, add extended test in pmd-core for
...
AbstractRuleViolationFactory
2019-03-19 17:12:03 +01:00
guo fei
e7a0198b4b
AbstractRuleViolationFactory.cleanup() skip MessageFormat when args is empty
2019-03-19 17:09:39 +01:00
Andreas Dangel
6c6cb3ecf3
Merge branch 'pr-1707'
2019-03-19 16:23:32 +01:00
Andreas Dangel
65b2990ad1
Fix break statement
2019-03-17 10:22:11 +01:00
Andreas Dangel
e103ef4869
[java] Rename SwitchLabeledRule -> SwitchBlockGroup
...
The plan is with PMD, that also the switch block statements
are grouped together with the switch label, like the switch rules
2019-03-17 10:22:06 +01:00
Andreas Dangel
220467ca18
[java] Update quickstart ruleset - UnsynchronizedStaticDateFormatter is deprecated
...
Add unit tests
Add missing rules
2019-03-16 12:55:03 +01:00
Andreas Dangel
d7aa1b1742
Support Expression in break statements
2019-03-16 11:55:38 +01:00
Andreas Dangel
6658dc3383
Support type resolution for SwitchExpressions
2019-03-16 11:55:38 +01:00
Andreas Dangel
607b4d1e6c
[java] ASTLiteral should only try to parse the value, if it makes sense
...
This avoids number format exceptions when trying to parse a String as
a double.
2019-03-16 11:55:38 +01:00
Andreas Dangel
ca0975b68f
Add additional tests
...
* Parse problem with switch fallthrough
* Verify type of switch expression
2019-03-16 11:55:38 +01:00
Clément Fournier
2793c3e029
Remove arbitrary lookahead
2019-03-16 11:55:38 +01:00
Clément Fournier
f5bc7031f5
Add structure tests
2019-03-16 11:55:38 +01:00
Andreas Dangel
65cac51445
[java] Add Java12 support
2019-03-16 11:55:38 +01:00
Andreas Dangel
8949019da6
[java] Add Java12 support
2019-03-16 11:55:38 +01:00
Andreas Dangel
7a69eb1e25
Merge branch 'pr-1717'
2019-03-12 22:05:29 +01:00
Rishabh Jain
e590f29da8
issue-1701 fix bug to suppress false positive in useTryWithResources when close method have multiple arguments
2019-03-11 22:11:24 -04:00
Andreas Dangel
fe0b7fd450
Merge branch 'pr-1541'
2019-03-11 16:22:28 +01:00
Andreas Dangel
002ecb7783
Fix test dependencies with junit5/kotlin/junit4 combination
...
When using kotlin test, which brings in the JUnit5 platform,
additionally the junit-vintage-engine needs to be added to
the test classpath, so that surefire will execute all tests
(junit5/kotlin test + junit4 tests).
2019-03-10 19:32:20 +01:00
David Burström
b77225bcc1
Merge branch 'master' of https://github.com/pmd/pmd into master-while-loop-with-literal-boolean
2019-03-10 10:39:56 +01:00
David Burström
7075dd249b
Add closing brackets to example
2019-03-10 10:38:05 +01:00
David Burström
146119af5c
Migrate XPath rule to 2.0
2019-03-10 10:37:32 +01:00
David Burström
ff11ff6d0c
Use Markdown syntax for better description formatting
2019-03-10 10:37:07 +01:00
David Burström
18296125a3
Rename test class so that it can be picked up by Surefire
2019-03-10 10:36:31 +01:00
Andreas Dangel
15381f2373
[java] Use XPath 2.0 for DetachedTestCase rule
...
Refs #1706
2019-03-09 17:58:49 +01:00
Andreas Dangel
1723acde4a
java-design: reorder rules in category xml
2019-03-06 20:20:02 +01:00
Andreas Dangel
fccc9e8ed4
Merge branch 'pr-1706'
2019-03-06 20:19:44 +01:00