Skip to content

Commit 1111a18

Browse files
committed
[release] Release new version.
1 parent 6698c45 commit 1111a18

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

byte-buddy-dep/src/test/java/net/bytebuddy/description/annotation/AbstractAnnotationDescriptionTest.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ public void testHashCode() throws Exception {
265265

266266
@Test
267267
@SuppressWarnings("unchecked")
268-
@JavaVersionRule.Enforce(17)
269268
public void testEquals() throws Exception {
270269
AnnotationDescription identical = describe(first);
271270
assertThat(identical, is(identical));
@@ -301,11 +300,14 @@ public Object answer(InvocationOnMock invocation) throws Throwable {
301300
AnnotationValue<?, ?> annotationValue = mock(AnnotationValue.class);
302301
when(annotationValue.resolve()).thenReturn(null);
303302
when(equalFirstNameOnly.getValue(Mockito.any(MethodDescription.InDefinedShape.class))).thenReturn((AnnotationValue) annotationValue);
304-
assertThat(describe(first), not(equalFirstNameOnly));
305-
assertThat(describe(first), not(equalSecond));
306-
assertThat(describe(first), not(new Object()));
307-
assertThat(describe(first), not(equalTo(null)));
308-
assertThat(describe(empty), is(describe(empty)));
303+
// Very commonly buggy in intermediate releases.
304+
if (ClassFileVersion.ofThisVm().isAtLeast(ClassFileVersion.JAVA_V17) || ClassFileVersion.ofThisVm().equals(ClassFileVersion.JAVA_V8)) {
305+
assertThat(describe(first), not(equalFirstNameOnly));
306+
assertThat(describe(first), not(equalSecond));
307+
assertThat(describe(first), not(new Object()));
308+
assertThat(describe(first), not(equalTo(null)));
309+
assertThat(describe(empty), is(describe(empty)));
310+
}
309311
}
310312

311313
@Test(expected = IllegalArgumentException.class)

0 commit comments

Comments
 (0)