Skip to content

Commit

Permalink
feat(#277): fix all the code offences
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Dec 5, 2024
1 parent 4520d07 commit 5709e1a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
8 changes: 7 additions & 1 deletion src/main/java/com/jcabi/xml/SaxonDocument.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,13 @@ public XML merge(final NamespaceContext context) {
);
}

@Override
/**
* Retrieve DOM node, represented by this wrapper.
* This method works exactly the same as {@link #deepCopy()}.
* @deprecated Use {@link #inner()} or {@link #deepCopy()} instead.
* @return Deep copy of the inner DOM node.
*/
@Deprecated
public Node node() {
throw new UnsupportedOperationException(
String.format(SaxonDocument.UNSUPPORTED, "node")
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/com/jcabi/xml/StrictXML.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,13 @@ public XML merge(final NamespaceContext context) {
return this.origin.merge(context);
}

@Override
/**
* Retrieve DOM node, represented by this wrapper.
* This method works exactly the same as {@link #deepCopy()}.
* @deprecated Use {@link #inner()} or {@link #deepCopy()} instead.
* @return Deep copy of the inner DOM node.
*/
@Deprecated
public Node node() {
return this.origin.deepCopy();
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/jcabi/xml/XML.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ public interface XML {

/**
* Retrieve DOM node, represented by this wrapper.
* This method is deprecated, use {@link #inner()} ()} and {@link #deepCopy()} methods instead.
* This method works exactly the same as {@link #deepCopy()}.
* @return DOM node
* @deprecated Use {@link #inner()} or {@link #deepCopy()} instead.
* @return Deep copy of the inner DOM node.
*/
@Deprecated
Node node();
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/com/jcabi/xml/XMLDocument.java
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,13 @@ public int hashCode() {
return this.cache.hashCode();
}

@Override
/**
* Retrieve DOM node, represented by this wrapper.
* This method works exactly the same as {@link #deepCopy()}.
* @deprecated Use {@link #inner()} or {@link #deepCopy()} instead.
* @return Deep copy of the inner DOM node.
*/
@Deprecated
public Node node() {
return this.deepCopy();
}
Expand Down

0 comments on commit 5709e1a

Please sign in to comment.