Sync from SUSE:SLFO:Main jackson-core revision d2968040c8c0c539dee89ece587269db

This commit is contained in:
Adrian Schröter 2024-05-03 13:52:31 +02:00
commit 74a80af589
6 changed files with 948 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,285 @@
From 36ca1db668b34577de7586f5788cd038415ebbfe Mon Sep 17 00:00:00 2001
From: Chris Kelley <ckelley@redhat.com>
Date: Mon, 19 Jun 2023 21:07:53 +0100
Subject: [PATCH] Remove ch.randelshofer.fastdoubleparser
It is not packaged in Fedora, and it is not enabled by default, so take
it out. We can add it back in if we wish to package it later.
---
.../jackson/core/io/BigDecimalParser.java | 24 ----------
.../jackson/core/io/BigIntegerParser.java | 41 -----------------
.../jackson/core/io/NumberInput.java | 31 +++----------
.../jackson/core/io/BigDecimalParserTest.java | 19 ++------
.../jackson/core/io/BigIntegerParserTest.java | 46 -------------------
5 files changed, 12 insertions(+), 149 deletions(-)
delete mode 100644 src/main/java/com/fasterxml/jackson/core/io/BigIntegerParser.java
delete mode 100644 src/test/java/com/fasterxml/jackson/core/io/BigIntegerParserTest.java
diff --git a/src/main/java/com/fasterxml/jackson/core/io/BigDecimalParser.java b/src/main/java/com/fasterxml/jackson/core/io/BigDecimalParser.java
index 0e42d163..e350d3c3 100644
--- a/src/main/java/com/fasterxml/jackson/core/io/BigDecimalParser.java
+++ b/src/main/java/com/fasterxml/jackson/core/io/BigDecimalParser.java
@@ -1,7 +1,5 @@
package com.fasterxml.jackson.core.io;
-import ch.randelshofer.fastdoubleparser.JavaBigDecimalParser;
-
import java.math.BigDecimal;
import java.util.Arrays;
@@ -62,28 +60,6 @@ public final class BigDecimalParser
return parse(chars, 0, chars.length);
}
- public static BigDecimal parseWithFastParser(final String valueStr) {
- try {
- return JavaBigDecimalParser.parseBigDecimal(valueStr);
- } catch (NumberFormatException nfe) {
- final String reportNum = valueStr.length() <= MAX_CHARS_TO_REPORT ?
- valueStr : valueStr.substring(0, MAX_CHARS_TO_REPORT) + " [truncated]";
- throw new NumberFormatException("Value \"" + reportNum
- + "\" can not be represented as `java.math.BigDecimal`, reason: " + nfe.getMessage());
- }
- }
-
- public static BigDecimal parseWithFastParser(final char[] ch, final int off, final int len) {
- try {
- return JavaBigDecimalParser.parseBigDecimal(ch, off, len);
- } catch (NumberFormatException nfe) {
- final String reportNum = len <= MAX_CHARS_TO_REPORT ?
- new String(ch, off, len) : new String(ch, off, MAX_CHARS_TO_REPORT) + " [truncated]";
- throw new NumberFormatException("Value \"" + reportNum
- + "\" can not be represented as `java.math.BigDecimal`, reason: " + nfe.getMessage());
- }
- }
-
private static BigDecimal parseBigDecimal(final char[] chars, final int off, final int len, final int splitLen) {
boolean numHasSign = false;
boolean expHasSign = false;
diff --git a/src/main/java/com/fasterxml/jackson/core/io/BigIntegerParser.java b/src/main/java/com/fasterxml/jackson/core/io/BigIntegerParser.java
deleted file mode 100644
index 777c3f45..00000000
--- a/src/main/java/com/fasterxml/jackson/core/io/BigIntegerParser.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.fasterxml.jackson.core.io;
-
-import ch.randelshofer.fastdoubleparser.JavaBigIntegerParser;
-
-import java.math.BigInteger;
-
-import static com.fasterxml.jackson.core.io.BigDecimalParser.MAX_CHARS_TO_REPORT;
-
-/**
- * Helper class used to implement more optimized parsing of {@link BigInteger} for REALLY
- * big values (over 500 characters).
- *
- * @since 2.15
- */
-public final class BigIntegerParser
-{
- private BigIntegerParser() {}
-
- public static BigInteger parseWithFastParser(final String valueStr) {
- try {
- return JavaBigIntegerParser.parseBigInteger(valueStr);
- } catch (NumberFormatException nfe) {
- final String reportNum = valueStr.length() <= MAX_CHARS_TO_REPORT ?
- valueStr : valueStr.substring(0, MAX_CHARS_TO_REPORT) + " [truncated]";
- throw new NumberFormatException("Value \"" + reportNum
- + "\" can not be represented as `java.math.BigInteger`, reason: " + nfe.getMessage());
- }
- }
-
- public static BigInteger parseWithFastParser(final String valueStr, final int radix) {
- try {
- return JavaBigIntegerParser.parseBigInteger(valueStr, radix);
- } catch (NumberFormatException nfe) {
- final String reportNum = valueStr.length() <= MAX_CHARS_TO_REPORT ?
- valueStr : valueStr.substring(0, MAX_CHARS_TO_REPORT) + " [truncated]";
- throw new NumberFormatException("Value \"" + reportNum
- + "\" can not be represented as `java.math.BigInteger` with radix " + radix +
- ", reason: " + nfe.getMessage());
- }
- }
-}
diff --git a/src/main/java/com/fasterxml/jackson/core/io/NumberInput.java b/src/main/java/com/fasterxml/jackson/core/io/NumberInput.java
index e216f48a..f8f0f2c6 100644
--- a/src/main/java/com/fasterxml/jackson/core/io/NumberInput.java
+++ b/src/main/java/com/fasterxml/jackson/core/io/NumberInput.java
@@ -1,8 +1,5 @@
package com.fasterxml.jackson.core.io;
-import ch.randelshofer.fastdoubleparser.JavaDoubleParser;
-import ch.randelshofer.fastdoubleparser.JavaFloatParser;
-
import java.math.BigDecimal;
import java.math.BigInteger;
@@ -385,7 +382,7 @@ public final class NumberInput
* @since v2.14
*/
public static double parseDouble(final String s, final boolean useFastParser) throws NumberFormatException {
- return useFastParser ? JavaDoubleParser.parseDouble(s) : Double.parseDouble(s);
+ return Double.parseDouble(s);
}
/**
@@ -407,7 +404,7 @@ public final class NumberInput
* @since v2.14
*/
public static float parseFloat(final String s, final boolean useFastParser) throws NumberFormatException {
- return useFastParser ? JavaFloatParser.parseFloat(s) : Float.parseFloat(s);
+ return Float.parseFloat(s);
}
/**
@@ -427,9 +424,7 @@ public final class NumberInput
* @since v2.15
*/
public static BigDecimal parseBigDecimal(final String s, final boolean useFastParser) throws NumberFormatException {
- return useFastParser ?
- BigDecimalParser.parseWithFastParser(s) :
- BigDecimalParser.parse(s);
+ return BigDecimalParser.parse(s);
}
/**
@@ -455,9 +450,7 @@ public final class NumberInput
public static BigDecimal parseBigDecimal(final char[] ch, final int off, final int len,
final boolean useFastParser)
throws NumberFormatException {
- return useFastParser ?
- BigDecimalParser.parseWithFastParser(ch, off, len) :
- BigDecimalParser.parse(ch, off, len);
+ return BigDecimalParser.parse(ch, off, len);
}
/**
@@ -477,9 +470,7 @@ public final class NumberInput
* @since v2.15
*/
public static BigDecimal parseBigDecimal(final char[] ch, final boolean useFastParser) throws NumberFormatException {
- return useFastParser ?
- BigDecimalParser.parseWithFastParser(ch, 0, ch.length) :
- BigDecimalParser.parse(ch);
+ return BigDecimalParser.parse(ch);
}
/**
@@ -500,11 +491,7 @@ public final class NumberInput
* @since v2.15
*/
public static BigInteger parseBigInteger(final String s, final boolean useFastParser) throws NumberFormatException {
- if (useFastParser) {
- return BigIntegerParser.parseWithFastParser(s);
- } else {
- return parseBigInteger(s);
- }
+ return parseBigInteger(s);
}
/**
@@ -517,10 +504,6 @@ public final class NumberInput
*/
public static BigInteger parseBigIntegerWithRadix(final String s, final int radix,
final boolean useFastParser) throws NumberFormatException {
- if (useFastParser) {
- return BigIntegerParser.parseWithFastParser(s, radix);
- } else {
- return new BigInteger(s, radix);
- }
+ return new BigInteger(s, radix);
}
}
diff --git a/src/test/java/com/fasterxml/jackson/core/io/BigDecimalParserTest.java b/src/test/java/com/fasterxml/jackson/core/io/BigDecimalParserTest.java
index a4e41cd3..436d74cd 100644
--- a/src/test/java/com/fasterxml/jackson/core/io/BigDecimalParserTest.java
+++ b/src/test/java/com/fasterxml/jackson/core/io/BigDecimalParserTest.java
@@ -2,26 +2,17 @@ package com.fasterxml.jackson.core.io;
public class BigDecimalParserTest extends com.fasterxml.jackson.core.BaseTest {
public void testLongStringParse() {
- try {
- BigDecimalParser.parse(genLongString());
- fail("expected NumberFormatException");
- } catch (NumberFormatException nfe) {
- assertTrue("exception message starts as expected?", nfe.getMessage().startsWith("Value \"AAAAA"));
- assertTrue("exception message value contains truncated", nfe.getMessage().contains("truncated"));
+ final int len = 1500;
+ final StringBuilder sb = new StringBuilder(len);
+ for (int i = 0; i < len; i++) {
+ sb.append("A");
}
- }
-
- public void testLongStringFastParse() {
try {
- BigDecimalParser.parseWithFastParser(genLongString());
+ BigDecimalParser.parse(sb.toString());
fail("expected NumberFormatException");
} catch (NumberFormatException nfe) {
assertTrue("exception message starts as expected?", nfe.getMessage().startsWith("Value \"AAAAA"));
assertTrue("exception message value contains truncated", nfe.getMessage().contains("truncated"));
}
}
-
- private String genLongString() {
- return BigIntegerParserTest.genLongString();
- }
}
diff --git a/src/test/java/com/fasterxml/jackson/core/io/BigIntegerParserTest.java b/src/test/java/com/fasterxml/jackson/core/io/BigIntegerParserTest.java
deleted file mode 100644
index 7b8265d7..00000000
--- a/src/test/java/com/fasterxml/jackson/core/io/BigIntegerParserTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.fasterxml.jackson.core.io;
-
-public class BigIntegerParserTest extends com.fasterxml.jackson.core.BaseTest {
-
- public void testFastParseBigIntegerFailsWithENotation() {
- String num = "2e308";
- try {
- BigIntegerParser.parseWithFastParser(num);
- fail("expected NumberFormatException");
- } catch (NumberFormatException nfe) {
- // expected
- }
- }
-
- public void testLongStringFastParseBigInteger() {
- try {
- BigIntegerParser.parseWithFastParser(genLongString());
- fail("expected NumberFormatException");
- } catch (NumberFormatException nfe) {
- assertTrue("exception message starts as expected?", nfe.getMessage().startsWith("Value \"AAAAA"));
- assertTrue("exception message value contains: truncated", nfe.getMessage().contains("truncated"));
- assertTrue("exception message value contains: BigInteger", nfe.getMessage().contains("BigInteger"));
- }
- }
-
- public void testLongStringFastParseBigIntegerRadix() {
- try {
- BigIntegerParser.parseWithFastParser(genLongString(), 8);
- fail("expected NumberFormatException");
- } catch (NumberFormatException nfe) {
- assertTrue("exception message starts as expected?", nfe.getMessage().startsWith("Value \"AAAAA"));
- assertTrue("exception message value contains: truncated", nfe.getMessage().contains("truncated"));
- assertTrue("exception message value contains: radix 8", nfe.getMessage().contains("radix 8"));
- assertTrue("exception message value contains: BigInteger", nfe.getMessage().contains("BigInteger"));
- }
- }
-
- static String genLongString() {
- final int len = 1500;
- final StringBuilder sb = new StringBuilder(len);
- for (int i = 0; i < len; i++) {
- sb.append("A");
- }
- return sb.toString();
- }
-}
--
2.40.1

BIN
jackson-core-2.15.2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

258
jackson-core-build.xml Normal file
View File

@ -0,0 +1,258 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="jackson-core" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property file="build.properties"/>
<property name="project.groupId" value="com.fasterxml.jackson.core"/>
<property name="project.artifactId" value="jackson-core"/>
<property name="project.name" value="Jackson-core"/>
<property name="project.version" value="2.15.2"/>
<property name="project.vendor" value="FasterXML"/>
<property name="project.description" value="Core Jackson processing abstractions (aka Streaming API), implementation for JSON"/>
<property name="bundle.version" value="${project.version}"/>
<property name="compiler.source" value="1.8"/>
<property name="compiler.target" value="${compiler.source}"/>
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
<property name="build.dir" value="target"/>
<property name="build.outputDir" value="${build.dir}/classes"/>
<property name="build.srcDir" value="src/main/java"/>
<property name="build.resourceDir" value="src/main/resources"/>
<property name="build.testOutputDir" value="${build.dir}/test-classes"/>
<property name="build.testDir" value="src/test/java"/>
<property name="build.testResourceDir" value="src/test/resources"/>
<property name="test.reports" value="${build.dir}/test-reports"/>
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
<!-- ====================================================================== -->
<!-- Defining classpaths -->
<!-- ====================================================================== -->
<path id="build.classpath"/>
<path id="build.test.classpath">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- ====================================================================== -->
<!-- Cleaning up target -->
<!-- ====================================================================== -->
<target name="clean" description="Clean the output directory">
<delete dir="${build.dir}"/>
</target>
<!-- ====================================================================== -->
<!-- Init target -->
<!-- ====================================================================== -->
<target name="init" description="Generate the PackageVersion.java">
<copy file="${build.srcDir}/com/fasterxml/jackson/core/json/PackageVersion.java.in"
tofile="${build.srcDir}/com/fasterxml/jackson/core/json/PackageVersion.java"
overwrite="true">
<filterset>
<filter token="package" value="com.fasterxml.jackson.core.json"/>
<filter token="projectversion" value="${project.version}"/>
<filter token="projectgroupid" value="${project.groupId}"/>
<filter token="projectartifactid" value="${project.artifactId}"/>
</filterset>
</copy>
</target>
<!-- ====================================================================== -->
<!-- Compilation target -->
<!-- ====================================================================== -->
<target name="compile" depends="init" description="Compile the code">
<mkdir dir="${build.outputDir}"/>
<javac destdir="${build.outputDir}"
nowarn="false"
debug="true"
optimize="false"
deprecation="true"
target="${compiler.target}"
verbose="false"
fork="false"
encoding="utf-8"
source="${compiler.source}">
<src>
<pathelement location="${build.srcDir}"/>
</src>
<classpath refid="build.classpath"/>
</javac>
<copy todir="${build.outputDir}">
<fileset dir="${build.resourceDir}"/>
</copy>
</target>
<!-- ====================================================================== -->
<!-- Test-compilation target -->
<!-- ====================================================================== -->
<target name="compile-tests"
depends="compile"
description="Compile the test code"
unless="test.skip">
<mkdir dir="${build.testOutputDir}"/>
<javac destdir="${build.testOutputDir}"
nowarn="false"
debug="true"
optimize="false"
deprecation="true"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}">
<src>
<pathelement location="${build.testDir}"/>
</src>
<classpath>
<path refid="build.test.classpath"/>
<pathelement location="${build.outputDir}"/>
</classpath>
</javac>
</target>
<!-- ====================================================================== -->
<!-- Run all tests -->
<!-- ====================================================================== -->
<target name="test"
depends="compile-tests, junit-missing"
unless="junit.skipped"
description="Run the test cases">
<mkdir dir="${test.reports}"/>
<junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
<sysproperty key="basedir" value="."/>
<formatter type="xml"/>
<formatter type="plain" usefile="false"/>
<classpath>
<path refid="build.test.classpath"/>
<pathelement location="${build.outputDir}"/>
<pathelement location="${build.testOutputDir}"/>
</classpath>
<batchtest todir="${test.reports}" unless="test">
<fileset dir="${build.testDir}">
<include name="**/Test*.java"/>
<include name="**/*Test.java"/>
<include name="**/*TestCase.java"/>
<exclude name="**/*Abstract*Test.java"/>
</fileset>
</batchtest>
<batchtest todir="${test.reports}" if="test">
<fileset dir="${build.testDir}">
<include name="**/${test}.java"/>
<exclude name="**/*Abstract*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="test-junit-present">
<available classname="junit.framework.Test" property="junit.present" classpathref="build.test.classpath"/>
</target>
<target name="test-junit-status"
depends="test-junit-present">
<condition property="junit.missing">
<and>
<isfalse value="${junit.present}"/>
<isfalse value="${test.skip}"/>
</and>
</condition>
<condition property="junit.skipped">
<or>
<isfalse value="${junit.present}"/>
<istrue value="${test.skip}"/>
</or>
</condition>
</target>
<target name="junit-missing"
depends="test-junit-status"
if="junit.missing">
<echo>=================================== WARNING ===================================</echo>
<echo> JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed.</echo>
<echo>===============================================================================</echo>
</target>
<!-- ====================================================================== -->
<!-- Javadoc target -->
<!-- ====================================================================== -->
<target name="javadoc" depends="init" description="Generates the Javadoc of the application">
<javadoc sourcepath="${build.srcDir}"
packagenames="*"
destdir="${reporting.outputDirectory}/apidocs"
access="protected"
source="${compiler.source}"
verbose="false"
version="true"
use="true"
author="true"
splitindex="false"
nodeprecated="false"
nodeprecatedlist="false"
notree="false"
noindex="false"
nohelp="false"
nonavbar="false"
serialwarn="false"
encoding="utf-8"
charset="utf-8"
linksource="false"
breakiterator="false"
maxmemory="1g">
</javadoc>
</target>
<!-- ====================================================================== -->
<!-- Package target -->
<!-- ====================================================================== -->
<target name="package" depends="compile,test" description="Package the application">
<jar jarfile="${build.dir}/${build.finalName}.jar"
compress="true"
index="false"
basedir="${build.outputDir}"
excludes="**/package.html">
<manifest>
<attribute name="Bundle-Description" value="${project.description}"/>
<attribute name="Bundle-DocURL" value="http://github.com/FasterXML/jackson"/>
<attribute name="Bundle-License" value="http://www.apache.org/licenses/LICENSE-2.0.txt"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="${project.name}"/>
<attribute name="Bundle-SymbolicName" value="${project.groupId}.${project.artifactId}"/>
<attribute name="Bundle-Vendor" value="${project.vendor}"/>
<attribute name="Bundle-Version" value="${bundle.version}"/>
<attribute name="Export-Package" value="com.fasterxml.jackson.core;version=&quot;${project.version}&quot;;uses:=&quot;com.fasterxml.jackson.core.async,com.fasterxml.jackson.core.exc,com.fasterxml.jackson.core.format,com.fasterxml.jackson.core.io,com.fasterxml.jackson.core.json,com.fasterxml.jackson.core.sym,com.fasterxml.jackson.core.type,com.fasterxml.jackson.core.util&quot;,com.fasterxml.jackson.core.async;version=&quot;${project.version}&quot;,com.fasterxml.jackson.core.base;version=&quot;${project.version}&quot;;uses:=&quot;com.fasterxml.jackson.core,com.fasterxml.jackson.core.exc,com.fasterxml.jackson.core.io,com.fasterxml.jackson.core.json,com.fasterxml.jackson.core.util&quot;,com.fasterxml.jackson.core.exc;version=&quot;${project.version}&quot;;uses:=&quot;com.fasterxml.jackson.core,com.fasterxml.jackson.core.util&quot;,com.fasterxml.jackson.core.filter;version=&quot;${project.version}&quot;;uses:=&quot;com.fasterxml.jackson.core,com.fasterxml.jackson.core.util&quot;,com.fasterxml.jackson.core.format;version=&quot;${project.version}&quot;;uses:=&quot;com.fasterxml.jackson.core&quot;,com.fasterxml.jackson.core.io;version=&quot;${project.version}&quot;;uses:=&quot;com.fasterxml.jackson.core,com.fasterxml.jackson.core.util&quot;,com.fasterxml.jackson.core.json;version=&quot;${project.version}&quot;;uses:=&quot;com.fasterxml.jackson.core,com.fasterxml.jackson.core.base,com.fasterxml.jackson.core.format,com.fasterxml.jackson.core.io,com.fasterxml.jackson.core.sym&quot;,com.fasterxml.jackson.core.json.async;version=&quot;${project.version}&quot;;uses:=&quot;com.fasterxml.jackson.core,com.fasterxml.jackson.core.async,com.fasterxml.jackson.core.base,com.fasterxml.jackson.core.io,com.fasterxml.jackson.core.sym&quot;,com.fasterxml.jackson.core.sym;version=&quot;${project.version}&quot;,com.fasterxml.jackson.core.type;version=&quot;${project.version}&quot;;uses:=&quot;com.fasterxml.jackson.core&quot;,com.fasterxml.jackson.core.util;version=&quot;${project.version}&quot;;uses:=&quot;com.fasterxml.jackson.core,com.fasterxml.jackson.core.io&quot;"/>
<attribute name="Implementation-Title" value="${project.name}"/>
<attribute name="Implementation-Vendor-Id" value="${project.groupId}"/>
<attribute name="Implementation-Vendor" value="${project.vendor}"/>
<attribute name="Implementation-Version" value="${project.version}"/>
<attribute name="Import-Package" value="com.fasterxml.jackson.core,com.fasterxml.jackson.core.async,com.fasterxml.jackson.core.base,com.fasterxml.jackson.core.exc,com.fasterxml.jackson.core.format,com.fasterxml.jackson.core.io,com.fasterxml.jackson.core.json,com.fasterxml.jackson.core.json.async,com.fasterxml.jackson.core.sym,com.fasterxml.jackson.core.type,com.fasterxml.jackson.core.util"/>
<attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
<attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
<attribute name="JavaPackages-Version" value="${project.version}"/>
<attribute name="Require-Capability" value="osgi.ee;filter:=&quot;(&amp;(osgi.ee=JavaSE)(version=1.6))&quot;"/>
<attribute name="Specification-Title" value="${project.name}"/>
<attribute name="Specification-Vendor" value="${project.vendor}"/>
<attribute name="Specification-Version" value="${project.version}"/>
</manifest>
</jar>
</target>
<!-- ====================================================================== -->
<!-- A dummy target for the package named after the type it creates -->
<!-- ====================================================================== -->
<target name="jar" depends="package" description="Builds the jar for the application"/>
</project>

