Commit 5751cebc authored by Eric Bruneton's avatar Eric Bruneton

Merge branch '314486-non-regression-test' into 'master'

Add a non-regression test for issue #314486.

See merge request !124
parents cac15414 fcac0387
Pipeline #771 canceled with stage
......@@ -72,6 +72,12 @@ public class SerialVersionUIDAdderTest extends AsmTest {
assertEquals(4737241769335595888L, UID);
}
@Test
public void testAnonymousInnerClass() throws Throwable {
long UID = computeSerialVersionUID(SerialVersionAnonymousInnerClass.class.getName() + "$1");
assertEquals(-1842070664294792585L, UID);
}
@Test
public void testInterface() throws Throwable {
long UID = computeSerialVersionUID(SerialVersionInterface.class.getName());
......@@ -115,6 +121,12 @@ class SerialVersionClass implements Serializable {
}
}
class SerialVersionAnonymousInnerClass implements Serializable {
public static final SerialVersionAnonymousInnerClass anonymousInnerClass =
new SerialVersionAnonymousInnerClass() {};
}
interface SerialVersionInterface extends Serializable {
void aMethod(Object[] args);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment