Update to upstream version 1.10.20

This commit is contained in:
Marian Koncek 2021-02-04 17:31:52 +01:00
parent 20e721c240
commit 517db7ff23
3 changed files with 12 additions and 122 deletions

View File

@ -1,22 +1,21 @@
From e938b662ab78d1ae88309502cc0273e29d4a54f7 Mon Sep 17 00:00:00 2001
From 9763d7d30bcbb8bf56a6682bb7362f3de33a0802 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Wed, 30 Sep 2020 13:32:09 +0200
Date: Thu, 4 Feb 2021 15:17:13 +0100
Subject: [PATCH] Remove Java 14 tests
---
.../test/precompiled/SampleRecord.java | 24 -----
.../type/AbstractTypeDescriptionTest.java | 101 ------------------
2 files changed, 125 deletions(-)
.../test/precompiled/SampleRecord.java | 24 -------------------
1 file changed, 24 deletions(-)
delete mode 100644 byte-buddy-dep/src/precompiled/java/net/bytebuddy/test/precompiled/SampleRecord.java
diff --git a/byte-buddy-dep/src/precompiled/java/net/bytebuddy/test/precompiled/SampleRecord.java b/byte-buddy-dep/src/precompiled/java/net/bytebuddy/test/precompiled/SampleRecord.java
deleted file mode 100644
index c760fae..0000000
index 522eefa..0000000
--- a/byte-buddy-dep/src/precompiled/java/net/bytebuddy/test/precompiled/SampleRecord.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2014 - 2020 Rafael Winterhalter
- * Copyright 2014 - Present Rafael Winterhalter
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
@ -39,118 +38,6 @@ index c760fae..0000000
-public record SampleRecord(@AbstractTypeDescriptionTest.SampleAnnotation @TypeAnnotation(42) List<@TypeAnnotation(84) String> foo) {
- /* empty */
-}
diff --git a/byte-buddy-dep/src/test/java/net/bytebuddy/description/type/AbstractTypeDescriptionTest.java b/byte-buddy-dep/src/test/java/net/bytebuddy/description/type/AbstractTypeDescriptionTest.java
index 64c765b..e677900 100644
--- a/byte-buddy-dep/src/test/java/net/bytebuddy/description/type/AbstractTypeDescriptionTest.java
+++ b/byte-buddy-dep/src/test/java/net/bytebuddy/description/type/AbstractTypeDescriptionTest.java
@@ -753,107 +753,6 @@ public abstract class AbstractTypeDescriptionTest extends AbstractTypeDescriptio
assertThat(describe(String.class).getRecordComponents().size(), is(0));
}
- @Test
- @JavaVersionRule.Enforce(14)
- @Ignore("Requires preview features")
- public void testRecordComponents() throws Exception {
- Class<?> sampleRecord = Class.forName("net.bytebuddy.test.precompiled.SampleRecord");
- assertThat(describe(sampleRecord).isRecord(), is(true));
- @SuppressWarnings("unchecked")
- Class<? extends Annotation> typeAnnotation = (Class<? extends Annotation>) Class.forName("net.bytebuddy.test.precompiled.TypeAnnotation");
- MethodDescription.InDefinedShape value = new MethodDescription.ForLoadedMethod(typeAnnotation.getMethod("value"));
- RecordComponentList<RecordComponentDescription.InDefinedShape> recordComponents = describe(sampleRecord).getRecordComponents();
- assertThat(recordComponents.size(), is(1));
- assertThat(recordComponents.getOnly().getActualName(), is(FOO));
- assertThat(recordComponents.getOnly().getAccessor(), is((MethodDescription) new MethodDescription.ForLoadedMethod(sampleRecord.getMethod(FOO))));
- assertThat(recordComponents.getOnly().getDeclaringType(), is((TypeDefinition) TypeDescription.ForLoadedType.of(sampleRecord)));
- assertThat(recordComponents.getOnly().getDeclaredAnnotations().size(), is(1));
- assertThat(recordComponents.getOnly().getDeclaredAnnotations().getOnly().getAnnotationType().represents(SampleAnnotation.class), is(true));
- assertThat(recordComponents.getOnly().getType().asErasure().represents(List.class), is(true));
- assertThat(recordComponents.getOnly().getType().getSort(), is(TypeDefinition.Sort.PARAMETERIZED));
- assertThat(recordComponents.getOnly().getType().getDeclaredAnnotations().size(), is(1));
- assertThat(recordComponents.getOnly().getType().getDeclaredAnnotations().getOnly().getAnnotationType().represents(typeAnnotation), is(true));
- assertThat(recordComponents.getOnly().getType().getDeclaredAnnotations().getOnly().prepare(typeAnnotation).getValue(value).resolve(), is((Object) 42));
- assertThat(recordComponents.getOnly().getType().getTypeArguments().size(), is(1));
- assertThat(recordComponents.getOnly().getType().getTypeArguments().getOnly().getSort(), is(TypeDefinition.Sort.NON_GENERIC));
- assertThat(recordComponents.getOnly().getType().getTypeArguments().getOnly().asErasure().represents(String.class), is(true));
- assertThat(recordComponents.getOnly().getType().getTypeArguments().getOnly().getDeclaredAnnotations().size(), is(1));
- assertThat(recordComponents.getOnly().getType().getTypeArguments().getOnly().getDeclaredAnnotations().getOnly().getAnnotationType().represents(typeAnnotation), is(true));
- assertThat(recordComponents.getOnly().getType().getTypeArguments().getOnly().getDeclaredAnnotations().getOnly().prepare(typeAnnotation).getValue(value).resolve(), is((Object) 84));
- }
-
- @Test
- @JavaVersionRule.Enforce(14)
- @Ignore("Requires preview features")
- public void testRecordComponentsField() throws Exception {
- Class<?> sampleRecord = Class.forName("net.bytebuddy.test.precompiled.SampleRecord");
- @SuppressWarnings("unchecked")
- Class<? extends Annotation> typeAnnotation = (Class<? extends Annotation>) Class.forName("net.bytebuddy.test.precompiled.TypeAnnotation");
- MethodDescription.InDefinedShape value = new MethodDescription.ForLoadedMethod(typeAnnotation.getMethod("value"));
- FieldDescription fieldDescription = describe(sampleRecord).getDeclaredFields().filter(named(FOO)).getOnly();
- assertThat(fieldDescription.getDeclaredAnnotations().size(), is(1));
- assertThat(fieldDescription.getDeclaredAnnotations().getOnly().getAnnotationType().represents(SampleAnnotation.class), is(true));
- assertThat(fieldDescription.getType().asErasure().represents(List.class), is(true));
- assertThat(fieldDescription.getType().getSort(), is(TypeDefinition.Sort.PARAMETERIZED));
- assertThat(fieldDescription.getType().getDeclaredAnnotations().size(), is(1));
- assertThat(fieldDescription.getType().getDeclaredAnnotations().getOnly().getAnnotationType().represents(typeAnnotation), is(true));
- assertThat(fieldDescription.getType().getDeclaredAnnotations().getOnly().prepare(typeAnnotation).getValue(value).resolve(), is((Object) 42));
- assertThat(fieldDescription.getType().getTypeArguments().size(), is(1));
- assertThat(fieldDescription.getType().getTypeArguments().getOnly().getSort(), is(TypeDefinition.Sort.NON_GENERIC));
- assertThat(fieldDescription.getType().getTypeArguments().getOnly().asErasure().represents(String.class), is(true));
- assertThat(fieldDescription.getType().getTypeArguments().getOnly().getDeclaredAnnotations().size(), is(1));
- assertThat(fieldDescription.getType().getTypeArguments().getOnly().getDeclaredAnnotations().getOnly().getAnnotationType().represents(typeAnnotation), is(true));
- assertThat(fieldDescription.getType().getTypeArguments().getOnly().getDeclaredAnnotations().getOnly().prepare(typeAnnotation).getValue(value).resolve(), is((Object) 84));
- }
-
- @Test
- @JavaVersionRule.Enforce(14)
- @Ignore("javac does not currently add type annotation meta data correctly")
- public void testRecordComponentsAccessor() throws Exception {
- Class<?> sampleRecord = Class.forName("net.bytebuddy.test.precompiled.SampleRecord");
- @SuppressWarnings("unchecked")
- Class<? extends Annotation> typeAnnotation = (Class<? extends Annotation>) Class.forName("net.bytebuddy.test.precompiled.TypeAnnotation");
- MethodDescription.InDefinedShape value = new MethodDescription.ForLoadedMethod(typeAnnotation.getMethod("value"));
- MethodDescription methodDescription = describe(sampleRecord).getDeclaredMethods().filter(named(FOO)).getOnly();
- assertThat(methodDescription.getDeclaredAnnotations().size(), is(1));
- assertThat(methodDescription.getDeclaredAnnotations().getOnly().getAnnotationType().represents(SampleAnnotation.class), is(true));
- assertThat(methodDescription.getReturnType().asErasure().represents(List.class), is(true));
- assertThat(methodDescription.getReturnType().getSort(), is(TypeDefinition.Sort.PARAMETERIZED));
- assertThat(methodDescription.getReturnType().getDeclaredAnnotations().size(), is(1));
- assertThat(methodDescription.getReturnType().getDeclaredAnnotations().getOnly().getAnnotationType().represents(typeAnnotation), is(true));
- assertThat(methodDescription.getReturnType().getDeclaredAnnotations().getOnly().prepare(typeAnnotation).getValue(value).resolve(), is((Object) 42));
- assertThat(methodDescription.getReturnType().getTypeArguments().size(), is(1));
- assertThat(methodDescription.getReturnType().getTypeArguments().getOnly().getSort(), is(TypeDefinition.Sort.NON_GENERIC));
- assertThat(methodDescription.getReturnType().getTypeArguments().getOnly().asErasure().represents(String.class), is(true));
- assertThat(methodDescription.getReturnType().getTypeArguments().getOnly().getDeclaredAnnotations().size(), is(1));
- assertThat(methodDescription.getReturnType().getTypeArguments().getOnly().getDeclaredAnnotations().getOnly().getAnnotationType().represents(typeAnnotation), is(true));
- assertThat(methodDescription.getReturnType().getTypeArguments().getOnly().getDeclaredAnnotations().getOnly().prepare(typeAnnotation).getValue(value).resolve(), is((Object) 84));
- }
-
- @Test
- @JavaVersionRule.Enforce(14)
- @Ignore("javac does not currently add type annotation meta data correctly")
- public void testRecordComponentsConstructorParameter() throws Exception {
- Class<?> sampleRecord = Class.forName("net.bytebuddy.test.precompiled.SampleRecord");
- @SuppressWarnings("unchecked")
- Class<? extends Annotation> typeAnnotation = (Class<? extends Annotation>) Class.forName("net.bytebuddy.test.precompiled.TypeAnnotation");
- MethodDescription.InDefinedShape value = new MethodDescription.ForLoadedMethod(typeAnnotation.getMethod("value"));
- ParameterDescription parameterDescription = describe(sampleRecord).getDeclaredMethods().filter(isConstructor()).getOnly().getParameters().getOnly();
- assertThat(parameterDescription.getDeclaredAnnotations().size(), is(1));
- assertThat(parameterDescription.getDeclaredAnnotations().getOnly().getAnnotationType().represents(SampleAnnotation.class), is(true));
- assertThat(parameterDescription.getType().asErasure().represents(List.class), is(true));
- assertThat(parameterDescription.getType().getSort(), is(TypeDefinition.Sort.PARAMETERIZED));
- assertThat(parameterDescription.getType().getDeclaredAnnotations().size(), is(1));
- assertThat(parameterDescription.getType().getDeclaredAnnotations().getOnly().getAnnotationType().represents(typeAnnotation), is(true));
- assertThat(parameterDescription.getType().getDeclaredAnnotations().getOnly().prepare(typeAnnotation).getValue(value).resolve(), is((Object) 42));
- assertThat(parameterDescription.getType().getTypeArguments().size(), is(1));
- assertThat(parameterDescription.getType().getTypeArguments().getOnly().getSort(), is(TypeDefinition.Sort.NON_GENERIC));
- assertThat(parameterDescription.getType().getTypeArguments().getOnly().asErasure().represents(String.class), is(true));
- assertThat(parameterDescription.getType().getTypeArguments().getOnly().getDeclaredAnnotations().size(), is(1));
- assertThat(parameterDescription.getType().getTypeArguments().getOnly().getDeclaredAnnotations().getOnly().getAnnotationType().represents(typeAnnotation), is(true));
- assertThat(parameterDescription.getType().getTypeArguments().getOnly().getDeclaredAnnotations().getOnly().prepare(typeAnnotation).getValue(value).resolve(), is((Object) 84));
- }
-
private Class<?> inMethodClass() {
class InMethod {
/* empty */
--
2.26.2
2.29.2

View File

@ -1,5 +1,5 @@
Name: byte-buddy
Version: 1.10.16
Version: 1.10.20
Release: 1%{?dist}
Summary: Runtime code generation for the Java virtual machine
License: ASL 2.0
@ -146,6 +146,9 @@ sed -i -e '/SuppressFBWarnings/d' $(grep -lr SuppressFBWarnings)
%license LICENSE NOTICE
%changelog
* Thu Feb 04 2021 Marian Koncek <mkoncek@redhat.com> - 1.10.20-1
- Update to upstream version 1.10.20
* Tue Sep 29 2020 Marian Koncek <mkoncek@redhat.com> - 1.10.16-1
- Update to upstram version 1.10.16

View File

@ -1 +1 @@
SHA512 (byte-buddy-1.10.16.tar.gz) = 45536700ccf7f38edfbd94cd02deb73539f8362718424539a6821418d0040e7716b6d79f42a6873965a6bcb18248d4e253a0312f260c099e7c5739539b40ae81
SHA512 (byte-buddy-1.10.20.tar.gz) = a1e19f8da58a4320896b4e322048e19c66d23e9c172e0a701f3293f580557b0c274dbe465a89a208af7173a2ca21077349ebfbbb4db8d928c3a12aa44c41bc0e