303
jackson-core.changes Normal file
View File

@ -0,0 +1,303 @@
-------------------------------------------------------------------
Mon Aug 21 13:05:24 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Update to 2.15.2
* 2.15.2 (30-May-2023)
+ #1019: Allow override of 'StreamReadContraints' default with
'overrideDefaultStreamReadConstraints()'
+ #1027: Extra module-info.class in 2.15.1
+ #1028: Wrong checksums in 'module.json' (2.15.0, 2.15.1)
+ #1032: 'LICENSE' missing from 2.15.1 jar
* 2.15.1 (16-May-2023))
+ #999: Gradle metadata for 'jackson-core' '2.15.0' adds
dependency on 'ch.randelshofer:fastdoubleparser'
+ #1003: Add FastDoubleParser section to 'NOTICE'
+ #1014: Increase default max allowed String value length from
5 megs to 20 megs
+ #1023: Problem with 'FilteringGeneratorDelegate' wrt
'TokenFilter.Inclusion.INCLUDE_NON_NULL'
* 2.15.0 (23-Apr-2023)
+ #827: Add numeric value size limits via
'StreamReadConstraints' (fixes 'sonatype-2022-6438')
+ #844: Add SLSA provenance via build script
+ #851: Add 'StreamReadFeature.USE_FAST_BIG_DECIMAL_PARSER' to
enable faster 'BigDecimal', 'BigInteger' parsing
+ #863: Add 'StreamReadConstraints' limit for longest textual
value to allow (default: 5M)
+ #865: Optimize parsing 19 digit longs
+ #898: Possible flaw in 'TokenFilterContext#skipParentChecks()'
+ #902: Add 'Object JsonParser.getNumberValueDeferred()' method
to allow for deferred decoding in some cases
+ #921: Add 'JsonFactory.Feature.CHARSET_DETECTION' to disable
charset detection
+ #948: Use 'StreamConstraintsException' in name canonicalizers
+ #962: Offer a way to directly set 'StreamReadConstraints' via
'JsonFactory' (not just Builder)
+ #965: 2.15.0-rc1 missing Gradle module metadata marker in
pom.xml
+ #968: Prevent inefficient internal conversion from
'BigDecimal' to 'BigInteger' wrt ultra-large scale
+ #984: Add 'JsonGenerator.copyCurrentEventExact' as alternative
to 'copyCurrentEvent()'
* 2.14.3 (05-May-2023)
+ #909: Revert schubfach changes in #854
+ #912: Optional padding Base64Variant still throws exception on
missing padding character
+ #967: Address performance issue with 'BigDecimalParser'
+ #990: Backport removal of BigDecimal to BigInt conversion
(#987)
+ #1004: FastDoubleParser license
+ #1012: Got 'NegativeArraySizeException' when calling
'writeValueAsString()'
* 2.14.2 (28-Jan-2023)
+ #854: Backport schubfach changes from v2.15#8
+ #882: Allow TokenFIlter to skip last elements in arrays
+ #886: Avoid instance creations in fast parser code
+ #890: 'FilteringGeneratorDelegate' does not create new
'filterContext' if 'tokenFilter' is null
* 2.14.0 (05-Nov-2022)
+ #478: Provide implementation of async JSON parser fed by
'ByteBufferFeeder'
+ #577: Allow use of faster floating-point number parsing with
'StreamReadFeature.USE_FAST_DOUBLE_PARSER'
+ #684: Add "JsonPointer#appendProperty" and
"JsonPointer#appendIndex"
+ #715: Allow TokenFilters to keep empty arrays and objects
+ #717: Hex capitalization for JsonWriter should be configurable
(add 'JsonWriteFeature.WRITE_HEX_UPPER_CASE')
+ #733: Add 'StreamReadCapability.EXACT_FLOATS' to indicate
whether parser reports exact floating-point values or not
+ #736: 'JsonPointer' quadratic memory use: OOME on deep inputs
+ #745: Change minimum Java version to 8
+ #749: Allow use of faster floating-point number serialization
('StreamWriteFeature.USE_FAST_DOUBLE_WRITER')
+ #751: Remove workaround for old issue with a particular double
+ #753: Add 'NumberInput.parseFloat()'
+ #757: Update ParserBase to support floats directly
+ #759: JsonGenerator to provide current value to the context
before starting objects
+ #762: Make 'JsonPointer' 'java.io.Serializable'
+ #763: 'JsonFactory.createParser()' with 'File' may leak
'InputStream's
+ #764: 'JsonFactory.createGenerator()' with 'File' may leak
'OutputStream's
+ #773: Add option to accept non-standard trailing decimal point
('JsonReadFeature.ALLOW_TRAILING_DECIMAL_POINT_FOR_NUMBERS')
+ #774: Add a feature to allow leading plus sign
('JsonReadFeature.ALLOW_LEADING_PLUS_SIGN_FOR_NUMBERS')
+ #788: 'JsonPointer.empty()' should NOT indicate match of a
property with key of ""
+ #798: Avoid copy when parsing 'BigDecimal'
+ #811: Add explicit bounds checks for 'JsonGenerator' methods
that take 'byte[]'/'char[]'/String-with-offsets input
+ #812: Add explicit bounds checks for
'JsonFactory.createParser()' methods that take
'byte[]'/'char[]'-with-offsets input
+ #814: Use 'BigDecimalParser' for BigInteger parsing very long
numbers
+ #818: Calling 'JsonPointer.compile(...)' on very deeply nested
expression throws 'StackOverflowError'
+ #828: Make 'BigInteger' parsing lazy
+ #830: Make 'BigDecimal' parsing lazy
+ #834: ReaderBaseJsonParser._verifyRootSpace() can cause buffer
boundary failure
- Added patch:
* 0001-Remove-ch.randelshofer.fastdoubleparser.patch
+ we don't have 'ch.randelshofer:fastdoubleparser'
-------------------------------------------------------------------
Wed Jun 15 06:37:45 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Update to 2.13.3
* 2.13.3 (14-May-2022)
+ #744: Limit size of exception message in BigDecimalParser
* 2.13.2 (06-Mar-2022)
+ #732: Update Maven wrapper
+ #739: 'JsonLocation' in 2.13 only uses identity comparison
for "content reference"
* 2.13.1 (19-Dec-2021)
+ #713: Incorrect parsing of single-quoted surrounded String
values containing double quotes
-------------------------------------------------------------------
Sun Mar 20 16:24:25 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Build with source and target levels 8
-------------------------------------------------------------------
Wed Oct 20 05:55:56 UTC 2021 - Fridrich Strba <fstrba@suse.com>
- Update to 2.13.0 (CVE-2020-36518, bsc#1197132)
* 2.13.0 (30-Sep-2021)
+ #652: Misleading exception for input source when processing
byte buffer with start offset
+ #658: Escape contents of source document snippet for
'JsonLocation._appendSourceDesc()'
+ #664: Add 'StreamWriteException' type to eventually replace
'JsonGenerationException'
+ #671: Replace 'getCurrentLocation()'/'getTokenLocation()' with
'currentLocation()'/'currentTokenLocation()' in 'JsonParser'
+ #673: Replace 'JsonGenerator.writeObject()' (and related) with
'writePOJO()'
+ #674: Replace 'getCurrentValue()'/'setCurrentValue()' with
'currentValue()'/'assignCurrentValue()' in
'JsonParser'/'JsonGenerator
+ #677: Introduce O(n^1.5) BigDecimal parser implementation
+ #687: ByteQuadsCanonicalizer.addName(String, int, int) has
incorrect handling for case of q2 == null
+ #692: UTF32Reader ArrayIndexOutOfBoundsException
+ #694: Improve exception/JsonLocation handling for binary
content: don't show content, include byte offset
+ #700: Unable to ignore properties when deserializing.
TokenFilter seems broken
+ #712: Optimize array allocation by 'JsonStringEncoder'
+ Add 'mvnw' wrapper
* 2.12.5 (27-Aug-2021)
+ #712: (partial) Optimize array allocation by
'JsonStringEncoder'
+ #713: Add back accidentally removed 'JsonStringEncoder'
related methods in 'BufferRecyclers'
(like 'getJsonStringEncoder()')
* 2.12.4 (06-Jul-2021)
+ #702: 'ArrayOutOfBoundException' at
'WriterBasedJsonGenerator.writeString(Reader, int)'
* 2.12.0 (29-Nov-2020)
+ #500: Allow "optional-padding" for 'Base64Variant'
+ #573: More customizable TokenFilter inclusion (using
'Tokenfilter.Inclusion')
+ #618: Publish Gradle Module Metadata
+ #619: Add 'StreamReadCapability' for further
format-based/format-agnostic handling improvements
+ #627: Add 'JsonParser.isExpectedNumberIntToken()' convenience
method
+ #630: Add 'StreamWriteCapability' for further
format-based/format-agnostic handling improvements
+ #631: Add 'JsonParser.getNumberValueExact()' to allow
precision-retaining buffering
+ #639: Limit initial allocated block size by 'ByteArrayBuilder'
to max block size
+ #640: Add 'JacksonException' as parent class of
'JsonProcessingException'
+ #653: Make 'JsonWriteContext.reset()' and
'JsonReadContext.reset()' methods public
+ Deprecate 'JsonParser.getCurrentTokenId()' (use
'#currentTokenId()' instead)
+ Full "LICENSE" included in jar for easier access by compliancy
tools
* 2.11.4 (12-Dec-2020)
+ #647: Fix NPE in 'writeNumber(String)' method of
'UTF8JsonGenerator',
'WriterBasedJsonGenerator'
* 2.11.0 (26-Apr-2020)
+ #504: Add a String Array write method in the Streaming API
+ #565: Synchronize variants of 'JsonGenerator#writeNumberField'
with 'JsonGenerator#writeNumber'
+ #587: Add JsonGenerator#writeNumber(char[], int, int) method
+ #606: Do not clear aggregated contents of 'TextBuffer' when
'releaseBuffers()' called
+ #609: 'FilteringGeneratorDelegate' does not handle
'writeString(Reader, int)'
+ #611: Optionally allow leading decimal in float tokens
-------------------------------------------------------------------
Mon Apr 26 07:25:18 UTC 2021 - Fridrich Strba <fstrba@suse.com>
- Rewrite to use ant for building in order to be able to use it
in packages that have to be built before maven
-------------------------------------------------------------------
Mon Jan 25 08:16:57 UTC 2021 - Fridrich Strba <fstrba@suse.com>
- Update to 2.10.5
* #616: Parsing JSON with 'ALLOW_MISSING_VALUE' enabled results
in endless stream of 'VALUE_NULL' tokens
* #605: Handle case when system property access is restricted
* #609: (partial fix) 'FilteringGeneratorDelegate' does not
handle 'writeString(Reader, int)'
-------------------------------------------------------------------
Thu Mar 26 07:34:19 UTC 2020 - Fridrich Strba <fstrba@suse.com>
- Update to 2.10.3
- Changes:
* #592: DataFormatMatcher#getMatchedFormatName throws NPE when
no match exists
* #603: 'JsonParser.getCurrentLocation()' byte/char offset update
incorrectly for big payloads
-------------------------------------------------------------------
Tue Jan 7 10:32:16 UTC 2020 - Pedro Monreal Gonzalez <pmonrealgonzalez@suse.com>
- Changes for 2.10.2
#580: FilteringGeneratorDelegate writeRawValue delegate to 'writeRaw()'
instead of 'writeRawValue()'
#582: 'FilteringGeneratorDelegate' bug when filtering arrays (in 2.10.1)
-------------------------------------------------------------------
Wed Nov 20 17:42:21 UTC 2019 - Pedro Monreal Gonzalez <pmonrealgonzalez@suse.com>
- Version update to 2.10.1
* 2.10.1 (not yet released)
#455: Jackson reports wrong locations for JsonEOFException
#567: Add 'uses' for 'ObjectCodec' in module-info
#578: Array index out of bounds in hex lookup
* 2.10.0 (26-Sep-2019)
#433: Add Builder pattern for creating configured Stream factories
#464: Add "maximum unescaped char" configuration option for 'JsonFactory' via builder
#467: Create 'JsonReadFeature' to move JSON-specific 'JsonParser.Feature's to
#479: Improve thread-safety of buffer recycling
#480: 'SerializableString' value can not directly render to Writer
#481: Create 'JsonWriteFeature' to move JSON-specific 'JsonGenerator.Feature's to
#484: Implement 'UTF8JsonGenerator.writeRawValue(SerializableString)' (and
'writeRaw(..)') more efficiently
#495: Create 'StreamReadFeature' to move non-json specific 'JsonParser.Feature's to
#496: Create 'StreamWriteFeature' to take over non-json-specific 'JsonGenerator.Feature's
#502: Make 'DefaultPrettyPrinter.createInstance()' to fail for sub-classes
#506: Add missing type parameter for 'TypeReference' in 'ObjectCodec'
#508: Add new exception type 'InputCoercionException' to be used for failed coercions
like overflow for 'int'
#517: Add 'JsonGenerator.writeStartObject(Object, int)' (needed by CBOR, maybe Avro)
#527: Add simple module-info for JDK9+, using Moditect
#533: UTF-8 BOM not accounted for in JsonLocation.getByteOffset()
#539: Reduce max size of recycled byte[]/char[] blocks by 'TextBuffer',
'ByteArrayBuilder'
#547: 'CharsToNameCanonicalizer': Internal error on 'SymbolTable.rehash()' with high
number of hash collisions
#548: ByteQuadsCanonicalizer: ArrayIndexOutOfBoundsException in addName
#549: Add configurability of "quote character" for JSON factory
#561: Misleading exception for unquoted String parsing
#563: Async parser does not keep track of Array context properly
- Rewrite 'JsonGenerator.copyCurrentStructure()' to remove recursion)
- Add 'missingNode()', 'nullNode()' in 'TreeCodec'
- Add 'JsonParserDelegate.delegate()' methods
* 2.9.10 (21-Sep-2019)
#540: UTF8StreamJsonParser: fix byte to int conversion for malformed escapes
#556: 'IndexOutOfBoundsException' in UTF8JsonGenerator.writeString(Reader, len)
when using a negative length
* 2.9.9 (16-May-2019)
#516: _inputPtr off-by-one in UTF8StreamJsonParser._parseNumber2()
#531: Non-blocking parser reports incorrect locations when fed with non-zero offset
* 2.9.8 (15-Dec-2018)
#488: Fail earlier on coercions from "too big" 'BigInteger' into
fixed-size types ('int', 'long', 'short')
#510: Fix ArrayIndexOutofBoundsException found by LGTM.com
- Improve exception message for missing Base64 padding (see databind#2183)
* 2.9.7 (19-Sep-2018)
#476: Problem with 'BufferRecycler' via async parser (or when sharing parser
across threads)
#477: Exception while decoding Base64 value with escaped '=' character
#488: Fail earlier on coercions from "too big" 'BigInteger' into
fixed-size types ('int', 'long', 'short')
* 2.9.6 (12-Jun-2018)
#400: Add mechanism for forcing 'BufferRecycler' released (to call on shutdown)
#460: Failing to link 'ObjectCodec' with 'JsonFactory' copy constructor
#463: Ensure that 'skipChildren()' of non-blocking 'JsonParser' will throw
exception if not enough input
* 2.9.5 (26-Mar-2018)
No changes since 2.9.4
-------------------------------------------------------------------
Tue Oct 1 13:54:36 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of jackson-core 2.9.4

