Update to upstream version 2.0.6.1
This commit is contained in:
parent
2a5600de74
commit
4c8ec1caec
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
/JDOM-2.0.5.tar.gz
|
||||
/JDOM-2.0.6.tar.gz
|
||||
/jdom2-2.0.6.tar.gz
|
||||
/jdom2-2.0.6.1.tar.gz
|
||||
|
@ -4,11 +4,11 @@ Date: Mon, 20 Apr 2020 09:29:12 +0200
|
||||
Subject: [PATCH] Adapt build
|
||||
|
||||
---
|
||||
build.xml | 54 +++---------------------------------------------------
|
||||
1 file changed, 3 insertions(+), 51 deletions(-)
|
||||
build.xml | 61 +++----------------------------------------------------
|
||||
1 file changed, 3 insertions(+), 58 deletions(-)
|
||||
|
||||
diff --git a/build.xml b/build.xml
|
||||
index cd7c2ed..16368e2 100644
|
||||
index ed632c2..d80abff 100644
|
||||
--- a/build.xml
|
||||
+++ b/build.xml
|
||||
@@ -112,17 +112,7 @@ For instructions on how to build JDOM, please view the README.txt file.
|
||||
@ -26,7 +26,7 @@ index cd7c2ed..16368e2 100644
|
||||
- <!-- this is used for testing Java5 (the test sets stax.dir) -->
|
||||
- <pathelement location="${stax.dir}/jsr173_1.0_api.jar" />
|
||||
- <pathelement location="${stax.dir}/sjsxp.jar" />
|
||||
+ <fileset dir="${lib.dir}" includes="*.jar" />
|
||||
+ <fileset dir="${lib.dir}" includes="*.jar" />
|
||||
</path>
|
||||
|
||||
<path id="core.class.path">
|
||||
@ -39,7 +39,7 @@ index cd7c2ed..16368e2 100644
|
||||
description="Builds the Jars">
|
||||
<fixcrlf srcdir="." includes="**/*.bat" excludes="build*.*" eol="crlf"/>
|
||||
<fixcrlf srcdir="." includes="**/*.sh" excludes="build*.*" eol="lf"/>
|
||||
@@ -316,21 +306,6 @@ For instructions on how to build JDOM, please view the README.txt file.
|
||||
@@ -316,27 +306,6 @@ For instructions on how to build JDOM, please view the README.txt file.
|
||||
<fileset dir="${core.build}" includes="**/*.class" />
|
||||
<fileset dir="${metainf.build}" excludes="**/MANIFEST.MF" />
|
||||
</jar>
|
||||
@ -53,15 +53,21 @@ index cd7c2ed..16368e2 100644
|
||||
- </jar>
|
||||
- <jar destfile="${package}/${jarbase}-javadoc.jar"
|
||||
- basedir="${build.javadocs}" includes="**/*" />
|
||||
-
|
||||
- <jar jarfile="${package}/${jarbase}-sources.jar" >
|
||||
- <fileset dir="${core.src}" includes="**/*" />
|
||||
- </jar>
|
||||
- <jar jarfile="${package}/${jarbase}-junit-sources.jar" >
|
||||
- <fileset dir="${junit.src}" includes="**/*" />
|
||||
- </jar>
|
||||
- <jar jarfile="${package}/${jarbase}-contrib-sources.jar" >
|
||||
- <fileset dir="${contrib.src}" includes="**/*" />
|
||||
- </jar>
|
||||
|
||||
-
|
||||
</target>
|
||||
|
||||
@@ -500,7 +475,7 @@ For instructions on how to build JDOM, please view the README.txt file.
|
||||
<target name="androidtests" depends="jars">
|
||||
@@ -505,7 +474,7 @@ For instructions on how to build JDOM, please view the README.txt file.
|
||||
<delete dir="${mavendir}" includes="**/*" failonerror="false"/>
|
||||
</target>
|
||||
|
||||
@ -70,7 +76,7 @@ index cd7c2ed..16368e2 100644
|
||||
description="Prepares Maven bundle to load on to Sonatype Nexus for Maven-Central">
|
||||
<mkdir dir="${mavendir}" />
|
||||
<mkdir dir="${mavendir}/core" />
|
||||
@@ -512,8 +487,6 @@ For instructions on how to build JDOM, please view the README.txt file.
|
||||
@@ -517,8 +486,6 @@ For instructions on how to build JDOM, please view the README.txt file.
|
||||
|
||||
<!-- copy the build jar -->
|
||||
<copy tofile="${mavendir}/core/${mavenbase}.jar" file="${package}/${jarbase}.jar"/>
|
||||
@ -79,10 +85,11 @@ index cd7c2ed..16368e2 100644
|
||||
|
||||
<!-- load the license in to the ${license} property -->
|
||||
<loadfile property="license" srcfile="LICENSE.txt" />
|
||||
@@ -528,27 +501,6 @@ For instructions on how to build JDOM, please view the README.txt file.
|
||||
@@ -532,28 +499,6 @@ For instructions on how to build JDOM, please view the README.txt file.
|
||||
<filter token="license" value="${license}" />
|
||||
</filterset>
|
||||
</copy>
|
||||
|
||||
-
|
||||
- <exec dir="${mavendir}/core" executable="${gpg}">
|
||||
- <arg value="-abv"/>
|
||||
- <arg value="${mavenbase}.pom"/>
|
||||
@ -108,5 +115,5 @@ index cd7c2ed..16368e2 100644
|
||||
|
||||
</project>
|
||||
--
|
||||
2.25.2
|
||||
2.37.2
|
||||
|
||||
|
@ -1,36 +0,0 @@
|
||||
From 07f316957b59d305f04c7bdb26292852bcbc2eb5 Mon Sep 17 00:00:00 2001
|
||||
From: Rolf Lear <rolf@tuis.net>
|
||||
Date: Thu, 1 Jul 2021 23:56:47 -0400
|
||||
Subject: [PATCH] Update test case to ensure DTD handling is OK again. Related
|
||||
#188. Related #189
|
||||
|
||||
---
|
||||
test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java b/test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java
|
||||
index a69380ba..a35a1b90 100644
|
||||
--- a/test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java
|
||||
+++ b/test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java
|
||||
@@ -101,6 +101,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
import org.jdom2.DefaultJDOMFactory;
|
||||
import org.jdom2.Document;
|
||||
import org.jdom2.EntityRef;
|
||||
+import org.jdom2.JDOMConstants;
|
||||
import org.jdom2.JDOMException;
|
||||
import org.jdom2.JDOMFactory;
|
||||
import org.jdom2.UncheckedJDOMFactory;
|
||||
@@ -609,11 +610,12 @@ public void testSetExternalFeature() {
|
||||
XMLReader reader = sb.createParser();
|
||||
assertNotNull(reader);
|
||||
assertTrue(reader.getFeature(feature));
|
||||
+ assertNull(reader.getProperty(JDOMConstants.SAX_PROPERTY_DECLARATION_HANDLER));
|
||||
sb.setFeature(feature, false);
|
||||
reader = sb.createParser();
|
||||
assertNotNull(reader);
|
||||
assertFalse(reader.getFeature(feature));
|
||||
-
|
||||
+ assertNotNull(reader.getProperty(JDOMConstants.SAX_PROPERTY_DECLARATION_HANDLER));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
fail("Could not create parser: " + e.getMessage());
|
@ -1,69 +0,0 @@
|
||||
From bd3ab78370098491911d7fe9d7a43b97144a234e Mon Sep 17 00:00:00 2001
|
||||
From: Esti <esther.burs@gmail.com>
|
||||
Date: Thu, 18 Feb 2021 16:40:01 +0200
|
||||
Subject: [PATCH] fix setFeature bug and add test case
|
||||
|
||||
---
|
||||
core/src/java/org/jdom2/input/SAXBuilder.java | 10 ++++------
|
||||
.../test/cases/input/TestSAXBuilder.java | 20 +++++++++++++++++++
|
||||
2 files changed, 24 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/core/src/java/org/jdom2/input/SAXBuilder.java b/core/src/java/org/jdom2/input/SAXBuilder.java
|
||||
index d7105ec6..a1462334 100644
|
||||
--- a/core/src/java/org/jdom2/input/SAXBuilder.java
|
||||
+++ b/core/src/java/org/jdom2/input/SAXBuilder.java
|
||||
@@ -971,11 +971,6 @@ protected void configureParser(final XMLReader parser, final SAXHandler contentH
|
||||
}
|
||||
}
|
||||
|
||||
- // Set any user-specified features on the parser.
|
||||
- for (final Map.Entry<String, Boolean> me : features.entrySet()) {
|
||||
- internalSetFeature(parser, me.getKey(), me.getValue().booleanValue(), me.getKey());
|
||||
- }
|
||||
-
|
||||
// Set any user-specified properties on the parser.
|
||||
for (final Map.Entry<String, Object> me : properties.entrySet()) {
|
||||
internalSetProperty(parser, me.getKey(), me.getValue(), me.getKey());
|
||||
@@ -1007,7 +1002,10 @@ protected void configureParser(final XMLReader parser, final SAXHandler contentH
|
||||
// No lexical reporting available
|
||||
}
|
||||
}
|
||||
-
|
||||
+ // Set any user-specified features on the parser.
|
||||
+ for (final Map.Entry<String, Boolean> me : features.entrySet()) {
|
||||
+ internalSetFeature(parser, me.getKey(), me.getValue().booleanValue(), me.getKey());
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java b/test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java
|
||||
index 4ef34834..a69380ba 100644
|
||||
--- a/test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java
|
||||
+++ b/test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java
|
||||
@@ -600,6 +600,26 @@ public void testSetFeature() {
|
||||
}
|
||||
}
|
||||
|
||||
+ @Test
|
||||
+ public void testSetExternalFeature() {
|
||||
+ String feature = "http://xml.org/sax/features/external-general-entities";
|
||||
+ MySAXBuilder sb = new MySAXBuilder();
|
||||
+ try {
|
||||
+ sb.setFeature(feature, true);
|
||||
+ XMLReader reader = sb.createParser();
|
||||
+ assertNotNull(reader);
|
||||
+ assertTrue(reader.getFeature(feature));
|
||||
+ sb.setFeature(feature, false);
|
||||
+ reader = sb.createParser();
|
||||
+ assertNotNull(reader);
|
||||
+ assertFalse(reader.getFeature(feature));
|
||||
+
|
||||
+ } catch (Exception e) {
|
||||
+ e.printStackTrace();
|
||||
+ fail("Could not create parser: " + e.getMessage());
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@Test
|
||||
public void testSetProperty() {
|
||||
LexicalHandler lh = new LexicalHandler() {
|
@ -1,34 +0,0 @@
|
||||
From dd4f3c2fc7893edd914954c73eb577f925a7d361 Mon Sep 17 00:00:00 2001
|
||||
From: Rolf Lear <rolf@tuis.net>
|
||||
Date: Thu, 1 Jul 2021 23:42:05 -0400
|
||||
Subject: [PATCH] Addresses #189 - synchronizes external entity expansion
|
||||
setting
|
||||
|
||||
---
|
||||
core/src/java/org/jdom2/input/SAXBuilder.java | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/core/src/java/org/jdom2/input/SAXBuilder.java b/core/src/java/org/jdom2/input/SAXBuilder.java
|
||||
index a1462334..514b026d 100644
|
||||
--- a/core/src/java/org/jdom2/input/SAXBuilder.java
|
||||
+++ b/core/src/java/org/jdom2/input/SAXBuilder.java
|
||||
@@ -82,6 +82,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
import org.jdom2.DocType;
|
||||
import org.jdom2.Document;
|
||||
import org.jdom2.EntityRef;
|
||||
+import org.jdom2.JDOMConstants;
|
||||
import org.jdom2.JDOMException;
|
||||
import org.jdom2.JDOMFactory;
|
||||
import org.jdom2.Verifier;
|
||||
@@ -797,6 +798,11 @@ public void setFastReconfigure(final boolean fastReconfigure) {
|
||||
public void setFeature(final String name, final boolean value) {
|
||||
// Save the specified feature for later.
|
||||
features.put(name, value ? Boolean.TRUE : Boolean.FALSE);
|
||||
+ if (JDOMConstants.SAX_FEATURE_EXTERNAL_ENT.equals(name)) {
|
||||
+ // See issue https://github.com/hunterhacker/jdom/issues/189
|
||||
+ // And PR https://github.com/hunterhacker/jdom/pull/188
|
||||
+ setExpandEntities(value);
|
||||
+ }
|
||||
engine = null;
|
||||
}
|
||||
|
24
jdom2.spec
24
jdom2.spec
@ -1,8 +1,8 @@
|
||||
%bcond_with bootstrap
|
||||
|
||||
Name: jdom2
|
||||
Version: 2.0.6
|
||||
Release: 28%{?dist}
|
||||
Version: 2.0.6.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Java manipulation of XML made easy
|
||||
License: Saxpath
|
||||
URL: http://www.jdom.org/
|
||||
@ -17,15 +17,6 @@ Source4: generate-tarball.sh
|
||||
# Process contrib and junit pom files
|
||||
Patch0: 0001-Adapt-build.patch
|
||||
|
||||
#
|
||||
# Security patches
|
||||
# P100 -> ...
|
||||
#
|
||||
# CVE-2021-33813
|
||||
Patch100: bd3ab78370098491911d7fe9d7a43b97144a234e.patch
|
||||
Patch101: dd4f3c2fc7893edd914954c73eb577f925a7d361.patch
|
||||
Patch102: 07f316957b59d305f04c7bdb26292852bcbc2eb5.patch
|
||||
|
||||
%if %{with bootstrap}
|
||||
BuildRequires: javapackages-bootstrap
|
||||
%else
|
||||
@ -59,11 +50,7 @@ This package contains javadoc for %{name}.
|
||||
|
||||
%patch0 -p1
|
||||
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
|
||||
sed -i 's/\r//' LICENSE.txt README.txt
|
||||
sed -i 's/\r//' LICENSE.txt
|
||||
|
||||
# Unable to run coverage: use log4j12 but switch to log4j 2.x
|
||||
sed -i.coverage "s|coverage, jars|jars|" build.xml
|
||||
@ -87,13 +74,16 @@ mkdir lib
|
||||
%mvn_install -J build/apidocs
|
||||
|
||||
%files -f .mfiles
|
||||
%doc CHANGES.txt COMMITTERS.txt README.txt TODO.txt
|
||||
%doc CHANGES.txt COMMITTERS.txt README.md TODO.txt
|
||||
%license LICENSE.txt
|
||||
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%license LICENSE.txt
|
||||
|
||||
%changelog
|
||||
* Thu Sep 08 2022 Marian Koncek <mkoncek@redhat.com> - 2.0.6.1-1
|
||||
- Update to upstream version 2.0.6.1
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-28
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (jdom2-2.0.6.tar.gz) = 1a38c882323339e94c36635e80635ecf8f66e4a1ed0228f68c11098b1282bd9043fdfec1b31196b79eea72495440ac175af50a0556439be5ba956238c32dd1ff
|
||||
SHA512 (jdom2-2.0.6.1.tar.gz) = 764fd20e9acbafdd3e3296360614beda0fb8d2c258b5ef0624b455e7008949966ca4f4b71196205e2ff195b3fe4ee8e3d0755f174935d11ad6eb18b8a6d38540
|
||||
|
Loading…
Reference in New Issue
Block a user