Skip to content

Commit 105a874

Browse files
committed
cleanup
1 parent 175e84c commit 105a874

4 files changed

Lines changed: 0 additions & 83 deletions

File tree

src/main/java/net/sourceforge/htmlunit/xpath/Expression.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -197,28 +197,6 @@ protected final boolean isSameClass(Expression expr) {
197197
return getClass() == expr.getClass();
198198
}
199199

200-
/**
201-
* Warn the user of an problem.
202-
*
203-
* @param xctxt The XPath runtime context.
204-
* @param msg An error msgkey that corresponds to one of the conststants found in {@link
205-
* net.sourceforge.htmlunit.xpath.res.XPATHErrorResources}, which is a key for a format
206-
* string.
207-
* @param args An array of arguments represented in the format string, which may be null.
208-
* @throws TransformerException if the current ErrorListoner determines to throw an exception.
209-
* @throws javax.xml.transform.TransformerException if any
210-
*/
211-
public void warn(XPathContext xctxt, String msg, Object[] args)
212-
throws javax.xml.transform.TransformerException {
213-
214-
java.lang.String fmsg = XPATHMessages.createXPATHWarning(msg, args);
215-
216-
if (null != xctxt) {
217-
ErrorListener eh = xctxt.getErrorListener();
218-
eh.warning(new TransformerException(fmsg));
219-
}
220-
}
221-
222200
/**
223201
* Tell the user of an assertion error, and probably throw an exception.
224202
*

src/main/java/net/sourceforge/htmlunit/xpath/XPath.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -290,27 +290,6 @@ public boolean bool(XPathContext xctxt, int contextNode, PrefixResolver namespac
290290
return false;
291291
}
292292

293-
/**
294-
* Warn the user of an problem.
295-
*
296-
* @param xctxt The XPath runtime context.
297-
* @param msg An error msgkey that corresponds to one of the constants found in {@link
298-
* net.sourceforge.htmlunit.xpath.res.XPATHErrorResources}, which is a key for a format
299-
* string.
300-
* @param args An array of arguments represented in the format string, which may be null.
301-
* @throws TransformerException if the current ErrorListoner determines to throw an exception.
302-
*/
303-
public void warn(XPathContext xctxt, String msg, Object[] args)
304-
throws javax.xml.transform.TransformerException {
305-
306-
String fmsg = XPATHMessages.createXPATHWarning(msg, args);
307-
ErrorListener ehandler = xctxt.getErrorListener();
308-
309-
if (null != ehandler) {
310-
ehandler.warning(new TransformerException(fmsg));
311-
}
312-
}
313-
314293
/**
315294
* Tell the user of an error, and probably throw an exception.
316295
*

src/main/java/net/sourceforge/htmlunit/xpath/compiler/XPathParser.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -301,28 +301,6 @@ private void consumeExpected(char expected) throws javax.xml.transform.Transform
301301
}
302302
}
303303

304-
/**
305-
* Warn the user of a problem.
306-
*
307-
* @param msg An error msgkey that corresponds to one of the constants found in {@link
308-
* net.sourceforge.htmlunit.xpath.res.XPATHErrorResources}, which is a key for a format
309-
* string.
310-
* @param args An array of arguments represented in the format string, which may be null.
311-
* @throws TransformerException if the current ErrorListoner determines to throw an exception.
312-
*/
313-
void warn(String msg, Object[] args) throws TransformerException {
314-
315-
String fmsg = XPATHMessages.createXPATHWarning(msg, args);
316-
ErrorListener ehandler = this.getErrorListener();
317-
318-
if (null != ehandler) {
319-
ehandler.warning(new TransformerException(fmsg));
320-
} else {
321-
// Should never happen.
322-
System.err.println(fmsg);
323-
}
324-
}
325-
326304
/**
327305
* Notify the user of an error, and probably throw an exception.
328306
*

src/main/java/net/sourceforge/htmlunit/xpath/res/XPATHMessages.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,6 @@ public static String createXPATHMessage(String msgKey, Object[] args) // throws
4242
return "Could not load any resource bundles.";
4343
}
4444

45-
/**
46-
* Creates a message from the specified key and replacement arguments, localized to the given
47-
* locale.
48-
*
49-
* @param msgKey The key for the message text.
50-
* @param args The arguments to be used as replacement text in the message created.
51-
* @return The formatted warning string.
52-
*/
53-
public static String createXPATHWarning(String msgKey, Object[] args) // throws Exception
54-
{
55-
if (XPATHBundle == null) {
56-
XPATHBundle = new XPATHErrorResources();
57-
}
58-
59-
return createXPATHMsg(XPATHBundle, msgKey, args);
60-
}
61-
6245
/**
6346
* Creates a message from the specified key and replacement arguments, localized to the given
6447
* locale.
@@ -84,7 +67,6 @@ private static String createXPATHMsg(
8467

8568
if (args != null) {
8669
try {
87-
8870
// Do this to keep format from crying.
8971
// This is better than making a bunch of conditional
9072
// code all over the place.

0 commit comments

Comments
 (0)