76
jackson-core.spec Normal file
View File

@ -0,0 +1,76 @@
#
# spec file for package jackson-core
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: jackson-core
Version: 2.15.2
Release: 0
Summary: Core part of Jackson
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://github.com/FasterXML/jackson-core/
Source0: https://github.com/FasterXML/jackson-core/archive/%{name}-%{version}.tar.gz
Source1: %{name}-build.xml
Patch0: 0001-Remove-ch.randelshofer.fastdoubleparser.patch
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local >= 6
BuildArch: noarch
%description
Core part of Jackson that defines Streaming API as well
as basic shared abstractions.
%package javadoc
Summary: Javadoc for %{name}
Group: Development/Libraries/Java
%description javadoc
This package contains API documentation for %{name}.
%prep
%setup -q -n %{name}-%{name}-%{version}
cp %{SOURCE1} build.xml
%patch0 -p1
%pom_remove_dep "ch.randelshofer:fastdoubleparser"
%build
mkdir -p lib
%{ant} -Dtest.skip=true package javadoc
%install
install -dm 0755 %{buildroot}%{_javadir}
install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
install -dm 0755 %{buildroot}%{_mavenpomdir}
%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
%add_maven_depmap %{name}.pom %{name}.jar
install -dm 0755 %{buildroot}%{_javadocdir}
cp -r target/site/apidocs %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles
%doc README.md release-notes/*
%license LICENSE
%files javadoc
%{_javadocdir}/%{name}
%license LICENSE
%changelog