Commit Graph

490 Commits

Author SHA1 Message Date
93bf4d59cd Merge branch 'master' into issue-4794-java-22 2024-03-04 18:28:35 +01:00
2a1aaa6bce [java] Fix tests with ExplicitConstructorInvocations 2024-02-15 15:07:50 +01:00
bfe9ce66e2 [java] JEP 447: Statements before super(...) (Preview) (Java 22) 2024-02-15 13:20:46 +01:00
4e01a3dafb [java] JEP 456: Unnamed Variables & Patterns
This is now standardized.
2024-02-15 12:12:12 +01:00
cb3ceef17a [java] Update Tests for JEP 463: Implicitly Declared Classes and Instance Main Methods 2024-02-15 11:26:12 +01:00
fbb9da24f2 [java] Update Tests for JEP 459 String Templates
TemplateFragment now has an attribute "content".
2024-02-15 11:16:24 +01:00
c4eccf49af [java] Remove old java 20 preview features
- Record patterns in enhanced for statements
- parenthesized patterns

These features have not been standardized.
2024-02-15 10:16:31 +01:00
5599a8fd65 Merge branch 'master' into issue-4349-cleanup-deprecations 2024-02-08 18:23:41 +01:00
b6adbf5bb5 [java] Remove deprecated classes and methods
AbstractPackageNameModuleDirective#getImage
AbstractTypeDeclaration#getImage
ASTAnnotation#getAnnotationName
ASTClassType#ASTClassType(String)
ASTClassType#getImage
ASTClassType#isReferenceToClassSameCompilationUnit
ASTFieldDeclaration#getVariableName
ASTLiteral#is_xxx_Literal
ASTMethodDeclaration#getMethodName
ASTMethodReference#getImage
ASTModuleName#getImage
ASTPrimitiveType#getImage
ASTType#getTypeImage
ASTType#getArrayDepth
ASTType#isPrimitiveType #isArrayType #isClassOrInterfaceType
ASTTypeDeclaration#getImage
ASTUnaryExpression#isPrefix
ASTVariableId#getImage
ASTVariableId#getVariableName
JavaComment#getImage
JavaNode#jjtAccept
JavaParserVisitor
JavaParserVisitorAdapter
ModifierOwner#isFinal #isAbstract ... #isPublic ...
TypeNode#getType
2024-02-08 17:54:19 +01:00
5c02b62623 [core] Remove deprecated members in Reportable
Reportable#getBeginLine
Reportable#getBeginColumn
Reportable#getEndLine
Reportable#getEndColumn
2024-02-08 10:10:09 +01:00
fa97cff7ff Merge pull request #4797 from adangel:lexexception-cpdlexer
[core] Rename TokenMgrError to LexException, Tokenizer to CpdLexer #4797
2024-02-02 19:59:41 +01:00
55d91791c3 [core] Rename TokenMgrError to LexException
See #4065
2024-01-11 15:56:28 +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
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
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
698ca0d3ff [java] Rename ASTClassOrInterfaceType to ASTClassType 2023-12-12 16:01:34 +01:00
000f2e86fd [java] Fix more parsing errors after supporting String Templates 2023-08-10 15:36:30 +02:00
41643dd020 [java] Avoid using Thread.fillInStackTrace() for token context
This requires to use the option TOKEN_MANAGER_USES_PARSER
2023-08-10 15:36:30 +02:00
f4c86b25ae [java] Support Unnamed Classes and Instance Main Methods for Java 21 Preview
JEP 445
2023-08-10 15:36:29 +02:00
216dd09405 [java] Support Unnamed Patterns and Variables for Java 21 Preview
JEP 443
2023-08-10 15:36:28 +02:00
715d58fef3 [java] Support String Templates for Java 21 Preview
JEP 430
2023-08-10 15:36:28 +02:00
2488107b23 [java] Update impl for record patterns for java 21
- renamed ASTComponentPatternList to ASTPatternList
2023-08-10 15:36:27 +02:00
3bdb921548 [java] Update impl for pattern matching for switch for java 21
- renamed ASTSwitchGuard to ASTGuard
2023-08-10 15:36:27 +02:00
37e2f8f208 Improve jjt error messages 2023-03-19 22:57:51 +01:00
cac5b15b56 [java] Fix build errors, update LanguageLevelChecker
- Update Java20PreviewTreeDumpTest to JUnit5
- Remove GuardedPatterns
- Don't use PatternExpression in case labels
- Update javadocs
2023-02-04 20:14:40 +01:00
f30f904f9d Merge 'pmd6-java-20' into pmd7-java-20 2023-02-04 19:10:37 +01:00
3ac021da02 [java] Remove support for named record patterns 2023-02-03 19:54:19 +01:00
600ad870db [java] Support record patterns in for-each loops 2023-02-03 19:37:28 +01:00
36fb459bd9 [java] Correct grammar regarding default case label
Update ExhaustiveSwitch so that it compiles with java 20. "case default" is not allowed anymore.
2023-02-03 17:09:58 +01:00
1843ff51c7 [java] Simplify null case label grammar
Update DealingWithNull to that it compiles with java 20. Some cases are not allowed anymore.
2023-02-03 16:41:19 +01:00
35a11574ed [java] Remove language version 18-preview 2023-02-03 15:49:19 +01:00
c46a2d31bf [java] Add new language versions 20 and 20-preview 2023-02-03 14:55:43 +01:00
120e89f81b Merge 'master' into pmd/7.0.x 2023-01-27 09:18:07 +01:00
312ebc173d Allow the escapes new line sequence 2023-01-26 19:36:20 -03:00
619e014d0d Properly define TEXT_BLOCK tokens 2023-01-26 18:59:55 -03:00
390b040432 Fix TextBlock grammar 2023-01-26 16:43:30 -03:00
aeb4978676 Make isUpperBound return true for unbounded wildcard 2022-12-07 22:51:02 +01:00
08284c2af5 Merge branch '7.0.x' into text-utils-comments 2022-11-26 16:04:21 +01:00
9a5c2523f6 Fix pmd-java 2022-11-16 14:51:33 +01:00
d540f6fb14 Merge branch 'master' into pr/4194 2022-11-16 13:56:01 +01:00
735197cff4 Support other cases found in checkstyle 2022-11-07 00:44:22 +01:00
36f19eda92 Push actual annotation nodes
This is to avoid having rules like UnusedImports
fail to see an annotation usage. This makes the
tree rather messy when there are type annotations
though.
2022-11-06 22:39:38 +01:00
00c06343a5 Fix tests 2022-11-06 21:50:33 +01:00
2027d2f57f Support generic ctors 2022-11-05 17:05:46 +01:00
92ccf1b0ea Support array init with just a comma
Refs #3643
2022-11-05 16:31:17 +01:00
b39ba3c560 Add new tests
Refs #3643
2022-11-05 16:30:01 +01:00
cd075d2459 Fix #4152 - support type annotations in more places 2022-11-05 15:48:04 +01:00