From 6b103e1e9d4bfcef5a10bcb7be5c827894bd75ce Mon Sep 17 00:00:00 2001 From: Jonathan Hedley Date: Thu, 5 Mar 2020 10:28:42 -0800 Subject: [PATCH] Updated min Android from 8 to 10. And changenote for #1335 --- CHANGES | 6 +++++- pom.xml | 6 +++--- src/main/java/org/jsoup/nodes/Attributes.java | 16 ++++------------ 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/CHANGES b/CHANGES index 31e1bfa7e2..44bc0194a5 100644 --- a/CHANGES +++ b/CHANGES @@ -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] diff --git a/pom.xml b/pom.xml index b691ec7f03..f125b7e89b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.jsoup jsoup - 1.13.2-SNAPSHOT + 1.14.1-SNAPSHOT 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. https://jsoup.org/ 2009 @@ -69,8 +69,8 @@ net.sf.androidscents.signature - android-api-level-8 - 2.2_r3 + android-api-level-10 + 2.3.3_r2 diff --git a/src/main/java/org/jsoup/nodes/Attributes.java b/src/main/java/org/jsoup/nodes/Attributes.java index 2d7def8c35..0f22f36cbf 100644 --- a/src/main/java/org/jsoup/nodes/Attributes.java +++ b/src/main/java/org/jsoup/nodes/Attributes.java @@ -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) { @@ -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; }