Clément Fournier
c245ef1ea9
Format test cases
2018-02-07 14:18:33 +01:00
Clément Fournier
45cb5f3252
Minor style corrections
2018-02-07 14:12:01 +01:00
Clément Fournier
bb2e35b815
Fix ImmutableField false positive when lambda is in constructor
...
Fixes #855
2018-02-07 14:05:47 +01:00
Clément Fournier
240ccfb32f
Improve a confusing code construct
2018-02-06 18:30:09 +01:00
reudismam
7e380e5d98
Use isEmpty method.
2018-02-02 12:28:25 -03:00
Juan Martín Sotuyo Dodero
f86a06be4a
Fix checkstyle
2018-01-29 23:26:42 -03:00
Juan Martín Sotuyo Dodero
f9df6ed01e
[java] Fix grammar for <> in Java 1.8
...
- Fixes #888
- Allow the contents of an anonymous class to use diamong notation, but
the anonymous class itself can't use it
2018-01-29 14:10:40 -03:00
Matias Comercio
bdf988030c
Add missing unit test
2018-01-26 19:02:18 -03:00
Matias Comercio
d8d271c2f1
Fix issue-885
...
False positive on Java rule: CompareObjectsWithEqualsRule
Enum class exlicit usage was not being considered an Enum type in the rule
2018-01-26 18:18:10 -03:00
Andreas Dangel
22a42ecd6f
Merge branch 'pr-878'
2018-01-26 10:13:42 +01:00
Andreas Dangel
9062b4f09e
[java] CommentRequiredRule: Add unit test
...
Add a unit test to verify the dysfunctionalReason is detected
correctly.
Refs #877
2018-01-26 09:58:50 +01:00
Juan Martín Sotuyo Dodero
a33958bc63
Merge branch 'pr-882'
2018-01-25 19:49:32 -03:00
Clément Fournier
6fb01ca19d
ExcessiveClassLength considers annotation and enum types
2018-01-25 22:57:28 +01:00
Clément Fournier
3f38835d78
ExcessiveMethodLength considers constructors
2018-01-25 22:52:44 +01:00
Clément Fournier
0578b36145
Cleanup AbstractNode
2018-01-25 14:15:57 +01:00
Clément Fournier
27ccd140ef
Cleanup
2018-01-25 03:06:54 +01:00
Clément Fournier
6a3b332aee
Abstract toString into AbstractNode, deprecate the implementation
...
Log that the default implementation will be removed
2018-01-25 03:02:44 +01:00
Clément Fournier
3c0bb45a60
Add getXPathNodeName to the Node interface
...
A default implementation is available in AbstractNode
to preserve compatibility with the previous way, which
used Object.toString.
Fixes #569
2018-01-24 19:22:36 +01:00
Juan Martín Sotuyo Dodero
7ec99ba218
[java] Fix misconfiguration detection
...
- Resolves #877
2018-01-24 01:45:02 -03:00
Clément Fournier
80bd38485a
Merge branch 'pr-845'
...
Refs #543
2018-01-23 21:09:08 +01:00
Alberto Fernandez
9936b1f833
removed unnecesary counter
2018-01-23 17:56:10 +01:00
Juan Martín Sotuyo Dodero
e1e8ad5984
Merge branch 'pr-790'
2018-01-21 14:47:11 -03:00
Juan Martín Sotuyo Dodero
3de3335714
Merge branch 'pr-830'
2018-01-21 14:42:09 -03:00
Andreas Dangel
8fbb156fd9
[maven-release-plugin] prepare for next development iteration
2018-01-21 16:42:50 +01:00
Andreas Dangel
0e460317e4
[maven-release-plugin] prepare release pmd_releases/6.0.1
2018-01-21 16:42:42 +01:00
Andreas Dangel
02989303a6
[java] Avoid double rule de-referincing in controversial and migrating_*
2018-01-21 15:42:28 +01:00
Juan Martín Sotuyo Dodero
15db5ad0b4
[java] typeresolution points directly to categories
...
- Fixes #866
2018-01-21 06:21:55 -03:00
Clément Fournier
f8ca4a75d3
Extract Pattern constant from parse method
2018-01-20 01:53:23 +01:00
Alberto Fernandez
2c2c2f4dd9
Checkstyle fixes
2018-01-17 16:06:54 +01:00
Alberto Fernandez
883bed3cf8
Better detection of corner cases
...
the firts changes checks for a exact level to search AdditiveExpression.
So code like
throw new Exception("something bad:" + (e)); gets undetected.
This change search if part of a AdditiveExpression to the base node.
2018-01-17 15:25:38 +01:00
Clément Fournier
65949bcf6e
Merge branch 'master' of github.com:pmd/pmd into issue-827
2018-01-17 00:15:13 +01:00
Clément Fournier
2ca4b347c3
Make TCC consider local classes.
...
If a local class is declared inside a method of the outer class,
then attribute accesses made by the local class count as if they
are made by the enclosing method.
2018-01-16 23:42:29 +01:00
Clément Fournier
8cfc073b8c
Add local class support to JavaQualifiedName
2018-01-16 20:35:15 +01:00
Clément Fournier
27b4abe221
Add isLocal() to ASTClassOrInterfaceDeclaration
2018-01-16 18:18:23 +01:00
Juan Martín Sotuyo Dodero
c843a6f534
Make test cases more direct
...
- No personal interpretation, but let Java process the values
2018-01-16 01:14:42 -03:00
Andreas Dangel
96cc4f01f3
Merge branch 'pr-849'
...
Closes #841
2018-01-15 20:45:34 +01:00
Juan Martín Sotuyo Dodero
391c1e8842
Unify literal parsing logic
2018-01-14 16:15:22 -03:00
Juan Martín Sotuyo Dodero
ab96e34099
[java] Resolve NumberFormatException
...
- InsufficientStringBufferDeclaration now supports all numbr formats
(even octal and binary)
- We move the logic of understanding the literal value to the literal
node. Looking for other places where this logic is being replicated is
pending
2018-01-14 16:14:38 -03:00
Juan Martín Sotuyo Dodero
a5b546d044
Java 7 compatible implementation
2018-01-13 21:01:37 -03:00
Juan Martín Sotuyo Dodero
303f05d8d3
[java] Resolve StackOverflow in JavaTypeDefinitionSimple.toString()
...
- Resolves #831
2018-01-13 20:43:01 -03:00
Alberto Fernandez
a4d5ff683d
Fix checkstyle
2018-01-12 23:31:58 +01:00
Alberto Fernandez
4f67d99c9f
Fix false negative PreserveStackTrace on string concatenation
...
PMD should fire PreserveStackTrace in the following code
public void foo(String a) throws Exception {
try {
int i = Integer.parseInt(a);
} catch(Exception e){
throw new Exception("something bad:" + e);
// Stack trace is lost, but no violation was reported!
}
}
Closes pmd/pmd#543
2018-01-12 23:09:17 +01:00
Andreas Dangel
9bc7074fb9
Merge branch 'pr-821'
2018-01-11 17:30:40 +01:00
Andreas Dangel
b6fc30964e
Add unit test, refs #817
2018-01-11 17:29:34 +01:00
Andreas Dangel
17ea5a89a0
Merge branch 'pr-820'
2018-01-11 17:16:04 +01:00
Clément Fournier
4b43bbcb19
Merge branch 'pr-822'
2018-01-08 00:33:17 +01:00
Juan Martín Sotuyo Dodero
4ce6a019e1
Add test scenario
2018-01-07 17:33:33 -03:00
Tobias Weimer
fd51f6254a
Update performance.xml
...
Added missing CDATA
2018-01-07 19:19:17 +01:00
Tobias Weimer
af4c5b2a87
Update performance.xml
...
Added note about Arrays.asList()
2018-01-05 15:47:16 +01:00
Tobias Weimer
142e533833
Update performance.xml
...
new Boolean(), new Byte() and new Short() are deoprecated in JDK 9 too.
2018-01-05 15:29:59 +01:00