Skip to content

Commit

Permalink
Updated min Android from 8 to 10.
Browse files Browse the repository at this point in the history
And changenote for #1335
  • Loading branch information
jhy committed Mar 5, 2020
1 parent 8e432a5 commit 6b103e1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
6 changes: 5 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
jsoup changelog

*** Release 1.13.2 [PENDING]
*** Release 1.14.1 [PENDING]
* Change: updated the minimum supported Java version from Java 7 to Java 8.

* Change: updated the minimum Android API level from 8 to 10.

* Improvement: added support for loading and parsing gzipped HTML files in Jsoup.parse(File in, charset, baseUri).

*** Release 1.13.1 [2020-Feb-29]
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.13.2-SNAPSHOT</version>
<version>1.14.1-SNAPSHOT</version>
<description>jsoup is a Java library for working with real-world HTML. It provides a very convenient API for fetching URLs and extracting and manipulating data, using the best of HTML5 DOM methods and CSS selectors. jsoup implements the WHATWG HTML5 specification, and parses HTML to the same DOM as modern browsers do.</description>
<url>https://jsoup.org/</url>
<inceptionYear>2009</inceptionYear>
Expand Down Expand Up @@ -69,8 +69,8 @@
</signature>
<signature>
<groupId>net.sf.androidscents.signature</groupId>
<artifactId>android-api-level-8</artifactId>
<version>2.2_r3</version>
<artifactId>android-api-level-10</artifactId>
<version>2.3.3_r2</version>
</signature>
</configuration>
</execution>
Expand Down
16 changes: 4 additions & 12 deletions src/main/java/org/jsoup/nodes/Attributes.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,8 @@ private void checkCapacity(int minNewSize) {
if (minNewSize > newSize)
newSize = minNewSize;

keys = copyOf(keys, newSize);
vals = copyOf(vals, newSize);
}

// simple implementation of Arrays.copy, for support of Android API 8.
private static String[] copyOf(String[] orig, int size) {
final String[] copy = new String[size];
System.arraycopy(orig, 0, copy, 0,
Math.min(orig.length, size));
return copy;
keys = Arrays.copyOf(keys, newSize);
vals = Arrays.copyOf(vals, newSize);
}

int indexOfKey(String key) {
Expand Down Expand Up @@ -418,8 +410,8 @@ public Attributes clone() {
throw new RuntimeException(e);
}
clone.size = size;
keys = copyOf(keys, size);
vals = copyOf(vals, size);
keys = Arrays.copyOf(keys, size);
vals = Arrays.copyOf(vals, size);
return clone;
}

Expand Down

0 comments on commit 6b103e1

Please sign in to comment.