mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-06 00:05:54 +03:00
dev-java/jackson-databind: add 2.20.0
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Part-of: https://github.com/gentoo/gentoo/pull/44063 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
This commit is contained in:
committed by
Miroslav Šulc
parent
569df3a0ec
commit
b0f4971167
@@ -1 +1,3 @@
|
||||
DIST jackson-databind-2.13.4.1.tar.gz 48063423 BLAKE2B 88370810068f3c1b3973f310e55e6fb53067ff9796de960d2c57cd50ee59dd552f58b4e73d4455076b18ec996ce7714ab84000a4887a1779fcf259859c891346 SHA512 22b7a4225903a0fad3d7d17a5fad79905da96a4a7ebf70b7d9f2c778e88f8c9c2a27d96f66beae96f189ebcd9ca19fd7b12405009ae38023ec8b0511e1ba1af2
|
||||
DIST jackson-databind-2.20.0.tar.gz 1744001 BLAKE2B 3167541356510eba3b2573b0df3e8f03a4798f78ba03f93b038bc63c746419a8d2ba4a765686de24b0c1de83c2d0560159835a4c2b4fb4d4e9b6b9613b051ce2 SHA512 d6c25efac9084809b9c6406a629e3b526ddbdcbb0b1b5dd8736711cb899718bd7bb54f38b300deeca009c6d1acebb1d7e6a13144d3755d4b8ae5d63695a69eff
|
||||
DIST jsr-275-0.9.1.jar 238820 BLAKE2B 6e49815d4806fb4f7f85ccefd05cdbcef77bf309ed0a538d06ef5138d5f456901d3e4099aee9d8a6b18e40b75728fbc5218130d54e50ff6e2728223487172796 SHA512 58c8c4a98145ea4eaeffe070c592c3dde2cc0987d3aa99555509c04566d2fd356eb6bc5f484fe922eb61c875de359f9aff027f76ac9cc20b196d7fd954406c70
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
testInetAddress()
|
||||
tags: []
|
||||
uniqueId: [engine:junit-jupiter]/[class:com.fasterxml.jackson.databind.deser.jdk.JDKStringLikeTypeDeserTest]/[method:testInetAddress()]
|
||||
parent: [engine:junit-jupiter]/[class:com.fasterxml.jackson.databind.deser.jdk.JDKStringLikeTypeDeserTest]
|
||||
source: MethodSource [className = 'com.fasterxml.jackson.databind.deser.jdk.JDKStringLikeTypeDeserTest', methodName = 'testInetAddress', methodParameterTypes = '']
|
||||
caught: com.fasterxml.jackson.databind.JsonMappingException: Unexpected IOException (of type java.net.UnknownHostException): google.com: Temporary failure in name resolution
|
||||
at com.fasterxml.jackson.databind.JsonMappingException.fromUnexpectedIOE(JsonMappingException.java:344)
|
||||
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3958)
|
||||
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3922)
|
||||
at com.fasterxml.jackson.databind.deser.jdk.JDKStringLikeTypeDeserTest.testInetAddress(JDKStringLikeTypeDeserTest.java:178)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
duration: 13 ms
|
||||
status: ✘ FAILED
|
||||
|
||||
diff --git a/src/test/java/com/fasterxml/jackson/databind/deser/jdk/JDKStringLikeTypeDeserTest.java b/src/test/java/com/fasterxml/jackson/databind/deser/jdk/JDKStringLikeTypeDeserTest.java
|
||||
index 8fe9ca9..56ac9a9 100644
|
||||
--- a/src/test/java/com/fasterxml/jackson/databind/deser/jdk/JDKStringLikeTypeDeserTest.java
|
||||
+++ b/src/test/java/com/fasterxml/jackson/databind/deser/jdk/JDKStringLikeTypeDeserTest.java
|
||||
@@ -10,6 +10,7 @@ import java.util.UUID;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
+import org.junit.jupiter.api.Disabled;
|
||||
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
|
||||
@@ -167,7 +168,7 @@ public class JDKStringLikeTypeDeserTest
|
||||
assertEquals("abc", cs.toString());
|
||||
}
|
||||
|
||||
- @Test
|
||||
+ @Test @Disabled
|
||||
public void testInetAddress() throws IOException
|
||||
{
|
||||
InetAddress address = MAPPER.readValue(q("127.0.0.1"), InetAddress.class);
|
||||
@@ -0,0 +1,42 @@
|
||||
testInetAddress()
|
||||
tags: []
|
||||
uniqueId: [engine:junit-jupiter]/[class:com.fasterxml.jackson.databind.ser.jdk.JDKTypeSerializationTest]/[method:testInetAddress()]
|
||||
parent: [engine:junit-jupiter]/[class:com.fasterxml.jackson.databind.ser.jdk.JDKTypeSerializationTest]
|
||||
source: MethodSource [className = 'com.fasterxml.jackson.databind.ser.jdk.JDKTypeSerializationTest', methodName = 'testInetAddress', methodParameterTypes = '']
|
||||
caught: java.net.UnknownHostException: google.com: Temporary failure in name resolution
|
||||
at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
|
||||
at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:52)
|
||||
at java.base/java.net.InetAddress$PlatformResolver.lookupByName(InetAddress.java:1134)
|
||||
at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1712)
|
||||
at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:1060)
|
||||
at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1702)
|
||||
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1582)
|
||||
at java.base/java.net.InetAddress.getByName(InetAddress.java:1492)
|
||||
at com.fasterxml.jackson.databind.ser.jdk.JDKTypeSerializationTest.testInetAddress(JDKTypeSerializationTest.java:111)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
duration: 11 ms
|
||||
status: ✘ FAILED
|
||||
|
||||
diff --git a/src/test/java/com/fasterxml/jackson/databind/ser/jdk/JDKTypeSerializationTest.java b/src/test/java/com/fasterxml/jackson/databind/ser/jdk/JDKTypeSerializationTest.java
|
||||
index c41228d..3907623 100644
|
||||
--- a/src/test/java/com/fasterxml/jackson/databind/ser/jdk/JDKTypeSerializationTest.java
|
||||
+++ b/src/test/java/com/fasterxml/jackson/databind/ser/jdk/JDKTypeSerializationTest.java
|
||||
@@ -10,6 +10,7 @@ import java.util.*;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
+import org.junit.jupiter.api.Disabled;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
@@ -104,7 +105,7 @@ public class JDKTypeSerializationTest
|
||||
assertEquals(q(""), MAPPER.writeValueAsString(Locale.ROOT));
|
||||
}
|
||||
|
||||
- @Test
|
||||
+ @Test @Disabled
|
||||
public void testInetAddress() throws IOException
|
||||
{
|
||||
assertEquals(q("127.0.0.1"), MAPPER.writeValueAsString(InetAddress.getByName("127.0.0.1")));
|
||||
@@ -0,0 +1,60 @@
|
||||
testClassIsMissing()
|
||||
tags: []
|
||||
uniqueId: [engine:junit-jupiter]/[class:com.fasterxml.jackson.databind.introspect.NoClassDefFoundWorkaroundTest]/[method:testClassIsMissing()]
|
||||
parent: [engine:junit-jupiter]/[class:com.fasterxml.jackson.databind.introspect.NoClassDefFoundWorkaroundTest]
|
||||
source: MethodSource [className = 'com.fasterxml.jackson.databind.introspect.NoClassDefFoundWorkaroundTest', methodName = 'testClassIsMissing', methodParameterTypes = '']
|
||||
caught: org.opentest4j.AssertionFailedError: Should not have found javax.measure.Measure
|
||||
at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
|
||||
at org.junit.jupiter.api.Assertions.fail(Assertions.java:138)
|
||||
at com.fasterxml.jackson.databind.introspect.NoClassDefFoundWorkaroundTest.testClassIsMissing(NoClassDefFoundWorkaroundTest.java:29)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
duration: 19 ms
|
||||
status: ✘ FAILED
|
||||
testUseMissingClass()
|
||||
tags: []
|
||||
uniqueId: [engine:junit-jupiter]/[class:com.fasterxml.jackson.databind.introspect.NoClassDefFoundWorkaroundTest]/[method:testUseMissingClass()]
|
||||
parent: [engine:junit-jupiter]/[class:com.fasterxml.jackson.databind.introspect.NoClassDefFoundWorkaroundTest]
|
||||
source: MethodSource [className = 'com.fasterxml.jackson.databind.introspect.NoClassDefFoundWorkaroundTest', methodName = 'testUseMissingClass', methodParameterTypes = '']
|
||||
caught: org.opentest4j.AssertionFailedError: cannot instantiate a missing class ==> expected: <true> but was: <false>
|
||||
at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
|
||||
at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
|
||||
at org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
|
||||
at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
|
||||
at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:214)
|
||||
at com.fasterxml.jackson.databind.introspect.NoClassDefFoundWorkaroundTest.testUseMissingClass(NoClassDefFoundWorkaroundTest.java:53)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
duration: 5 ms
|
||||
status: ✘ FAILED
|
||||
|
||||
--- a/src/test/java/com/fasterxml/jackson/databind/introspect/NoClassDefFoundWorkaroundTest.java
|
||||
+++ b/src/test/java/com/fasterxml/jackson/databind/introspect/NoClassDefFoundWorkaroundTest.java
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import javax.measure.Measure;
|
||||
import org.junit.jupiter.api.Test;
|
||||
+import org.junit.jupiter.api.Disabled;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.testutil.DatabindTestUtil;
|
||||
@@ -21,7 +22,7 @@ public class NoClassDefFoundWorkaroundTest extends DatabindTestUtil
|
||||
public Measure<?> measure;
|
||||
}
|
||||
|
||||
- @Test
|
||||
+ @Test @Disabled
|
||||
public void testClassIsMissing()
|
||||
{
|
||||
try {
|
||||
@@ -40,7 +41,7 @@ public class NoClassDefFoundWorkaroundTest extends DatabindTestUtil
|
||||
assertNotNull(result);
|
||||
}
|
||||
|
||||
- @Test
|
||||
+ @Test @Disabled
|
||||
public void testUseMissingClass() throws Exception
|
||||
{
|
||||
boolean missing = false;
|
||||
78
dev-java/jackson-databind/jackson-databind-2.20.0.ebuild
Normal file
78
dev-java/jackson-databind/jackson-databind-2.20.0.ebuild
Normal file
@@ -0,0 +1,78 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
JAVA_PKG_IUSE="doc source test"
|
||||
JAVA_TESTING_FRAMEWORKS="junit-jupiter"
|
||||
|
||||
inherit java-pkg-2 java-pkg-simple junit5
|
||||
|
||||
JMV="0.9.1"
|
||||
DESCRIPTION="General data-binding functionality for Jackson: works on core streaming API"
|
||||
HOMEPAGE="https://github.com/FasterXML/jackson-databind"
|
||||
SRC_URI="https://github.com/FasterXML/${PN}/archive/${P}.tar.gz
|
||||
test? ( https://repo1.maven.org/maven2/javax/measure/jsr-275/${JMV}/jsr-275-${JMV}.jar )"
|
||||
S="${WORKDIR}/${PN}-${P}"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
CP_DEPEND="
|
||||
~dev-java/jackson-annotations-$(ver_cut 1-2):0
|
||||
~dev-java/jackson-core-${PV}:0
|
||||
"
|
||||
|
||||
DEPEND="
|
||||
${CP_DEPEND}
|
||||
|| ( virtual/jdk:25 virtual/jdk:21 virtual/jdk:17 virtual/jdk:11 )
|
||||
test? (
|
||||
>=dev-java/asm-9.8-r1:0
|
||||
>=dev-java/assertj-core-3.27.6:0
|
||||
dev-java/fastdoubleparser:0
|
||||
>=dev-java/guava-testlib-33.5.0:0
|
||||
>=dev-java/jol-core-0.17:0
|
||||
dev-java/junit:5[suite]
|
||||
>=dev-java/mockito-5.20.0:0
|
||||
)
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
${CP_DEPEND}
|
||||
>=virtual/jre-1.8:*
|
||||
"
|
||||
|
||||
DOCS=( {README,SECURITY}.md release-notes/{CREDITS,VERSION}-2.x )
|
||||
PATCHES=(
|
||||
"${FILESDIR}/jackson-databind-2.20.0-NoClassDefFoundWorkaroundTest.patch"
|
||||
"${FILESDIR}/jackson-databind-2.20.0-JDKStringLikeTypeDeserTest.patch"
|
||||
"${FILESDIR}/jackson-databind-2.20.0-JDKTypeSerializationTest.patch"
|
||||
)
|
||||
|
||||
JAVA_GENTOO_CLASSPATH_EXTRA=( "${DISTDIR}/jsr-275-${JMV}.jar" )
|
||||
JAVA_INTERMEDIATE_JAR_NAME="com.fasterxml.jackson.databind"
|
||||
JAVA_RELEASE_SRC_DIRS=( ["9"]="src/moditect" )
|
||||
JAVA_RESOURCE_DIRS="src/main/resources"
|
||||
JAVA_SRC_DIR="src/main/java"
|
||||
JAVA_TEST_EXTRA_ARGS=( -Djdk.attach.allowAttachSelf -Djol.magicFieldOffset=true )
|
||||
JAVA_TEST_GENTOO_CLASSPATH="asm assertj-core fastdoubleparser guava-testlib jol-core mockito"
|
||||
JAVA_TEST_SRC_DIR="src/test/java"
|
||||
JAVA_TEST_RESOURCE_DIRS="src/test/resources"
|
||||
|
||||
src_prepare() {
|
||||
default # bug #780585
|
||||
java-pkg-2_src_prepare
|
||||
|
||||
sed -e 's:@package@:com.fasterxml.jackson.databind.cfg:g' \
|
||||
-e "s:@projectversion@:${PV}:g" \
|
||||
-e 's:@projectgroupid@:com.fasterxml.jackson.core:g' \
|
||||
-e "s:@projectartifactid@:${PN}:g" \
|
||||
"${JAVA_SRC_DIR}/com/fasterxml/jackson/databind/cfg/PackageVersion.java.in" \
|
||||
> "${JAVA_SRC_DIR}/com/fasterxml/jackson/databind/cfg/PackageVersion.java" || die
|
||||
|
||||
local vm_version="$(java-config -g PROVIDES_VERSION)"
|
||||
if ver_test "${vm_version}" -ge 17; then
|
||||
JAVA_TEST_EXTRA_ARGS+=( --add-opens=java.base/java.{lang,util}=ALL-UNNAMED )
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user