Skip to content

Commit

Permalink
Removed previously deprecated classes and methods (#2094)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhy authored Dec 30, 2023
1 parent bf40e9c commit 15558b4
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 202 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
* Added `Path` accepting parse methods: `Jsoup.parse(Path)`, `Jsoup.parse(path, charsetName, baseUri, parser)`,
etc. [2055](https://github.com/jhy/jsoup/pull/2055)

### Changes

* Removed previously deprecated internal classes and methods. [2094](https://github.com/jhy/jsoup/pull/2094)

---

## 1.17.2 (2023-Dec-29)
Expand Down
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.16.2</version>
<version>1.17.1</version>
<type>jar</type>
</dependency>
</oldVersion>
Expand All @@ -245,7 +245,8 @@
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
<breakBuildOnSourceIncompatibleModifications>true</breakBuildOnSourceIncompatibleModifications>
<excludes>
<!-- <exclude>@java.lang.Deprecated</exclude> -->
<exclude>@java.lang.Deprecated</exclude>
<exclude>org.jsoup.UncheckedIOException</exclude>
</excludes>
<overrideCompatibilityChangeParameters>
<!-- allows new default and move to default methods. compatible as long as existing binaries aren't making calls via reflection. if so, they need to catch errors anyway. -->
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jsoup/UncheckedIOException.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @deprecated Use {@link java.io.UncheckedIOException} instead. This class acted as a compatibility shim for Java
* versions prior to 1.8.
*/
// todo annotate @Deprecated in next release (after previous @Deprecations clear)
@Deprecated
public class UncheckedIOException extends java.io.UncheckedIOException {
public UncheckedIOException(IOException cause) {
super(cause);
Expand Down
100 changes: 0 additions & 100 deletions src/main/java/org/jsoup/internal/ConstrainableInputStream.java

This file was deleted.

17 changes: 0 additions & 17 deletions src/main/java/org/jsoup/internal/FieldsAreNonnullByDefault.java

This file was deleted.

17 changes: 0 additions & 17 deletions src/main/java/org/jsoup/internal/NonnullByDefault.java

This file was deleted.

17 changes: 0 additions & 17 deletions src/main/java/org/jsoup/internal/ReturnsAreNonnullByDefault.java

This file was deleted.

6 changes: 0 additions & 6 deletions src/main/java/org/jsoup/nodes/Range.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,6 @@ static Range of(Node node, boolean start) {
return range != null ? (Range) range : Untracked;
}

/**
@deprecated no-op; internal method moved out of visibility
*/
@Deprecated
public void track(Node node, boolean start) {}

@Override
public boolean equals(Object o) {
if (this == o) return true;
Expand Down
14 changes: 0 additions & 14 deletions src/main/java/org/jsoup/parser/XmlTreeBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,20 +131,6 @@ void insertDoctypeFor(Token.Doctype token) {
insertLeafNode(doctypeNode);
}

/** @deprecated unused and will be removed. */
@Deprecated
protected void insertNode(Node node) {
currentElement().appendChild(node);
onNodeInserted(node);
}

/** @deprecated unused and will be removed. */
@Deprecated
protected void insertNode(Node node, Token token) {
currentElement().appendChild(node);
onNodeInserted(node);
}

/**
* If the stack contains an element with this tag's name, pop up the stack to remove the first occurrence. If not
* found, skips.
Expand Down
28 changes: 0 additions & 28 deletions src/main/java/org/jsoup/select/StructuralEvaluator.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,34 +155,6 @@ public String toString() {
}
}

/**
@deprecated replaced by {@link ImmediateParentRun}
*/
@Deprecated
static class ImmediateParent extends StructuralEvaluator {
public ImmediateParent(Evaluator evaluator) {
super(evaluator);
}

@Override
public boolean matches(Element root, Element element) {
if (root == element)
return false;

Element parent = element.parent();
return parent != null && memoMatches(root, parent);
}

@Override protected int cost() {
return 1 + evaluator.cost();
}

@Override
public String toString() {
return String.format("%s > ", evaluator);
}
}

/**
Holds a list of evaluators for one > two > three immediate parent matches, and the final direct evaluator under
test. To match, these are effectively ANDed together, starting from the last, matching up to the first.
Expand Down

0 comments on commit 15558b4

Please sign in to comment.