db0392cba1
[core] n.s.pmd.cpd.Tokens#Tokens() is now package private
...
Refs #4348
2024-01-27 18:39:20 +01:00
3a5ff11dc2
[core] Rename MessageReporter to PmdReporter as public API
...
PmdReporter is supposed to be used when configuring PMD
(see AbstractConfiguration#setReporter), so it can't be internal.
Refs #4348
2024-01-26 19:06:08 +01:00
0c4b4f4dcd
Merge pull request #4768 from adangel:java-ast-updates
...
[java] Updates to AST nodes #4768
2024-01-26 15:13:40 +01:00
963a9a965c
[java] Verify fix for BrokenNullCheck ( #718 )
...
Closes #718
2024-01-17 17:43:15 +01:00
b17fe92fb5
Merge branch 'master' into java-ast-updates
2024-01-12 10:41:41 +01:00
8bd78b4b8f
Update pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/internal/PrettyPrintingUtil.java
...
Co-authored-by: Clément Fournier <clement.fournier@tu-dresden.de >
2024-01-12 10:30:49 +01:00
b06d00fb40
[java] SingularField: verify #174
...
Closes #174
2024-01-12 09:59:17 +01:00
ed0cff6da9
Merge branch 'master' into java-ast-updates
2024-01-11 10:28:21 +01:00
b65589175c
[core] Add tests for TokenMgrError location
2024-01-05 14:48:10 +01:00
070cca8743
Merge pull request #4628 from adangel:support-jrt-fs
...
[java] Support loading classes from java runtime images #4628
2024-01-05 13:51:40 +01:00
3a3a8784f1
[java] Remove ASTClassDeclaration#isPackagePrivate()
2023-12-14 13:57:50 +01:00
97d141d577
[core][java] Expose Chars attributes in XPath
...
- taken from #4352 (avoid getImage())
- Exposes @LiteralText for ASTLiteral
Co-authored-by: Clément Fournier <clement.fournier76@gmail.com >
2023-12-14 13:48:21 +01:00
73fcf6e38c
[core][java] Integrate improvements from #4352 (avoid getImage())
...
- This improves ASTLiteral implementation
- Adds ASTLiteral#getLiteralText() - not yet exposed as XPath attribute
Co-authored-by: Clément Fournier <clement.fournier76@gmail.com >
2023-12-14 12:10:00 +01:00
7a0f7316b7
[java] Avoid usage of deprecated methods
...
- firstChild() instead of getFirstChildOfType()
- descendants() instead of findDescendantsOfType()
- ancestors() instead of getFirstParentOfType()
2023-12-14 09:40:26 +01:00
0fb4593234
[java] Avoid usage of deprecated methods
...
- getName() instead of getMethodName() or getVariableName()
- firstChild() instead of getFirstChildOfType()
- getRoot() instead of getFirstParentOfType(ASTCompilationUnit.class)
- children() instead of findChildrenOfType()
- no more addRuleChainVisit()
- ancestors() instead of getNthParent()
- descendants() instead of findDescendantsOfType()
2023-12-13 18:20:28 +01:00
e283f11551
[java] Avoid usage of deprecated addViolation
2023-12-13 11:49:07 +01:00
21ec4b9235
[java] Update change log in Java.jjt
2023-12-13 10:51:47 +01:00
c579576b32
[java] Rename ASTClassOrInterfaceBody to ASTClassBody
2023-12-13 10:49:13 +01:00
ba0611534d
[java] Rename ASTVariableDeclaratorId to ASTVariableId
2023-12-13 10:30:39 +01:00
8198218ad7
[java] Rename ASTMethodorConstructorDeclaration to ASTExecutableDeclaration
...
Also rename AbstractMethodOrConstructorDeclaration to AbstractExecutableDeclaration
2023-12-13 09:48:58 +01:00
8b4caed003
[java] Rename ASTAnyTypeDeclaration to ASTTypeDeclaration
...
Also rename AbstractAnyTypeDeclaration to AbstractTypeDeclaration
2023-12-13 08:54:34 +01:00
e79e8402c1
[java] Rename ASTClassOrInterfaceDeclaration to ASTClassDeclaration
2023-12-12 20:09:51 +01:00
b0b47ff3c6
Remove TODO, fix javadoc
2023-12-12 16:12:19 +01:00
698ca0d3ff
[java] Rename ASTClassOrInterfaceType to ASTClassType
2023-12-12 16:01:34 +01:00
33c0d20f98
[java] Rename AccessNode to ModifierOwner
2023-12-12 15:31:00 +01:00
721e88e812
Fix tests - ASTMethodDeclaration now has isFinal()
2023-12-12 14:55:33 +01:00
9febf2ceae
[java] Remove FinalizableNode
2023-12-12 14:35:42 +01:00
6909a9d704
Fix tests - Use consequently BaseJavaTreeDumpTest
2023-12-11 16:44:54 +01:00
ae2846df8a
Fix tests
...
* @PackagePrivate is deprecated now and gone
* @Static is no more deprecated for types, methods, fields
2023-12-11 16:36:05 +01:00
22e46404ee
[java] Add hasVisibility method
...
Deprecate ASTClassOrInterfaceDeclaration#isPackagePrivate().
Use #hasVisibility(Visibility) instead, which can correctly
differentiate between local and package private classes.
2023-12-11 15:54:02 +01:00
9869dccf4b
[java] Push isStatic() down to declaration
...
Only on ASTMethodDeclaration, ASTFieldDeclaration and ASTAnyTypeDeclaration.
This makes it possible to remove it
from AccessNode.
2023-12-11 15:19:12 +01:00
6d09555af6
fix: remove delimiter attribute from pmd-java/src/main/resources/category/java/errorprone.xml
...
When using `category/java/errorprone.xml` ruleset with PMD 7.0.0-rc4 I'm getting these warnings:
```
Warning at category/java/errorprone.xml:1039:78
1037| <properties>
1038| <property name="version" value="2.0"/>
1039| <property name="typesThatCompareByReference" type="List[String]" delimiter="," description="List of canonical type names for which reference comparison is allowed.">
^^^^^^^^^ Delimiter attribute is not supported anymore, values are always comma-separated.
1040| <value>java.lang.Enum,java.lang.Class</value>
1041| </property>
Warning at category/java/errorprone.xml:2353:62
2351| <priority>3</priority>
2352| <properties>
2353| <property name="annotations" type="List[String]" delimiter="," value="org.springframework.beans.factory.annotation.Autowired,javax.inject.Inject,com.google.inject.Inject" description="If a constructor is annotated with one of these annotations, then the class is ignored."/>
^^^^^^^^^ Delimiter attribute is not supported anymore, values are always comma-separated.
2354| <property name="xpath">
2355| <value>
```
2023-12-04 12:05:45 +01:00
c6d55ca059
Merge pull request #4706 from Debamoy:issue/1831-detached-test-case-reports-package-private-methods
...
[java] DetachedTestCase should not report on abstract methods #4706
2023-12-01 15:07:41 +01:00
990090d6d1
[doc] Update release notes ( #4706 , #1831 )
2023-12-01 15:05:22 +01:00
10c184b44b
Fix checkstyle
2023-12-01 15:02:24 +01:00
3875ae2726
Merge pull request #4754 from bergander:AllowCommentedBlocks
...
[java] EmptyControlStatementRule: Add allowCommentedBlocks property #4754
2023-12-01 14:29:03 +01:00
1e8d5874ed
[doc] Update release notes ( #4754 )
2023-12-01 14:27:15 +01:00
b7b26f01f5
Fix #4753
2023-11-28 17:48:59 +01:00
de2a7e15ee
Add allowCommentedBlocks property to EmptyControlStatementRule
2023-11-27 16:00:40 +01:00
3fc9d8fc77
issue-1831 added test cases
2023-11-25 11:02:22 +05:30
16967d3c60
Merge pull request #4719 from ciufudean:master
...
[java] UnnecessaryCaseChange: example doc toUpperCase() should compare to a capitalized string #4719
2023-11-10 09:23:08 +01:00
1140aa2d00
Merge pull request #4724 from Monits:pattern-properties
...
[java] Make allowExceptionNameRegex a Regex #4724
2023-11-10 09:13:36 +01:00
d4725e6c1b
[java] Improve logging of aux classpath
...
This includes some stats in AsmSymbolResolver.
Co-authored-by: Clément Fournier <clement.fournier@tu-dresden.de >
2023-10-26 15:49:57 +02:00
a643c3ce29
Revert "Add close routines for class stubs"
...
This reverts commit 644f85836b
.
2023-10-26 10:16:51 +02:00
19a9a4bd36
Revert "Improve stats reporting"
...
This reverts commit 5355594b51
.
2023-10-26 10:16:44 +02:00
37a75bd94e
Merge branch 'master' into support-jrt-fs
2023-10-26 10:02:11 +02:00
93f5a68218
Make allowExceptionNameRegex a Regex
2023-10-19 22:00:34 -03:00
4c590a71bd
Merge branch 'master' into issue-4645-CommentDefaultAccessModifier
2023-10-19 21:42:36 -03:00
453685d6c4
toUpperCase() should compare to a capitalized string
2023-10-19 11:09:45 +03:00
0c53b69e82
Merge pull request #4586 from adangel:ruleset-xml
...
Use explicit encoding in ruleset xml files #4586
2023-10-19 09:41:57 +02:00