simple test for Issue104 - inconclusive
This commit is contained in:
@@ -47,6 +47,27 @@ public class Java8Tests extends SpringLoadedTests {
|
||||
assertEquals(typeRegistry, rtype.getTypeRegistry());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void issue104() throws Exception {
|
||||
String t = "bugs.Issue104";
|
||||
TypeRegistry typeRegistry = getTypeRegistry(t);
|
||||
byte[] sc = loadBytesForClass(t);
|
||||
ReloadableType rtype = typeRegistry.addType(t, sc);
|
||||
|
||||
Class<?> clazz = rtype.getClazz();
|
||||
@SuppressWarnings("unused")
|
||||
Result r = runUnguarded(clazz, "run");
|
||||
|
||||
r = runUnguarded(clazz, "run");
|
||||
|
||||
rtype.loadNewVersion("002", rtype.bytesInitial);
|
||||
|
||||
r = runUnguarded(clazz, "run");
|
||||
|
||||
// TODO should assert something but the issue is that the JVM crashes...
|
||||
}
|
||||
|
||||
@Test
|
||||
public void callBasicType() throws Exception {
|
||||
String t = "basic.FirstClass";
|
||||
|
||||
18
testdata-java8/src/main/java/bugs/Issue104.java
Normal file
18
testdata-java8/src/main/java/bugs/Issue104.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package bugs;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZonedDateTime;
|
||||
|
||||
public class Issue104 {
|
||||
public static void main(String[] args) {
|
||||
System.out.println(run());
|
||||
}
|
||||
|
||||
public static String run() {
|
||||
LocalDateTime time = LocalDateTime.now();
|
||||
ZonedDateTime zdt = time.atZone(ZoneId.systemDefault());
|
||||
return zdt.toString();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user