simple test for Issue104 - inconclusive

This commit is contained in:
Andy Clement
2015-07-12 11:25:57 -07:00
parent e131cf6c70
commit f887a6a0bf
2 changed files with 39 additions and 0 deletions

View File

@@ -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";

View 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();
}
}