Skip to content

Commit 2147937

Browse files
committed
Deprecate Parser.Parser()
1 parent 09d2d23 commit 2147937

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ The <action> type attribute can be add,update,fix,remove.
126126
<action dev="ggregory" type="fix" due-to="Gary Gregory">Deprecate JXPathIntrospector.JXPathIntrospector().</action>
127127
<action dev="ggregory" type="fix" due-to="Gary Gregory">Deprecate InfoSetUtil.InfoSetUtil().</action>
128128
<action dev="ggregory" type="fix" due-to="Gary Gregory">Deprecate Constants.Constants().</action>
129+
<action dev="ggregory" type="fix" due-to="Gary Gregory">Deprecate Parser.Parser().</action>
129130
<!-- ADD -->
130131
<action issue="JXPATH-123" dev="mbenson" type="add">
131132
XPath function "ends-with" is not implemented (although "starts-with" is).

src/main/java/org/apache/commons/jxpath/ri/Parser.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
import org.apache.commons.jxpath.ri.parser.XPathParser;
2626

2727
/**
28-
* XPath parser
28+
* XPath parser.
2929
*/
3030
public class Parser {
3131

3232
private static final XPathParser PARSER = new XPathParser(new StringReader(""));
33-
33+
3434
/**
3535
* Add escapes to the specified String.
3636
*
@@ -83,4 +83,14 @@ public static Object parseExpression(final String expression, final Compiler com
8383
return expr;
8484
}
8585
}
86+
87+
/**
88+
* Constructs a new instance.
89+
*
90+
*@deprecated Will be private in the next major version.
91+
*/
92+
@Deprecated
93+
public Parser() {
94+
// empty
95+
}
8696
}

0 commit comments

Comments
 (0)