This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
new test
- To: Java Patch List <java-patches at sourceware dot cygnus dot com>
- Subject: new test
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 07 Jul 2000 14:58:12 -0600
- Reply-To: tromey at cygnus dot com
I'm checking this in.
If you compile this test with javac, and then compile the resulting
.class file with gcj, the executable will crash.
2000-07-07 Tom Tromey <tromey@cygnus.com>
* libjava.lang/stringconst2.out: New file.
* libjava.lang/stringconst2.java: New file.
Tom
Index: libjava.lang/stringconst2.java
===================================================================
RCS file: stringconst2.java
diff -N stringconst2.java
--- /dev/null Tue May 5 13:32:27 1998
+++ stringconst2.java Fri Jul 7 13:51:18 2000
@@ -0,0 +1,21 @@
+// Test to make sure a string constant is correctly initialized.
+
+import java.lang.reflect.*;
+
+public class stringconst2
+{
+ public static final String q = "zardoz";
+
+ public static void main (String[] args)
+ {
+ try
+ {
+ Class k = Class.forName ("stringconst2");
+ Field f = k.getField ("q");
+ System.out.println (f.get (null));
+ }
+ catch (Throwable _)
+ {
+ }
+ }
+}
Index: libjava.lang/stringconst2.out
===================================================================
RCS file: stringconst2.out
diff -N stringconst2.out
--- /dev/null Tue May 5 13:32:27 1998
+++ stringconst2.out Fri Jul 7 13:51:18 2000
@@ -0,0 +1 @@
+zardoz