Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Dec 10, 2023
1 parent 666a074 commit 15fe85c
Show file tree
Hide file tree
Showing 9 changed files with 275 additions and 193 deletions.
21 changes: 12 additions & 9 deletions src/main/java/org/htmlunit/xpath/XPath.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,16 @@ public XObject execute(

try {
xobj = m_mainExp.execute(xctxt);
} catch (final TransformerException te) {
}
catch (final TransformerException te) {
te.setLocator(this.getLocator());
final ErrorListener el = xctxt.getErrorListener();
if (null != el) // defensive, should never happen.
{
if (null != el) {// defensive, should never happen.
el.error(te);
} else throw te;
} catch (Exception e) {
}
else throw te;
}
catch (Exception e) {
while (e instanceof org.htmlunit.xpath.xml.utils.WrappedRuntimeException) {
e = ((org.htmlunit.xpath.xml.utils.WrappedRuntimeException) e).getException();
}
Expand All @@ -225,11 +227,12 @@ public XObject execute(
}
final TransformerException te = new TransformerException(msg, getLocator(), e);
final ErrorListener el = xctxt.getErrorListener();
if (null != el) // defensive, should never happen.
{
if (null != el) { // defensive, should never happen.
el.fatalError(te);
} else throw te;
} finally {
}
else throw te;
}
finally {
xctxt.popNamespaceContext();

xctxt.popCurrentNodeAndExpression();
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/org/htmlunit/xpath/XPathVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,14 @@ public boolean visitMatchPattern() {
}

/** Visit a union pattern. */
public void visitUnionPattern() {}
public void visitUnionPattern() {
}

/** Visit a string literal. */
public void visitStringLiteral() {}
public void visitStringLiteral() {
}

/** Visit a number literal. */
public void visitNumberLiteral() {}
public void visitNumberLiteral() {
}
}
Loading

0 comments on commit 15fe85c

Please sign in to comment.