Deprecate parser options in some places

There is no way to introduce the new API
in a binary compatible change, so LVHandler::getDefaultParserOptions,
LVHandler::getParser and Parser::parse
will remain like this until 7.0 and be
broken.
This commit is contained in:
Clément Fournier committed 2020-07-28 14:25:51 +02:00
1 parent fe82f6a448
commit 9a37ab4962
4 files changed
+10

No files matched your search

@@ -6,6 +6,7 @@ package net.sourceforge.pmd.lang.apex;
import net.sourceforge.pmd.lang.ParserOptions;
@Deprecated
public class ApexParserOptions extends ParserOptions {
// empty class for now, since we don't have extra options for Apex
@@ -255,7 +255,11 @@ public interface Rule extends PropertySource {
* should return a new instance on each call.
*
* @return the parser options
*
* @deprecated This was never implemented and will never be. PMD
* cannot parse files once per rule.
*/
@Deprecated
ParserOptions getParserOptions();
/**
@@ -16,9 +16,13 @@ import net.sourceforge.pmd.lang.ast.ParseException;
* @author Pieter_Van_Raemdonck - Application Engineers NV/SA - www.ae.be
*/
public interface Parser {
/**
* Get the ParserOptions used by this Parser.
*
* @deprecated Parser options should be a parameter to {@link #parse(String, Reader)}
*/
@Deprecated
ParserOptions getParserOptions();
/**
@@ -229,6 +229,7 @@ public abstract class AbstractRule extends AbstractPropertySource implements Rul
* @see Rule#setPriority(RulePriority)
*/
@Override
@Deprecated
public ParserOptions getParserOptions() {
return new ParserOptions();
}