diff --git a/.travis/build-deploy.sh b/.travis/build-deploy.sh index 07a838dd67..df07387543 100755 --- a/.travis/build-deploy.sh +++ b/.travis/build-deploy.sh @@ -37,7 +37,7 @@ elif travis_isPush; then echo -e "\n\n" # create a draft github release - gh_releases_createDraftRelease "${TRAVIS_TAG}" "$(git show-ref --hash ${TRAVIS_TAG})" + gh_releases_createDraftRelease "${TRAVIS_TAG}" "$(git rev-list -n 1 ${TRAVIS_TAG})" GH_RELEASE="$RESULT" # Build and deploy to ossrh / maven-central diff --git a/.travis/github-releases-api.sh b/.travis/github-releases-api.sh index 7fde8b837d..f523041111 100644 --- a/.travis/github-releases-api.sh +++ b/.travis/github-releases-api.sh @@ -31,7 +31,7 @@ function gh_releases_createDraftRelease() { ) log_debug "POST https://api.github.com/repos/pmd/pmd/releases" - log_info "Creating gihtub draft release" + log_info "Creating github draft release" RESULT=$(curl --fail -s -H "Authorization: token ${GITHUB_OAUTH_TOKEN}" \ -H "Content-Type: application/json" \ -X POST \ diff --git a/docs/_config.yml b/docs/_config.yml index 2c3640937c..cddd951ae3 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,9 +1,9 @@ repository: pmd/pmd pmd: - version: 6.21.0 - previous_version: 6.20.0 - date: ??-December-2019 + version: 6.22.0 + previous_version: 6.21.0 + date: ??-????-2020 release_type: minor # release types: major, minor, bugfix diff --git a/docs/pages/next_major_development.md b/docs/pages/next_major_development.md index bab3db43af..d4b449aa9a 100644 --- a/docs/pages/next_major_development.md +++ b/docs/pages/next_major_development.md @@ -73,6 +73,78 @@ the breaking API changes will be performed in 7.0.0. an API is tagged as `@Deprecated` or not in the latest minor release. During the development of 7.0.0, we may decide to remove some APIs that were not tagged as deprecated, though we'll try to avoid it." %} +#### 6.21.0 + +##### Deprecated APIs + +###### Internal API + +Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0. +You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning. + +* {% jdoc java::lang.java.JavaLanguageHandler %} +* {% jdoc java::lang.java.JavaLanguageParser %} +* {% jdoc java::lang.java.JavaDataFlowHandler %} +* Implementations of {% jdoc core::lang.rule.RuleViolationFactory %} in each + language module, eg {% jdoc java::lang.java.rule.JavaRuleViolationFactory %}. + See javadoc of {% jdoc core::lang.rule.RuleViolationFactory %}. +* Implementations of {% jdoc core::RuleViolation %} in each language module, + eg {% jdoc java::lang.java.rule.JavaRuleViolation %}. See javadoc of + {% jdoc core::RuleViolation %}. + +* {% jdoc core::rules.RuleFactory %} +* {% jdoc core::rules.RuleBuilder %} +* Constructors of {% jdoc core::RuleSetFactory %}, use factory methods from {% jdoc core::RulesetsFactoryUtils %} instead +* {% jdoc core::RulesetsFactoryUtils#getRulesetFactory(core::PMDConfiguration, core::util.ResourceLoader) %} + +* {% jdoc apex::lang.apex.ast.AbstractApexNode %} +* {% jdoc apex::lang.apex.ast.AbstractApexNodeBase %}, and the related `visit` +methods on {% jdoc apex::lang.apex.ast.ApexParserVisitor %} and its implementations. + Use {% jdoc apex::lang.apex.ast.ApexNode %} instead, now considers comments too. + +* {% jdoc core::lang.ast.CharStream %}, {% jdoc core::lang.ast.JavaCharStream %}, +{% jdoc core::lang.ast.SimpleCharStream %}: these are APIs used by our JavaCC +implementations and that will be moved/refactored for PMD 7.0.0. They should not +be used, extended or implemented directly. +* All classes generated by JavaCC, eg {% jdoc java::lang.ast.JJTJavaParserState %}. +This includes token classes, which will be replaced with a single implementation, and +subclasses of {% jdoc core::lang.ast.ParseException %}, whose usages will be replaced +by just that superclass. + +###### For removal + +* pmd-core + * Many methods on the {% jdoc core::lang.ast.Node %} interface + and {% jdoc core::lang.ast.AbstractNode %} base class. See their javadoc for details. + * {% jdoc !!core::lang.ast.Node#isFindBoundary() %} is deprecated for XPath queries. +* pmd-java + * {% jdoc java::lang.java.AbstractJavaParser %} + * {% jdoc java::lang.java.AbstractJavaHandler %} + * [`ASTAnyTypeDeclaration.TypeKind`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.TypeKind.html) + * {% jdoc !!java::lang.java.ast.ASTAnyTypeDeclaration#getKind() %} + * {% jdoc java::lang.java.ast.JavaQualifiedName %} + * {% jdoc !!java::lang.java.ast.ASTCatchStatement#getBlock() %} + * {% jdoc !!java::lang.java.ast.ASTCompilationUnit#declarationsAreInDefaultPackage() %} + * {% jdoc java::lang.java.ast.JavaQualifiableNode %} + * {% jdoc !!java::lang.java.ast.ASTAnyTypeDeclaration#getQualifiedName() %} + * {% jdoc !!java::lang.java.ast.ASTMethodOrConstructorDeclaration#getQualifiedName() %} + * {% jdoc !!java::lang.java.ast.ASTLambdaExpression#getQualifiedName() %} + * {% jdoc_package java::lang.java.qname %} and its contents + * {% jdoc java::lang.java.ast.MethodLikeNode %} + * Its methods will also be removed from its implementations, + {% jdoc java::lang.java.ast.ASTMethodOrConstructorDeclaration %}, + {% jdoc java::lang.java.ast.ASTLambdaExpression %}. + * {% jdoc !!java::lang.java.ast.ASTAnyTypeDeclaration#getImage() %} will be removed. Please use `getSimpleName()` + instead. This affects {% jdoc !!java::lang.java.ast.ASTAnnotationTypeDeclaration#getImage() %}, + {% jdoc !!java::lang.java.ast.ASTClassOrInterfaceDeclaration#getImage() %}, and + {% jdoc !!java::lang.java.ast.ASTEnumDeclaration#getImage() %}. + * Several methods of {% jdoc java::lang.java.ast.ASTTryStatement %}, replacements with other names + have been added. This includes the XPath attribute `@Finally`, replace it with a test for `child::FinallyStatement`. + * Several methods named `getGuardExpressionNode` are replaced with `getCondition`. This affects the + following nodes: WhileStatement, DoStatement, ForStatement, IfStatement, AssertStatement, ConditionalExpression. + * {% jdoc java::lang.java.ast.ASTYieldStatement %} will not implement {% jdoc java::lang.java.ast.TypeNode %} + anymore come 7.0.0. Test the type of the expression nested within it. + #### 6.20.0 No changes. diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index c2fbeae91c..8abb75f161 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -19,167 +19,11 @@ This is a {{ site.pmd.release_type }} release. ### New and noteworthy -#### Modelica support - -Thanks to [Anatoly Trosinenko](https://github.com/atrosinenko) PMD supports now a new language: -[Modelica](https://modelica.org/modelicalanguage) is a language to model complex physical systems. -Both PMD and CPD are supported and there are already [3 rules available](pmd_rules_modelica.html). -The PMD Designer supports syntax highlighting for Modelica. - -While the language implementation is quite complete, Modelica support is considered experimental -for now. This is to allow us to change the rule API (e.g. the AST classes) slightly and improve -the implementation based on your feedback. - -#### Simple XML dump of AST - -We added a experimental feature to dump the AST of a source file into XML. The XML format -is of course PMD specific and language dependent. That XML file can be used to execute -(XPath) queries against without PMD. It can also be used as a textual visualization of the AST -if you don't want to use the [Designer](https://github.com/pmd/pmd-designer). - -This feature is experimental and might change or even be removed in the future, if it is not -useful. A short description how to use it is available under [Creating XML dump of the AST](pmd_devdocs_experimental_ast_dump.html). - -Any feedback about it, especially about your use cases, is highly appreciated. - -#### Updated Apex Support - -* The Apex language support has been bumped to version 48 (Spring '20). All new language features are now properly - parsed and processed. - -#### CPD XML format - -The CPD XML output format has been enhanced to also report column information for found duplications -in addition to the line information. This allows to display the exact tokens, that are considered -duplicate. - -If a CPD language doesn't provide these exact information, then these additional attributes are omitted. - -Each `` element in the XML format now has 3 new attributes: - -* attribute `endLine` -* attribute `beginColumn` (if there is column information available) -* attribute `endColumn` (if there is column information available) - -#### Modified Rules - -* The Java rule {% rule "java/errorprone/AvoidLiteralsInIfCondition" %} (`java-errorprone`) has a new property - `ignoreExpressions`. This property is set by default to `true` in order to maintain compatibility. If this - property is set to false, then literals in more complex expressions are considered as well. - -* The Apex rule {% rule "apex/errorprone/ApexCSRF" %} (`apex-errorprone`) has been moved from category - "Security" to "Error Prone". The Apex runtime already prevents DML statements from being executed, but only - at runtime. So, if you try to do this, you'll get an error at runtime, hence this is error prone. See also - the discussion on [#2064](https://github.com/pmd/pmd/issues/2064). - -* The Java rule {% rule "java/documentation/CommentRequired" %} (`java-documentation`) has a new property - `classCommentRequirement`. This replaces the now deprecated property `headerCommentRequirement`, since - the name was misleading. (File) header comments are not checked, but class comments are. - ### Fixed Issues -* apex - * [#2208](https://github.com/pmd/pmd/issues/2208): \[apex] ASTFormalComment should implement ApexNode<T> -* core - * [#1984](https://github.com/pmd/pmd/issues/1984): \[java] Cyclomatic complexity is misreported (lack of clearing metrics cache) - * [#2006](https://github.com/pmd/pmd/issues/2006): \[core] PMD should warn about multiple instances of the same rule in a ruleset - * [#2161](https://github.com/pmd/pmd/issues/2161): \[core] ResourceLoader is deprecated and marked as internal but is exposed - * [#2170](https://github.com/pmd/pmd/issues/2170): \[core] DocumentFile doesn't preserve newlines -* doc - * [#2214](https://github.com/pmd/pmd/issues/2214): \[doc] Link broken in pmd documentation for writing Xpath rules -* java - * [#2212](https://github.com/pmd/pmd/issues/2212): \[java] JavaRuleViolation reports wrong class name -* java-bestpractices - * [#2149](https://github.com/pmd/pmd/issues/2149): \[java] JUnitAssertionsShouldIncludeMessage - False positive with assertEquals and JUnit5 -* java-codestyle - * [#2167](https://github.com/pmd/pmd/issues/2167): \[java] UnnecessaryLocalBeforeReturn false positive with variable captured by method reference -* java-documentation - * [#1683](https://github.com/pmd/pmd/issues/1683): \[java] CommentRequired property names are inconsistent -* java-errorprone - * [#2140](https://github.com/pmd/pmd/issues/2140): \[java] AvoidLiteralsInIfCondition: false negative for expressions - * [#2196](https://github.com/pmd/pmd/issues/2196): \[java] InvalidLogMessageFormat does not detect extra parameters when no placeholders -* java-performance - * [#2141](https://github.com/pmd/pmd/issues/2141): \[java] StringInstatiation: False negative with String-array access -* plsql - * [#2008](https://github.com/pmd/pmd/issues/2008): \[plsql] In StringLiteral using alternative quoting mechanism single quotes cause parsing errors - * [#2009](https://github.com/pmd/pmd/issues/2009): \[plsql] Multiple DDL commands are skipped during parsing - ### API Changes - -#### Deprecated APIs - -##### Internal API - -Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0. -You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning. - -* {% jdoc java::lang.java.JavaLanguageHandler %} -* {% jdoc java::lang.java.JavaLanguageParser %} -* {% jdoc java::lang.java.JavaDataFlowHandler %} -* Implementations of {% jdoc core::lang.rule.RuleViolationFactory %} in each - language module, eg {% jdoc java::lang.java.rule.JavaRuleViolationFactory %}. - See javadoc of {% jdoc core::lang.rule.RuleViolationFactory %}. -* Implementations of {% jdoc core::RuleViolation %} in each language module, - eg {% jdoc java::lang.java.rule.JavaRuleViolation %}. See javadoc of - {% jdoc core::RuleViolation %}. - -* {% jdoc core::rules.RuleFactory %} -* {% jdoc core::rules.RuleBuilder %} -* Constructors of {% jdoc core::RuleSetFactory %}, use factory methods from {% jdoc core::RulesetsFactoryUtils %} instead -* {% jdoc core::RulesetsFactoryUtils#getRulesetFactory(core::PMDConfiguration, core::util.ResourceLoader) %} - -* {% jdoc apex::lang.apex.ast.AbstractApexNode %} -* {% jdoc apex::lang.apex.ast.AbstractApexNodeBase %}, and the related `visit` -methods on {% jdoc apex::lang.apex.ast.ApexParserVisitor %} and its implementations. - Use {% jdoc apex::lang.apex.ast.ApexNode %} instead, now considers comments too. - -##### For removal - -* pmd-core - * Many methods on the {% jdoc core::lang.ast.Node %} interface - and {% jdoc core::lang.ast.AbstractNode %} base class. See their javadoc for details. - * {% jdoc !!core::lang.ast.Node#isFindBoundary() %} is deprecated for XPath queries. -* pmd-java - * {% jdoc java::lang.java.AbstractJavaParser %} - * {% jdoc java::lang.java.AbstractJavaHandler %} - * [`ASTAnyTypeDeclaration.TypeKind`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.TypeKind.html) - * {% jdoc !!java::lang.java.ast.ASTAnyTypeDeclaration#getKind() %} - * {% jdoc java::lang.java.ast.JavaQualifiedName %} - * {% jdoc !!java::lang.java.ast.ASTCatchStatement#getBlock() %} - * {% jdoc !!java::lang.java.ast.ASTCompilationUnit#declarationsAreInDefaultPackage() %} - * {% jdoc java::lang.java.ast.JavaQualifiableNode %} - * {% jdoc !!java::lang.java.ast.ASTAnyTypeDeclaration#getQualifiedName() %} - * {% jdoc !!java::lang.java.ast.ASTMethodOrConstructorDeclaration#getQualifiedName() %} - * {% jdoc !!java::lang.java.ast.ASTLambdaExpression#getQualifiedName() %} - * {% jdoc_package java::lang.java.qname %} and its contents - * {% jdoc java::lang.java.ast.MethodLikeNode %} - * Its methods will also be removed from its implementations, - {% jdoc java::lang.java.ast.ASTMethodOrConstructorDeclaration %}, - {% jdoc java::lang.java.ast.ASTLambdaExpression %}. - * {% jdoc !!java::lang.java.ast.ASTAnyTypeDeclaration#getImage() %} will be removed. Please use `getSimpleName()` - instead. This affects {% jdoc !!java::lang.java.ast.ASTAnnotationTypeDeclaration#getImage() %}, - {% jdoc !!java::lang.java.ast.ASTClassOrInterfaceDeclaration#getImage() %}, and - {% jdoc !!java::lang.java.ast.ASTEnumDeclaration#getImage() %}. - * Several methods of {% jdoc java::lang.java.ast.ASTTryStatement %}, replacements with other names - have been added. This includes the XPath attribute `@Finally`, replace it with a test for `child::FinallyStatement`. - * Several methods named `getGuardExpressionNode` are replaced with `getCondition`. This affects the - following nodes: WhileStatement, DoStatement, ForStatement, IfStatement, AssertStatement, ConditionalExpression. - * {% jdoc java::lang.java.ast.ASTYieldStatement %} will not implement {% jdoc java::lang.java.ast.TypeNode %} - anymore come 7.0.0. Test the type of the expression nested within it. - - ### External Contributions -* [#2041](https://github.com/pmd/pmd/pull/2041): \[modelica] Initial implementation for PMD - [Anatoly Trosinenko](https://github.com/atrosinenko) -* [#2051](https://github.com/pmd/pmd/pull/2051): \[doc] Update the docs on adding a new language - [Anatoly Trosinenko](https://github.com/atrosinenko) -* [#2069](https://github.com/pmd/pmd/pull/2069): \[java] CommentRequired: make property names consistent - [snuyanzin](https://github.com/snuyanzin) -* [#2169](https://github.com/pmd/pmd/pull/2169): \[modelica] Follow-up fixes for Modelica language module - [Anatoly Trosinenko](https://github.com/atrosinenko) -* [#2193](https://github.com/pmd/pmd/pull/2193): \[core] Fix odd logic in test runner - [Egor Bredikhin](https://github.com/Egor18) -* [#2194](https://github.com/pmd/pmd/pull/2194): \[java] Fix odd logic in AvoidUsingHardCodedIPRule - [Egor Bredikhin](https://github.com/Egor18) -* [#2195](https://github.com/pmd/pmd/pull/2195): \[modelica] Normalize invalid node ranges - [Anatoly Trosinenko](https://github.com/atrosinenko) -* [#2199](https://github.com/pmd/pmd/pull/2199): \[modelica] Fix Javadoc tags - [Anatoly Trosinenko](https://github.com/atrosinenko) -* [#2225](https://github.com/pmd/pmd/pull/2225): \[core] CPD: report endLine / column informations for found duplications - [Maikel Steneker](https://github.com/maikelsteneker) - {% endtocmaker %} diff --git a/docs/pages/release_notes_old.md b/docs/pages/release_notes_old.md index 1ae58be360..f7f5c558cd 100644 --- a/docs/pages/release_notes_old.md +++ b/docs/pages/release_notes_old.md @@ -5,6 +5,201 @@ permalink: pmd_release_notes_old.html Previous versions of PMD can be downloaded here: https://github.com/pmd/pmd/releases +## 24-January-2020 - 6.21.0 + +The PMD team is pleased to announce PMD 6.21.0. + +This is a minor release. + +### Table Of Contents + +* [New and noteworthy](#new-and-noteworthy) + * [Modelica support](#modelica-support) + * [Simple XML dump of AST](#simple-xml-dump-of-ast) + * [Updated Apex Support](#updated-apex-support) + * [CPD XML format](#cpd-xml-format) + * [Modified Rules](#modified-rules) +* [Fixed Issues](#fixed-issues) +* [API Changes](#api-changes) + * [Deprecated APIs](#deprecated-apis) + * [Internal API](#internal-api) + * [For removal](#for-removal) +* [External Contributions](#external-contributions) + +### New and noteworthy + +#### Modelica support + +Thanks to [Anatoly Trosinenko](https://github.com/atrosinenko) PMD supports now a new language: +[Modelica](https://modelica.org/modelicalanguage) is a language to model complex physical systems. +Both PMD and CPD are supported and there are already [3 rules available](pmd_rules_modelica.html). +The PMD Designer supports syntax highlighting for Modelica. + +While the language implementation is quite complete, Modelica support is considered experimental +for now. This is to allow us to change the rule API (e.g. the AST classes) slightly and improve +the implementation based on your feedback. + +#### Simple XML dump of AST + +We added a experimental feature to dump the AST of a source file into XML. The XML format +is of course PMD specific and language dependent. That XML file can be used to execute +(XPath) queries against without PMD. It can also be used as a textual visualization of the AST +if you don't want to use the [Designer](https://github.com/pmd/pmd-designer). + +This feature is experimental and might change or even be removed in the future, if it is not +useful. A short description how to use it is available under [Creating XML dump of the AST](pmd_devdocs_experimental_ast_dump.html). + +Any feedback about it, especially about your use cases, is highly appreciated. + +#### Updated Apex Support + +* The Apex language support has been bumped to version 48 (Spring '20). All new language features are now properly + parsed and processed. + +#### CPD XML format + +The CPD XML output format has been enhanced to also report column information for found duplications +in addition to the line information. This allows to display the exact tokens, that are considered +duplicate. + +If a CPD language doesn't provide these exact information, then these additional attributes are omitted. + +Each `` element in the XML format now has 3 new attributes: + +* attribute `endLine` +* attribute `beginColumn` (if there is column information available) +* attribute `endColumn` (if there is column information available) + +#### Modified Rules + +* The Java rule [`AvoidLiteralsInIfCondition`](https://pmd.github.io/pmd-6.21.0/pmd_rules_java_errorprone.html#avoidliteralsinifcondition) (`java-errorprone`) has a new property + `ignoreExpressions`. This property is set by default to `true` in order to maintain compatibility. If this + property is set to false, then literals in more complex expressions are considered as well. + +* The Apex rule [`ApexCSRF`](https://pmd.github.io/pmd-6.21.0/pmd_rules_apex_errorprone.html#apexcsrf) (`apex-errorprone`) has been moved from category + "Security" to "Error Prone". The Apex runtime already prevents DML statements from being executed, but only + at runtime. So, if you try to do this, you'll get an error at runtime, hence this is error prone. See also + the discussion on [#2064](https://github.com/pmd/pmd/issues/2064). + +* The Java rule [`CommentRequired`](https://pmd.github.io/pmd-6.21.0/pmd_rules_java_documentation.html#commentrequired) (`java-documentation`) has a new property + `classCommentRequirement`. This replaces the now deprecated property `headerCommentRequirement`, since + the name was misleading. (File) header comments are not checked, but class comments are. + +### Fixed Issues + +* apex + * [#2208](https://github.com/pmd/pmd/issues/2208): \[apex] ASTFormalComment should implement ApexNode<T> +* core + * [#1984](https://github.com/pmd/pmd/issues/1984): \[java] Cyclomatic complexity is misreported (lack of clearing metrics cache) + * [#2006](https://github.com/pmd/pmd/issues/2006): \[core] PMD should warn about multiple instances of the same rule in a ruleset + * [#2161](https://github.com/pmd/pmd/issues/2161): \[core] ResourceLoader is deprecated and marked as internal but is exposed + * [#2170](https://github.com/pmd/pmd/issues/2170): \[core] DocumentFile doesn't preserve newlines +* doc + * [#2214](https://github.com/pmd/pmd/issues/2214): \[doc] Link broken in pmd documentation for writing Xpath rules +* java + * [#2212](https://github.com/pmd/pmd/issues/2212): \[java] JavaRuleViolation reports wrong class name +* java-bestpractices + * [#2149](https://github.com/pmd/pmd/issues/2149): \[java] JUnitAssertionsShouldIncludeMessage - False positive with assertEquals and JUnit5 +* java-codestyle + * [#2167](https://github.com/pmd/pmd/issues/2167): \[java] UnnecessaryLocalBeforeReturn false positive with variable captured by method reference +* java-documentation + * [#1683](https://github.com/pmd/pmd/issues/1683): \[java] CommentRequired property names are inconsistent +* java-errorprone + * [#2140](https://github.com/pmd/pmd/issues/2140): \[java] AvoidLiteralsInIfCondition: false negative for expressions + * [#2196](https://github.com/pmd/pmd/issues/2196): \[java] InvalidLogMessageFormat does not detect extra parameters when no placeholders +* java-performance + * [#2141](https://github.com/pmd/pmd/issues/2141): \[java] StringInstatiation: False negative with String-array access +* plsql + * [#2008](https://github.com/pmd/pmd/issues/2008): \[plsql] In StringLiteral using alternative quoting mechanism single quotes cause parsing errors + * [#2009](https://github.com/pmd/pmd/issues/2009): \[plsql] Multiple DDL commands are skipped during parsing + +### API Changes + + +#### Deprecated APIs + +##### Internal API + +Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0. +You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning. + +* [`JavaLanguageHandler`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/JavaLanguageHandler.html#) +* [`JavaLanguageParser`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/JavaLanguageParser.html#) +* [`JavaDataFlowHandler`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/JavaDataFlowHandler.html#) +* Implementations of [`RuleViolationFactory`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#) in each + language module, eg [`JavaRuleViolationFactory`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/rule/JavaRuleViolationFactory.html#). + See javadoc of [`RuleViolationFactory`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#). +* Implementations of [`RuleViolation`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/RuleViolation.html#) in each language module, + eg [`JavaRuleViolation`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/rule/JavaRuleViolation.html#). See javadoc of + [`RuleViolation`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/RuleViolation.html#). + +* [`RuleFactory`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/rules/RuleFactory.html#) +* [`RuleBuilder`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/rules/RuleBuilder.html#) +* Constructors of [`RuleSetFactory`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/RuleSetFactory.html#), use factory methods from [`RulesetsFactoryUtils`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#) instead +* [`getRulesetFactory`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#getRulesetFactory(net.sourceforge.pmd.PMDConfiguration,net.sourceforge.pmd.util.ResourceLoader)) + +* [`AbstractApexNode`](https://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.21.0/net/sourceforge/pmd/lang/apex/ast/AbstractApexNode.html#) +* [`AbstractApexNodeBase`](https://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.21.0/net/sourceforge/pmd/lang/apex/ast/AbstractApexNodeBase.html#), and the related `visit` +methods on [`ApexParserVisitor`](https://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.21.0/net/sourceforge/pmd/lang/apex/ast/ApexParserVisitor.html#) and its implementations. + Use [`ApexNode`](https://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.21.0/net/sourceforge/pmd/lang/apex/ast/ApexNode.html#) instead, now considers comments too. + +* [`CharStream`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/ast/CharStream.html#), [`JavaCharStream`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/ast/JavaCharStream.html#), +[`SimpleCharStream`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/ast/SimpleCharStream.html#): these are APIs used by our JavaCC +implementations and that will be moved/refactored for PMD 7.0.0. They should not +be used, extended or implemented directly. +* All classes generated by JavaCC, eg [`JJTJavaParserState`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/ast/JJTJavaParserState.html#). +This includes token classes, which will be replaced with a single implementation, and +subclasses of [`ParseException`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/ast/ParseException.html#), whose usages will be replaced +by just that superclass. + + +##### For removal + +* pmd-core + * Many methods on the [`Node`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/ast/Node.html#) interface + and [`AbstractNode`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/ast/AbstractNode.html#) base class. See their javadoc for details. + * [`Node#isFindBoundary`](https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.21.0/net/sourceforge/pmd/lang/ast/Node.html#isFindBoundary()) is deprecated for XPath queries. +* pmd-java + * [`AbstractJavaParser`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/AbstractJavaParser.html#) + * [`AbstractJavaHandler`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/AbstractJavaHandler.html#) + * [`ASTAnyTypeDeclaration.TypeKind`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.TypeKind.html) + * [`ASTAnyTypeDeclaration#getKind`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getKind()) + * [`JavaQualifiedName`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/JavaQualifiedName.html#) + * [`ASTCatchStatement#getBlock`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTCatchStatement.html#getBlock()) + * [`ASTCompilationUnit#declarationsAreInDefaultPackage`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTCompilationUnit.html#declarationsAreInDefaultPackage()) + * [`JavaQualifiableNode`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/JavaQualifiableNode.html#) + * [`ASTAnyTypeDeclaration#getQualifiedName`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getQualifiedName()) + * [`ASTMethodOrConstructorDeclaration#getQualifiedName`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTMethodOrConstructorDeclaration.html#getQualifiedName()) + * [`ASTLambdaExpression#getQualifiedName`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTLambdaExpression.html#getQualifiedName()) + * [`net.sourceforge.pmd.lang.java.qname`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/qname/package-summary.html#) and its contents + * [`MethodLikeNode`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/MethodLikeNode.html#) + * Its methods will also be removed from its implementations, + [`ASTMethodOrConstructorDeclaration`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTMethodOrConstructorDeclaration.html#), + [`ASTLambdaExpression`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTLambdaExpression.html#). + * [`ASTAnyTypeDeclaration#getImage`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getImage()) will be removed. Please use `getSimpleName()` + instead. This affects [`ASTAnnotationTypeDeclaration#getImage`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTAnnotationTypeDeclaration.html#getImage()), + [`ASTClassOrInterfaceDeclaration#getImage`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceDeclaration.html#getImage()), and + [`ASTEnumDeclaration#getImage`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTEnumDeclaration.html#getImage()). + * Several methods of [`ASTTryStatement`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTTryStatement.html#), replacements with other names + have been added. This includes the XPath attribute `@Finally`, replace it with a test for `child::FinallyStatement`. + * Several methods named `getGuardExpressionNode` are replaced with `getCondition`. This affects the + following nodes: WhileStatement, DoStatement, ForStatement, IfStatement, AssertStatement, ConditionalExpression. + * [`ASTYieldStatement`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTYieldStatement.html#) will not implement [`TypeNode`](https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/TypeNode.html#) + anymore come 7.0.0. Test the type of the expression nested within it. + + +### External Contributions + +* [#2041](https://github.com/pmd/pmd/pull/2041): \[modelica] Initial implementation for PMD - [Anatoly Trosinenko](https://github.com/atrosinenko) +* [#2051](https://github.com/pmd/pmd/pull/2051): \[doc] Update the docs on adding a new language - [Anatoly Trosinenko](https://github.com/atrosinenko) +* [#2069](https://github.com/pmd/pmd/pull/2069): \[java] CommentRequired: make property names consistent - [snuyanzin](https://github.com/snuyanzin) +* [#2169](https://github.com/pmd/pmd/pull/2169): \[modelica] Follow-up fixes for Modelica language module - [Anatoly Trosinenko](https://github.com/atrosinenko) +* [#2193](https://github.com/pmd/pmd/pull/2193): \[core] Fix odd logic in test runner - [Egor Bredikhin](https://github.com/Egor18) +* [#2194](https://github.com/pmd/pmd/pull/2194): \[java] Fix odd logic in AvoidUsingHardCodedIPRule - [Egor Bredikhin](https://github.com/Egor18) +* [#2195](https://github.com/pmd/pmd/pull/2195): \[modelica] Normalize invalid node ranges - [Anatoly Trosinenko](https://github.com/atrosinenko) +* [#2199](https://github.com/pmd/pmd/pull/2199): \[modelica] Fix Javadoc tags - [Anatoly Trosinenko](https://github.com/atrosinenko) +* [#2225](https://github.com/pmd/pmd/pull/2225): \[core] CPD: report endLine / column informations for found duplications - [Maikel Steneker](https://github.com/maikelsteneker) + ## 29-November-2019 - 6.20.0 The PMD team is pleased to announce PMD 6.20.0. diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/metrics/ApexMetricsProvider.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/metrics/ApexMetricsProvider.java index c3a227b24c..ed38ee0436 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/metrics/ApexMetricsProvider.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/metrics/ApexMetricsProvider.java @@ -7,12 +7,14 @@ package net.sourceforge.pmd.lang.apex.metrics; import java.util.Arrays; import java.util.List; +import net.sourceforge.pmd.annotation.InternalApi; import net.sourceforge.pmd.lang.apex.ast.ASTMethod; import net.sourceforge.pmd.lang.apex.ast.ASTUserClassOrInterface; import net.sourceforge.pmd.lang.apex.metrics.api.ApexClassMetricKey; import net.sourceforge.pmd.lang.apex.metrics.api.ApexOperationMetricKey; import net.sourceforge.pmd.lang.metrics.internal.AbstractLanguageMetricsProvider; +@InternalApi public class ApexMetricsProvider extends AbstractLanguageMetricsProvider, ASTMethod> { @SuppressWarnings("unchecked") diff --git a/pmd-core/src/main/ant/alljavacc.xml b/pmd-core/src/main/ant/alljavacc.xml index 9e13af685f..70e6be4959 100644 --- a/pmd-core/src/main/ant/alljavacc.xml +++ b/pmd-core/src/main/ant/alljavacc.xml @@ -51,6 +51,10 @@ outputdirectory="${tmp-package.dir}" javacchome="${javacc-home.path}" /> + + - - + + @@ -98,7 +106,7 @@ + value="@Deprecated @net.sourceforge.pmd.annotation.InternalApi public class SimpleCharStream implements CharStream" /> ruleChainVisitorClass; protected List extensions; + private final List distinctVersions = new ArrayList<>(); protected Map versions; protected LanguageVersion defaultVersion; @@ -45,6 +46,8 @@ public abstract class BaseLanguageModule implements Language { LanguageVersion languageVersion = new LanguageVersion(this, languageVersions[0], languageVersionHandler); + distinctVersions.add(languageVersion); + for (String version : languageVersions) { versions.put(version, languageVersion); } @@ -55,14 +58,7 @@ public abstract class BaseLanguageModule implements Language { } protected void addVersion(String version, LanguageVersionHandler languageVersionHandler, boolean isDefault) { - if (versions == null) { - versions = new HashMap<>(); - } - LanguageVersion languageVersion = new LanguageVersion(this, version, languageVersionHandler); - versions.put(version, languageVersion); - if (isDefault) { - defaultVersion = languageVersion; - } + addVersions(languageVersionHandler, isDefault, version); } @Override @@ -98,7 +94,7 @@ public abstract class BaseLanguageModule implements Language { @Override public List getVersions() { - return new ArrayList<>(versions.values()); + return new ArrayList<>(distinctVersions); } @Override diff --git a/pmd-cpp/src/main/ant/alljavacc.xml b/pmd-cpp/src/main/ant/alljavacc.xml index 9347d126e4..800af4264b 100644 --- a/pmd-cpp/src/main/ant/alljavacc.xml +++ b/pmd-cpp/src/main/ant/alljavacc.xml @@ -91,6 +91,23 @@ public class Token implements GenericToken, java.io.Serializable]]> + + + + + + + + + + + + + + + + - + diff --git a/pmd-cpp/src/main/java/net/sourceforge/pmd/lang/cpp/CppCharStream.java b/pmd-cpp/src/main/java/net/sourceforge/pmd/lang/cpp/CppCharStream.java index 97e9540b85..de9332cc12 100644 --- a/pmd-cpp/src/main/java/net/sourceforge/pmd/lang/cpp/CppCharStream.java +++ b/pmd-cpp/src/main/java/net/sourceforge/pmd/lang/cpp/CppCharStream.java @@ -8,6 +8,7 @@ import java.io.IOException; import java.io.Reader; import java.util.regex.Pattern; +import net.sourceforge.pmd.annotation.InternalApi; import net.sourceforge.pmd.lang.ast.SimpleCharStream; /** @@ -16,6 +17,8 @@ import net.sourceforge.pmd.lang.ast.SimpleCharStream; * * @author Andreas Dangel */ +@Deprecated +@InternalApi public class CppCharStream extends SimpleCharStream { private static final Pattern CONTINUATION = Pattern.compile("\\\\\\n|\\\\\\r\\n"); diff --git a/pmd-java/src/main/ant/alljavacc.xml b/pmd-java/src/main/ant/alljavacc.xml index 744ef4f31c..4b451f1587 100644 --- a/pmd-java/src/main/ant/alljavacc.xml +++ b/pmd-java/src/main/ant/alljavacc.xml @@ -229,5 +229,21 @@ public class]]> + + + + + + + + + + + + + + + diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/metrics/JavaMetricsProvider.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/metrics/JavaMetricsProvider.java index 8070454c64..45f38fe498 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/metrics/JavaMetricsProvider.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/metrics/JavaMetricsProvider.java @@ -7,6 +7,7 @@ package net.sourceforge.pmd.lang.java.metrics; import java.util.Arrays; import java.util.List; +import net.sourceforge.pmd.annotation.InternalApi; import net.sourceforge.pmd.lang.java.ast.ASTAnyTypeDeclaration; import net.sourceforge.pmd.lang.java.ast.MethodLikeNode; import net.sourceforge.pmd.lang.java.metrics.api.JavaClassMetricKey; @@ -14,6 +15,7 @@ import net.sourceforge.pmd.lang.java.metrics.api.JavaOperationMetricKey; import net.sourceforge.pmd.lang.metrics.MetricKey; import net.sourceforge.pmd.lang.metrics.internal.AbstractLanguageMetricsProvider; +@InternalApi public class JavaMetricsProvider extends AbstractLanguageMetricsProvider { public JavaMetricsProvider() { diff --git a/pmd-javascript/src/main/ant/alljavacc.xml b/pmd-javascript/src/main/ant/alljavacc.xml index 6f7a0a7bc4..405026b5cd 100644 --- a/pmd-javascript/src/main/ant/alljavacc.xml +++ b/pmd-javascript/src/main/ant/alljavacc.xml @@ -90,5 +90,22 @@ public class Token implements GenericToken, java.io.Serializable]]> + + + + + + + + + + + + + + + + diff --git a/pmd-jsp/src/main/ant/alljavacc.xml b/pmd-jsp/src/main/ant/alljavacc.xml index 34207aa4a6..066a3c7c03 100644 --- a/pmd-jsp/src/main/ant/alljavacc.xml +++ b/pmd-jsp/src/main/ant/alljavacc.xml @@ -116,6 +116,23 @@ public class Token implements GenericToken, java.io.Serializable]]> + + + + + + + + + + + + + + + + diff --git a/pmd-matlab/src/main/ant/alljavacc.xml b/pmd-matlab/src/main/ant/alljavacc.xml index ecf431f7b6..646b4740f1 100644 --- a/pmd-matlab/src/main/ant/alljavacc.xml +++ b/pmd-matlab/src/main/ant/alljavacc.xml @@ -90,6 +90,23 @@ public class Token implements GenericToken, java.io.Serializable]]> + + + + + + + + + + + + + + + + diff --git a/pmd-modelica/src/main/ant/alljavacc.xml b/pmd-modelica/src/main/ant/alljavacc.xml index 866f4be282..2f1674b358 100644 --- a/pmd-modelica/src/main/ant/alljavacc.xml +++ b/pmd-modelica/src/main/ant/alljavacc.xml @@ -153,5 +153,22 @@ public class Token implements GenericToken, java.io.Serializable]]> + + + + + + + + + + + + + + + + diff --git a/pmd-objectivec/src/main/ant/alljavacc.xml b/pmd-objectivec/src/main/ant/alljavacc.xml index 26ab8cd3d9..16a4dd9e84 100644 --- a/pmd-objectivec/src/main/ant/alljavacc.xml +++ b/pmd-objectivec/src/main/ant/alljavacc.xml @@ -90,6 +90,23 @@ public class Token implements GenericToken, java.io.Serializable]]> + + + + + + + + + + + + + + + + diff --git a/pmd-plsql/src/main/ant/alljavacc.xml b/pmd-plsql/src/main/ant/alljavacc.xml index aa78c81a12..6c023759b8 100644 --- a/pmd-plsql/src/main/ant/alljavacc.xml +++ b/pmd-plsql/src/main/ant/alljavacc.xml @@ -140,5 +140,20 @@ public class Token implements GenericToken, java.io.Serializable]]> + + + + + + + + + + + + + + diff --git a/pmd-python/src/main/ant/alljavacc.xml b/pmd-python/src/main/ant/alljavacc.xml index b876617263..1996f86bf1 100644 --- a/pmd-python/src/main/ant/alljavacc.xml +++ b/pmd-python/src/main/ant/alljavacc.xml @@ -90,6 +90,23 @@ public class Token implements GenericToken, java.io.Serializable]]> + + + + + + + + + + + + + + + + diff --git a/pmd-test/src/main/java/net/sourceforge/pmd/AbstractLanguageVersionTest.java b/pmd-test/src/main/java/net/sourceforge/pmd/AbstractLanguageVersionTest.java index c9984f1b0b..0827d2aa03 100644 --- a/pmd-test/src/main/java/net/sourceforge/pmd/AbstractLanguageVersionTest.java +++ b/pmd-test/src/main/java/net/sourceforge/pmd/AbstractLanguageVersionTest.java @@ -136,6 +136,25 @@ public class AbstractLanguageVersionTest { } } + @Test + public void testVersionsAreDistinct() { + if (expected == null) { + return; + } + + Language lang = expected.getLanguage(); + + int count = 0; + for (LanguageVersion lv : lang.getVersions()) { + if (lv.equals(expected)) { + count++; + } + } + + assertEquals("Expected exactly one occurrence of " + expected + + " in the language versions of its language", 1, count); + } + private void assertRulesetsAndCategoriesProperties(ResourceLoader rl, Properties props) throws IOException, RuleSetNotFoundException { String rulesetFilenames = props.getProperty("rulesets.filenames"); diff --git a/pmd-visualforce/src/main/ant/alljavacc.xml b/pmd-visualforce/src/main/ant/alljavacc.xml index b2463ff956..9c3046499d 100644 --- a/pmd-visualforce/src/main/ant/alljavacc.xml +++ b/pmd-visualforce/src/main/ant/alljavacc.xml @@ -33,7 +33,7 @@ javacchome="${javacc-home.path}" /> - + + + + + + + + + + + + + + + + diff --git a/pmd-vm/src/main/ant/alljavacc.xml b/pmd-vm/src/main/ant/alljavacc.xml index 845e8da6f7..ef845cdb3c 100644 --- a/pmd-vm/src/main/ant/alljavacc.xml +++ b/pmd-vm/src/main/ant/alljavacc.xml @@ -124,5 +124,22 @@ public class Token implements GenericToken, java.io.Serializable]]> + + + + + + + + + + + + + + + + diff --git a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/ast/TemplateParseException.java b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/ast/TemplateParseException.java index 3f4122123f..e41a76a3be 100644 --- a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/ast/TemplateParseException.java +++ b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/ast/TemplateParseException.java @@ -32,6 +32,7 @@ import net.sourceforge.pmd.lang.vm.util.LogUtil; * $ * @since 1.5 */ +@Deprecated public class TemplateParseException extends ParseException { private static final long serialVersionUID = -3146323135623083918L; diff --git a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/util/VelocityCharStream.java b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/util/VelocityCharStream.java index 78a3e91fa3..ed4e79ec23 100644 --- a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/util/VelocityCharStream.java +++ b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/util/VelocityCharStream.java @@ -19,7 +19,7 @@ import net.sourceforge.pmd.lang.ast.CharStream; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ /** @@ -36,8 +36,10 @@ import net.sourceforge.pmd.lang.ast.CharStream; /** * An implementation of interface CharStream, where the stream is assumed to * contain only ASCII characters (without unicode processing). + * + * @deprecated Will be removed, replaced with SimpleCharStream */ - +@Deprecated public final class VelocityCharStream implements CharStream { public static final boolean STATIC_FLAG = false; int bufsize; @@ -401,7 +403,7 @@ public final class VelocityCharStream implements CharStream { /** * Method to adjust line and column numbers for the start of a token.
- * + * * @param newLine * @param newCol */