Compare commits
No commits in common. "c8-stream-10.6" and "c9-beta" have entirely different histories.
c8-stream-
...
c9-beta
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/jackson-core-2.21.4.tar.gz
|
SOURCES/jackson-core-2.14.1.tar.gz
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
c6949c645c62064534165beef825ba08b2aa266f SOURCES/jackson-core-2.21.4.tar.gz
|
5869d1634403fa4c844eb04899e25e50d5eee294 SOURCES/jackson-core-2.14.1.tar.gz
|
||||||
|
|||||||
@ -1,415 +0,0 @@
|
|||||||
From ddc1f5588ca7634e5a8aab30cfdb8ce3eb06d360 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Marco Fargetta <mfargett@redhat.com>
|
|
||||||
Date: Tue, 15 Jul 2025 18:03:33 +0200
|
|
||||||
Subject: [PATCH] Remove ch.randelshofer.fastdoubleparser library
|
|
||||||
|
|
||||||
---
|
|
||||||
.../jackson/core/io/BigDecimalParser.java | 59 ++-----------------
|
|
||||||
.../jackson/core/io/BigIntegerParser.java | 41 -------------
|
|
||||||
.../jackson/core/io/NumberInput.java | 29 +--------
|
|
||||||
.../jackson/core/io/BigDecimalParserTest.java | 11 ++--
|
|
||||||
.../jackson/core/io/BigIntegerParserTest.java | 54 -----------------
|
|
||||||
.../core/io/doubleparser/ReaderTest.java | 42 -------------
|
|
||||||
6 files changed, 12 insertions(+), 224 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
|
|
||||||
delete mode 100644 src/test/java/com/fasterxml/jackson/core/io/doubleparser/ReaderTest.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 913c4ce7..d4b8ee2e 100644
|
|
||||||
--- a/src/main/java/com/fasterxml/jackson/core/io/BigDecimalParser.java
|
|
||||||
+++ b/src/main/java/com/fasterxml/jackson/core/io/BigDecimalParser.java
|
|
||||||
@@ -2,8 +2,6 @@ package com.fasterxml.jackson.core.io;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
-import ch.randelshofer.fastdoubleparser.JavaBigDecimalParser;
|
|
||||||
-
|
|
||||||
/**
|
|
||||||
* Internal Jackson Helper class used to implement more optimized parsing of {@link BigDecimal} for REALLY
|
|
||||||
* big values (over 500 characters).
|
|
||||||
@@ -42,14 +40,8 @@ public final class BigDecimalParser
|
|
||||||
*/
|
|
||||||
public static BigDecimal parse(String valueStr) {
|
|
||||||
try {
|
|
||||||
- if (valueStr.length() < SIZE_FOR_SWITCH_TO_FASTDOUBLEPARSER) {
|
|
||||||
- return new BigDecimal(valueStr);
|
|
||||||
- }
|
|
||||||
- return JavaBigDecimalParser.parseBigDecimal(valueStr);
|
|
||||||
-
|
|
||||||
- // 20-Aug-2022, tatu: Although "new BigDecimal(...)" only throws NumberFormatException
|
|
||||||
- // operations by "parseBigDecimal()" can throw "ArithmeticException", so handle both:
|
|
||||||
- } catch (ArithmeticException | NumberFormatException e) {
|
|
||||||
+ return new BigDecimal(valueStr);
|
|
||||||
+ } catch (NumberFormatException e) {
|
|
||||||
throw _parseFailure(e, valueStr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -66,14 +58,8 @@ public final class BigDecimalParser
|
|
||||||
*/
|
|
||||||
public static BigDecimal parse(final char[] chars, final int off, final int len) {
|
|
||||||
try {
|
|
||||||
- if (len < SIZE_FOR_SWITCH_TO_FASTDOUBLEPARSER) {
|
|
||||||
- return new BigDecimal(chars, off, len);
|
|
||||||
- }
|
|
||||||
- return JavaBigDecimalParser.parseBigDecimal(chars, off, len);
|
|
||||||
-
|
|
||||||
- // 20-Aug-2022, tatu: Although "new BigDecimal(...)" only throws NumberFormatException
|
|
||||||
- // operations by "parseBigDecimal()" can throw "ArithmeticException", so handle both:
|
|
||||||
- } catch (ArithmeticException | NumberFormatException e) {
|
|
||||||
+ return new BigDecimal(chars, off, len);
|
|
||||||
+ } catch (NumberFormatException e) {
|
|
||||||
throw _parseFailure(e, chars, off, len);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -93,43 +79,6 @@ public final class BigDecimalParser
|
|
||||||
return parse(chars, 0, chars.length);
|
|
||||||
}
|
|
||||||
|
|
||||||
- /**
|
|
||||||
- * Internal Jackson method. Please do not use.
|
|
||||||
- *<p>
|
|
||||||
- * Note: Caller MUST pre-validate that given String represents a valid representation
|
|
||||||
- * of {@link BigDecimal} value: parsers in {@code jackson-core} do that; other
|
|
||||||
- * code must do the same.
|
|
||||||
- *
|
|
||||||
- * @param valueStr
|
|
||||||
- * @return BigDecimal value
|
|
||||||
- * @throws NumberFormatException
|
|
||||||
- */
|
|
||||||
- public static BigDecimal parseWithFastParser(final String valueStr) {
|
|
||||||
- try {
|
|
||||||
- return JavaBigDecimalParser.parseBigDecimal(valueStr);
|
|
||||||
- } catch (ArithmeticException | NumberFormatException e) {
|
|
||||||
- throw _parseFailure(e, valueStr);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- /**
|
|
||||||
- * Internal Jackson method. Please do not use.
|
|
||||||
- *<p>
|
|
||||||
- * Note: Caller MUST pre-validate that given String represents a valid representation
|
|
||||||
- * of {@link BigDecimal} value: parsers in {@code jackson-core} do that; other
|
|
||||||
- * code must do the same.
|
|
||||||
- *
|
|
||||||
- * @return BigDecimal value
|
|
||||||
- * @throws NumberFormatException
|
|
||||||
- */
|
|
||||||
- public static BigDecimal parseWithFastParser(final char[] ch, final int off, final int len) {
|
|
||||||
- try {
|
|
||||||
- return JavaBigDecimalParser.parseBigDecimal(ch, off, len);
|
|
||||||
- } catch (ArithmeticException | NumberFormatException e) {
|
|
||||||
- throw _parseFailure(e, ch, off, len);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
private static NumberFormatException _parseFailure(Exception e, String fullValue) {
|
|
||||||
String desc = e.getMessage();
|
|
||||||
// 05-Feb-2021, tatu: Alas, JDK mostly has null message so:
|
|
||||||
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 be61ef1b..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 java.math.BigInteger;
|
|
||||||
-
|
|
||||||
-import ch.randelshofer.fastdoubleparser.JavaBigIntegerParser;
|
|
||||||
-
|
|
||||||
-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 9656294d..4db891ea 100644
|
|
||||||
--- a/src/main/java/com/fasterxml/jackson/core/io/NumberInput.java
|
|
||||||
+++ b/src/main/java/com/fasterxml/jackson/core/io/NumberInput.java
|
|
||||||
@@ -4,9 +4,6 @@ import java.math.BigDecimal;
|
|
||||||
import java.math.BigInteger;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
-import ch.randelshofer.fastdoubleparser.JavaDoubleParser;
|
|
||||||
-import ch.randelshofer.fastdoubleparser.JavaFloatParser;
|
|
||||||
-
|
|
||||||
/**
|
|
||||||
* Helper class for efficient parsing of various JSON numbers.
|
|
||||||
*<p>
|
|
||||||
@@ -407,7 +404,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);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
@@ -432,8 +429,7 @@ public final class NumberInput
|
|
||||||
*/
|
|
||||||
public static double parseDouble(final char[] array, final int offset,
|
|
||||||
final int len, final boolean useFastParser) throws NumberFormatException {
|
|
||||||
- return useFastParser ? JavaDoubleParser.parseDouble(array, offset, len) :
|
|
||||||
- Double.parseDouble(new String(array, offset, len));
|
|
||||||
+ return Double.parseDouble(new String(array, offset, len));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
@@ -458,9 +454,6 @@ public final class NumberInput
|
|
||||||
* @since v2.14
|
|
||||||
*/
|
|
||||||
public static float parseFloat(final String s, final boolean useFastParser) throws NumberFormatException {
|
|
||||||
- if (useFastParser) {
|
|
||||||
- return JavaFloatParser.parseFloat(s);
|
|
||||||
- }
|
|
||||||
return Float.parseFloat(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -486,8 +479,7 @@ public final class NumberInput
|
|
||||||
*/
|
|
||||||
public static float parseFloat(final char[] array, final int offset,
|
|
||||||
final int len, final boolean useFastParser) throws NumberFormatException {
|
|
||||||
- return useFastParser ? JavaFloatParser.parseFloat(array, offset, len) :
|
|
||||||
- Float.parseFloat(new String(array, offset, len));
|
|
||||||
+ return Float.parseFloat(new String(array, offset, len));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
@@ -510,9 +502,6 @@ public final class NumberInput
|
|
||||||
* @since v2.15
|
|
||||||
*/
|
|
||||||
public static BigDecimal parseBigDecimal(final String s, final boolean useFastParser) throws NumberFormatException {
|
|
||||||
- if (useFastParser) {
|
|
||||||
- return BigDecimalParser.parseWithFastParser(s);
|
|
||||||
- }
|
|
||||||
return BigDecimalParser.parse(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -543,9 +532,6 @@ public final class NumberInput
|
|
||||||
final boolean useFastParser)
|
|
||||||
throws NumberFormatException
|
|
||||||
{
|
|
||||||
- if (useFastParser) {
|
|
||||||
- return BigDecimalParser.parseWithFastParser(ch, off, len);
|
|
||||||
- }
|
|
||||||
return BigDecimalParser.parse(ch, off, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -569,9 +555,6 @@ public final class NumberInput
|
|
||||||
* @since v2.15
|
|
||||||
*/
|
|
||||||
public static BigDecimal parseBigDecimal(final char[] ch, final boolean useFastParser) throws NumberFormatException {
|
|
||||||
- if (useFastParser) {
|
|
||||||
- return BigDecimalParser.parseWithFastParser(ch, 0, ch.length);
|
|
||||||
- }
|
|
||||||
return BigDecimalParser.parse(ch);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -596,9 +579,6 @@ 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);
|
|
||||||
- }
|
|
||||||
return new BigInteger(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -612,9 +592,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);
|
|
||||||
- }
|
|
||||||
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 9ec4cc6c..b067bad0 100644
|
|
||||||
--- a/src/test/java/com/fasterxml/jackson/core/io/BigDecimalParserTest.java
|
|
||||||
+++ b/src/test/java/com/fasterxml/jackson/core/io/BigDecimalParserTest.java
|
|
||||||
@@ -2,7 +2,6 @@ package com.fasterxml.jackson.core.io;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
-import ch.randelshofer.fastdoubleparser.JavaBigDecimalParser;
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
|
||||||
@@ -23,7 +22,7 @@ class BigDecimalParserTest extends com.fasterxml.jackson.core.JUnit5TestBase
|
|
||||||
@Test
|
|
||||||
void longInvalidStringFastParse() {
|
|
||||||
try {
|
|
||||||
- BigDecimalParser.parseWithFastParser(genLongInvalidString());
|
|
||||||
+ BigDecimalParser.parse(genLongInvalidString());
|
|
||||||
fail("expected NumberFormatException");
|
|
||||||
} catch (NumberFormatException nfe) {
|
|
||||||
assertTrue(nfe.getMessage().startsWith("Value \"AAAAA"), "exception message starts as expected?");
|
|
||||||
@@ -48,8 +47,8 @@ class BigDecimalParserTest extends com.fasterxml.jackson.core.JUnit5TestBase
|
|
||||||
final BigDecimal EXP = new BigDecimal(num);
|
|
||||||
|
|
||||||
// Parse from String first, then char[]
|
|
||||||
- assertEquals(EXP, BigDecimalParser.parseWithFastParser(num));
|
|
||||||
- assertEquals(EXP, BigDecimalParser.parseWithFastParser(num.toCharArray(), 0, num.length()));
|
|
||||||
+ assertEquals(EXP, BigDecimalParser.parse(num));
|
|
||||||
+ assertEquals(EXP, BigDecimalParser.parse(num.toCharArray(), 0, num.length()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@@ -58,10 +57,10 @@ class BigDecimalParserTest extends com.fasterxml.jackson.core.JUnit5TestBase
|
|
||||||
final BigDecimal expected = new BigDecimal(str);
|
|
||||||
assertEquals(expected, JavaBigDecimalParser.parseBigDecimal(str));
|
|
||||||
assertEquals(expected, BigDecimalParser.parse(str));
|
|
||||||
- assertEquals(expected, BigDecimalParser.parseWithFastParser(str));
|
|
||||||
+ assertEquals(expected, BigDecimalParser.parse(str));
|
|
||||||
final char[] arr = str.toCharArray();
|
|
||||||
assertEquals(expected, BigDecimalParser.parse(arr, 0, arr.length));
|
|
||||||
- assertEquals(expected, BigDecimalParser.parseWithFastParser(arr, 0, arr.length));
|
|
||||||
+ assertEquals(expected, BigDecimalParser.parse(arr, 0, arr.length));
|
|
||||||
}
|
|
||||||
|
|
||||||
static String genLongInvalidString() {
|
|
||||||
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 a515f656..00000000
|
|
||||||
--- a/src/test/java/com/fasterxml/jackson/core/io/BigIntegerParserTest.java
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,54 +0,0 @@
|
|
||||||
-package com.fasterxml.jackson.core.io;
|
|
||||||
-
|
|
||||||
-import org.junit.jupiter.api.Test;
|
|
||||||
-
|
|
||||||
-import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
||||||
-import static org.junit.jupiter.api.Assertions.fail;
|
|
||||||
-
|
|
||||||
-class BigIntegerParserTest extends com.fasterxml.jackson.core.JUnit5TestBase {
|
|
||||||
-
|
|
||||||
- @Test
|
|
||||||
- void fastParseBigIntegerFailsWithENotation() {
|
|
||||||
- String num = "2e308";
|
|
||||||
- try {
|
|
||||||
- BigIntegerParser.parseWithFastParser(num);
|
|
||||||
- fail("expected NumberFormatException");
|
|
||||||
- } catch (NumberFormatException nfe) {
|
|
||||||
- // expected
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- @Test
|
|
||||||
- void longStringFastParseBigInteger() {
|
|
||||||
- try {
|
|
||||||
- BigIntegerParser.parseWithFastParser(genLongString());
|
|
||||||
- fail("expected NumberFormatException");
|
|
||||||
- } catch (NumberFormatException nfe) {
|
|
||||||
- assertTrue(nfe.getMessage().startsWith("Value \"AAAAA"), "exception message starts as expected?");
|
|
||||||
- assertTrue(nfe.getMessage().contains("truncated"), "exception message value contains: truncated");
|
|
||||||
- assertTrue(nfe.getMessage().contains("BigInteger"), "exception message value contains: BigInteger");
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- @Test
|
|
||||||
- void longStringFastParseBigIntegerRadix() {
|
|
||||||
- try {
|
|
||||||
- BigIntegerParser.parseWithFastParser(genLongString(), 8);
|
|
||||||
- fail("expected NumberFormatException");
|
|
||||||
- } catch (NumberFormatException nfe) {
|
|
||||||
- assertTrue(nfe.getMessage().startsWith("Value \"AAAAA"), "exception message starts as expected?");
|
|
||||||
- assertTrue(nfe.getMessage().contains("truncated"), "exception message value contains: truncated");
|
|
||||||
- assertTrue(nfe.getMessage().contains("radix 8"), "exception message value contains: radix 8");
|
|
||||||
- assertTrue(nfe.getMessage().contains("BigInteger"), "exception message value 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();
|
|
||||||
- }
|
|
||||||
-}
|
|
||||||
diff --git a/src/test/java/com/fasterxml/jackson/core/io/doubleparser/ReaderTest.java b/src/test/java/com/fasterxml/jackson/core/io/doubleparser/ReaderTest.java
|
|
||||||
deleted file mode 100644
|
|
||||||
index 4b56b9f0..00000000
|
|
||||||
--- a/src/test/java/com/fasterxml/jackson/core/io/doubleparser/ReaderTest.java
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,42 +0,0 @@
|
|
||||||
-package com.fasterxml.jackson.core.io.doubleparser;
|
|
||||||
-
|
|
||||||
-import java.util.Random;
|
|
||||||
-
|
|
||||||
-import ch.randelshofer.fastdoubleparser.JavaDoubleParser;
|
|
||||||
-import ch.randelshofer.fastdoubleparser.JavaFloatParser;
|
|
||||||
-import org.junit.jupiter.api.Test;
|
|
||||||
-
|
|
||||||
-import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
||||||
-
|
|
||||||
-class ReaderTest {
|
|
||||||
- private static final int LEN = 1000;
|
|
||||||
- private static final String[] DOUBLE_STRINGS = new String[LEN];
|
|
||||||
- private static final String[] FLOAT_STRINGS = new String[LEN];
|
|
||||||
-
|
|
||||||
- static {
|
|
||||||
- Random rnd = new Random();
|
|
||||||
- for (int i = 0; i < LEN; i++) {
|
|
||||||
- DOUBLE_STRINGS[i] = Double.toString(rnd.nextDouble());
|
|
||||||
- FLOAT_STRINGS[i] = Float.toString(rnd.nextFloat());
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- @Test
|
|
||||||
- void verifyDoubles() {
|
|
||||||
- for (int i = 0; i < LEN; i++) {
|
|
||||||
- double fd = JavaDoubleParser.parseDouble(DOUBLE_STRINGS[i]);
|
|
||||||
- double jd = Double.parseDouble(DOUBLE_STRINGS[i]);
|
|
||||||
- assertEquals(jd, fd);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- @Test
|
|
||||||
- void verifyFloats() {
|
|
||||||
- for (int i = 0; i < LEN; i++) {
|
|
||||||
- float ff = JavaFloatParser.parseFloat(FLOAT_STRINGS[i]);
|
|
||||||
- float jf = Float.parseFloat(FLOAT_STRINGS[i]);
|
|
||||||
- assertEquals(jf, ff);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
-}
|
|
||||||
\ No newline at end of file
|
|
||||||
--
|
|
||||||
2.50.1
|
|
||||||
|
|
||||||
@ -1,12 +1,11 @@
|
|||||||
Name: jackson-core
|
Name: jackson-core
|
||||||
Version: 2.21.4
|
Version: 2.14.1
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Core part of Jackson
|
Summary: Core part of Jackson
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
|
|
||||||
URL: https://github.com/FasterXML/jackson-core
|
URL: https://github.com/FasterXML/jackson-core
|
||||||
Source0: %{url}/archive/%{name}-%{version}.tar.gz
|
Source0: %{url}/archive/%{name}-%{version}.tar.gz
|
||||||
Patch1: 0001-Remove-ch.randelshofer.fastdoubleparser.patch
|
|
||||||
|
|
||||||
BuildRequires: maven-local
|
BuildRequires: maven-local
|
||||||
BuildRequires: mvn(com.fasterxml.jackson:jackson-base:pom:) >= %{version}
|
BuildRequires: mvn(com.fasterxml.jackson:jackson-base:pom:) >= %{version}
|
||||||
@ -14,30 +13,32 @@ BuildRequires: mvn(com.google.code.maven-replacer-plugin:replacer)
|
|||||||
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if 0%{?fedora}
|
|
||||||
ExclusiveArch: %{java_arches} noarch
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Core part of Jackson that defines Streaming API as well
|
Core part of Jackson that defines Streaming API as well
|
||||||
as basic shared abstractions.
|
as basic shared abstractions.
|
||||||
|
|
||||||
|
%package -n pki-%{name}
|
||||||
|
Summary: Core part of Jackson
|
||||||
|
Obsoletes: %{name} < %{version}-%{release}
|
||||||
|
Conflicts: %{name} < %{version}-%{release}
|
||||||
|
Provides: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n pki-%{name}
|
||||||
|
Core part of Jackson that defines Streaming API as well
|
||||||
|
as basic shared abstractions.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{name}-%{version}
|
%setup -q -n %{name}-%{name}-%{version}
|
||||||
%patch -P1 -p1
|
|
||||||
|
|
||||||
# Remove plugins unnecessary for RPM builds
|
# Remove plugins unnecessary for RPM builds
|
||||||
%pom_remove_plugin ":maven-enforcer-plugin"
|
%pom_remove_plugin ":maven-enforcer-plugin"
|
||||||
%pom_remove_plugin "org.apache.maven.plugins:maven-shade-plugin"
|
|
||||||
%pom_remove_plugin "org.jacoco:jacoco-maven-plugin"
|
%pom_remove_plugin "org.jacoco:jacoco-maven-plugin"
|
||||||
%pom_remove_plugin "org.moditect:moditect-maven-plugin"
|
%pom_remove_plugin "org.moditect:moditect-maven-plugin"
|
||||||
%pom_remove_plugin "org.gradlex:gradle-module-metadata-maven-plugin"
|
%pom_remove_plugin "de.jjohannes:gradle-module-metadata-maven-plugin"
|
||||||
%pom_remove_plugin "org.cyclonedx:cyclonedx-maven-plugin"
|
|
||||||
|
|
||||||
%pom_remove_dep "ch.randelshofer:fastdoubleparser"
|
cp -p src/main/resources/META-INF/NOTICE .
|
||||||
|
sed -i 's/\r//' LICENSE NOTICE
|
||||||
cp -p src/main/resources/META-INF/jackson-core-NOTICE .
|
|
||||||
sed -i 's/\r//' LICENSE jackson-core-NOTICE
|
|
||||||
|
|
||||||
%mvn_file : %{name}
|
%mvn_file : %{name}
|
||||||
|
|
||||||
@ -47,31 +48,89 @@ sed -i 's/\r//' LICENSE jackson-core-NOTICE
|
|||||||
%install
|
%install
|
||||||
%mvn_install
|
%mvn_install
|
||||||
|
|
||||||
%files -f .mfiles
|
%files -n pki-%{name} -f .mfiles
|
||||||
%doc README.md release-notes/*
|
%doc README.md release-notes/*
|
||||||
%license LICENSE jackson-core-NOTICE
|
%license LICENSE NOTICE
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Jul 08 2026 Red Hat PKI Team <rhcs-maint@redhat.com> - 2.21.4-1
|
* Thu Nov 24 2022 Chris Kelley <ckelley@redhat.com> - 2.14.1-1
|
||||||
- Rebase to version 2.21.4
|
- Update to version 2.14.1
|
||||||
- Resolves: RHEL-188291
|
- Resolves: #2070122
|
||||||
|
|
||||||
* Thu Jul 31 2025 Red Hat PKI Team <rhcs-maint@redhat.com> - 2.19.1-1
|
* Mon Aug 16 2021 Red Hat PKI Team <rhcs-maint@redhat.com> - 2.11.4-6
|
||||||
- Rebase to upstream version 2.19.1
|
- Disable tests
|
||||||
- Resolves: RHEL-103106
|
- Drop javadoc subpackage
|
||||||
|
|
||||||
* Wed Nov 22 2023 Red Hat PKI Team <rhcs-maint@redhat.com> - 2.14.2-1
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.11.4-5
|
||||||
- Rebase to upstream version 2.14.2
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||||
|
Related: rhbz#1991688
|
||||||
|
|
||||||
* Tue Nov 12 2019 Red Hat PKI Team <rhcs-maint@redhat.com> - 2.10.0-1
|
* Tue Apr 27 2021 Red Hat PKI Team <rhcs-maint@redhat.com> - 2.11.4-4
|
||||||
|
- Rename subpackages to pki-jackson
|
||||||
|
|
||||||
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.11.4-3
|
||||||
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.4-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jan 18 2021 Fabio Valentini <decathorpe@gmail.com> - 2.11.4-1
|
||||||
|
- Update to version 2.11.4.
|
||||||
|
|
||||||
|
* Wed Oct 14 2020 Fabio Valentini <decathorpe@gmail.com> - 2.11.3-1
|
||||||
|
- Update to version 2.11.3.
|
||||||
|
|
||||||
|
* Sat Aug 08 2020 Fabio Valentini <decathorpe@gmail.com> - 2.11.2-1
|
||||||
|
- Update to version 2.11.2.
|
||||||
|
|
||||||
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.1-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 2.11.1-2
|
||||||
|
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
|
||||||
|
|
||||||
|
* Mon Jul 06 2020 Fabio Valentini <decathorpe@gmail.com> - 2.11.1-1
|
||||||
|
- Update to version 2.11.1.
|
||||||
|
|
||||||
|
* Mon May 25 2020 Fabio Valentini <decathorpe@gmail.com> - 2.11.0-1
|
||||||
|
- Update to version 2.11.0.
|
||||||
|
|
||||||
|
* Fri May 08 2020 Fabio Valentini <decathorpe@gmail.com> - 2.10.4-1
|
||||||
|
- Update to version 2.10.4.
|
||||||
|
|
||||||
|
* Tue Mar 03 2020 Fabio Valentini <decathorpe@gmail.com> - 2.10.3-1
|
||||||
|
- Update to version 2.10.3.
|
||||||
|
|
||||||
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.2-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jan 17 2020 Fabio Valentini <decathorpe@gmail.com> - 2.10.2-1
|
||||||
|
- Update to version 2.10.2.
|
||||||
|
|
||||||
|
* Wed Nov 13 2019 Fabio Valentini <decathorpe@gmail.com> - 2.10.1-1
|
||||||
|
- Update to version 2.10.1.
|
||||||
|
|
||||||
|
* Thu Oct 3 2019 Alexander Scheel <ascheel@redhat.com> - 2.10.0-1
|
||||||
- Update to latest upstream release
|
- Update to latest upstream release
|
||||||
|
|
||||||
* Wed Jul 31 2019 Red Hat PKI Team <rhcs-maint@redhat.com> - 2.9.9-1
|
* Thu Sep 12 2019 Alexander Scheel <ascheel@redhat.com> - 2.9.9-1
|
||||||
- Update to latest upstream release
|
- Update to latest upstream release
|
||||||
|
|
||||||
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.8-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jun 06 2019 Mat Booth <mat.booth@redhat.com> - 2.9.8-2
|
||||||
|
- Speed up builds on 32bit arm
|
||||||
|
|
||||||
* Wed Feb 06 2019 Mat Booth <mat.booth@redhat.com> - 2.9.8-1
|
* Wed Feb 06 2019 Mat Booth <mat.booth@redhat.com> - 2.9.8-1
|
||||||
- Update to latest upstream release
|
- Update to latest upstream release
|
||||||
|
|
||||||
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.4-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.4-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.4-2
|
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.4-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user