Commit Graph

1313 Commits

Author SHA1 Message Date
64628370c8 Merge branch 'pr-679' 2017-10-30 16:56:17 -03:00
67f0fbbbfe Add missing @Overrides 2017-10-30 00:26:42 -03:00
989dd133fd Merge branch 'pr-692' 2017-10-28 20:18:56 +02:00
2dec92c9d5 Merge branch 'pr-691' 2017-10-28 20:04:10 +02:00
0cff7b841a [java] Mark ASTArrayDimsAndInits and ASTVariableDeclaratorId as Dimensionable 2017-10-28 20:01:07 +02:00
6b1b135104 Merge branch 'pr-690' 2017-10-28 19:55:59 +02:00
ca9b42b7e5 Merge branch 'pr-689' 2017-10-28 19:48:39 +02:00
91b8a22b42 Update GenericToken specialToken method to obtain only comment tokens 2017-10-28 14:42:44 -03:00
e8fdbdbca4 Update GenericToken interface to expose directly region methods 2017-10-28 14:42:44 -03:00
26461e59c1 Simplify method name in GenericToken && improve ant task replacetoken 2017-10-28 14:42:44 -03:00
95835b8134 Update getter in GenericToken 2017-10-28 14:42:44 -03:00
490b34fea3 Change ant tasks over (Java) Token class 2017-10-28 14:42:44 -03:00
591737b2d9 Merge branch 'pr-688' 2017-10-28 19:41:28 +02:00
d1d9c6f3c6 [java] Fix NPE in type resolution
- The resolution of `GenericArrayType` was broken, so we caused NPEs.
 - Those types are now properly resolved, but the test case is still
incomplete due to missing pieces in type inference
2017-10-27 23:53:17 -03:00
71d94b4ccd [java] Avoid runtime errors on incomplete classpath 2017-10-27 02:27:32 -03:00
83d513edca Fix specificity test for varargs vs fixed
- We used to fail upon mixing varargs with fixed arity instead of
treating the vararg as a fixed arity as per the spec
2017-10-27 00:57:21 -03:00
1d02c24b34 Consider only direct children 2017-10-27 00:08:26 -03:00
b3dea3240c Generalize test 2017-10-26 22:38:40 -03:00
b76945bbbb Be consistent on naming 2017-10-26 22:33:31 -03:00
05927af574 [java] Properly resolve array types
- Honor dimensions of arrays
 - Resolve types for allocations as well as declarations of arrays
2017-10-26 22:31:29 -03:00
d8f203a859 Chesktyle 2017-10-26 18:03:54 -03:00
8fe2befbbc Add a proper test case 2017-10-26 13:11:39 -03:00
ae2898e238 [java] Properly handle 0-arg calls
- We no longer take all methods as applicable for a 0-arg method call
during type resolution.
2017-10-26 12:23:44 -03:00
71200e6a67 Default to reduce to false for the time being 2017-10-26 10:06:18 -03:00
92cc66a8cd Checkstyle fixes 2017-10-26 01:13:04 -03:00
9d59c0317c [java] Fix boxing rules
- Boolean types were not considered since we were using the
subtypability set which deals exclusively with numeric types
 - Fixes #650
2017-10-26 00:54:47 -03:00
042b1bda02 [java] Handle properly reduction incompatibilities
- When a reduce operation return null (it's incompatible), we should
handle it properly instead of producing a NPE.
2017-10-24 00:13:01 -03:00
c00400ef77 Fix try with final resource 2017-10-18 08:50:06 -03:00
fc3da283bd Merge branch 'pr-666' 2017-10-17 13:43:52 -03:00
82b219428b [java] Add DoNotExtendJavaLangThrowable rule
Copy and pasted code from DoNotExtendJavaLangError rule.

Resolves #367
https://github.com/pmd/pmd/issues/367
2017-10-14 18:19:55 +02:00
77968550ef [java] Fix unit tests 2017-10-13 14:09:47 +02:00
944b2f448b [java] Move rule SignatureDeclareThrowsException from typeresolution to strictexception
Replace existing rule with the typeresolution-based implementation.
2017-10-13 14:04:27 +02:00
8470d32322 [java] Move rule UnusedImports from typeresolution to imports
Replace existing rule with the typeresolution-based implementation.
2017-10-13 12:54:26 +02:00
a89d449169 [java] Move rule CloneMethodMustImplementCloneable from typeresolution to clone
Replace existing rule with the typeresolution-based implementation.
2017-10-13 12:37:04 +02:00
2ef082ae19 [java] Move rule LooseCoupling from typeresolution to coupling
Replace existing rule with the typeresolution-based implementation.
2017-10-13 12:36:36 +02:00
dbe0168865 [java] Avoid errors upon resolving invalid classes
- Resolves #328
 - Take the chance to simplify some error handling
(`NoClassDefFoundError` extends `LinkageError`)
2017-10-10 12:08:52 -03:00
1af49cdca9 Fix checkstyle 2017-10-06 20:25:01 +02:00
af4ddfbbcf [java] Fix rule StringToString after arrays are arrays 2017-10-06 20:17:09 +02:00
e84866aa8d [java] typeresolution: don't throw if the type variables couldn't be resolved 2017-10-06 20:09:26 +02:00
ece871c2f7 [java] typeresolution: when we couldn't resolve a method in
the first two phases, we assumed, that it would be varargs method.
This is not always the case.
2017-10-06 19:48:55 +02:00
afae1385aa [java] typeresolution: support varags with generics 2017-10-06 18:05:30 +02:00
acc05d4c9c [java] typeresolution: resolve arrays in some cases correctly 2017-10-06 18:05:27 +02:00
04e65cd20c [java] typeresolution: avoid NPE if no type is known for a method argument 2017-10-06 18:05:27 +02:00
231956c47e [java] typeresolution: simple inheritance/override check 2017-10-06 18:05:24 +02:00
c0302cd314 [java] check for parsing/processing errors in unit test 2017-10-05 22:40:37 +02:00
1582e40055 [java] typeresolution - add unit test for abstract return type case 2017-10-05 22:31:55 +02:00
716e21221c [java] typeresolution: add test for generic wildcard method parameters 2017-10-05 22:28:00 +02:00
efb78e9f79 [java] TypeResolution - support basic method overriding 2017-10-05 21:39:16 +02:00
2e5dcf9a95 [java] Fix NPE in NcssCount rule
Parent could also be a enum or an annotation and not just a class/interface.
2017-10-05 21:04:25 +02:00
dd596f0aef [java] Typeresolution: Return empty set instead of null for erased cadidate set 2017-10-05 20:56:46 +02:00