This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: [gcj trunk / gnu-classpath] String.format(...) undefined
- From: Hanno Meyer-Thurow <h dot mth at web dot de>
- To: Andrew Haley <aph at redhat dot com>
- Cc: tromey at redhat dot com, Mark Wielaard <mark at klomp dot org>, java at gcc dot gnu dot org
- Date: Sat, 3 Mar 2007 17:28:02 +0100
- Subject: Re: [gcj trunk / gnu-classpath] String.format(...) undefined
- References: <20070217141309.0ebcb6cf.h.mth@web.de> <17879.1831.27268.259810@zebedee.pink> <20070217145415.e4063dc7.h.mth@web.de> <17879.2696.599992.481580@zebedee.pink> <1171746649.3534.7.camel@dijkstra.wildebeest.org> <1171747684.3534.10.camel@dijkstra.wildebeest.org> <1171755744.3534.16.camel@dijkstra.wildebeest.org> <20070218134539.0e53b7b7.h.mth@web.de> <17880.19619.5958.227054@zebedee.pink> <20070218144033.4e8778d1.h.mth@web.de> <1171818770.5608.7.camel@hermans.wildebeest.org> <20070219175420.74ef4356.h.mth@web.de> <20070220132847.b90bf97f.h.mth@web.de> <17883.34584.780222.558912@localhost.localdomain> <20070221130422.be7f64bf.h.mth@web.de> <m3wt1zqpkt.fsf@localhost.localdomain> <20070303124856.36ff69dd.h.mth@web.de> <17897.33354.880357.603782@zebedee.pink>
On Sat, 3 Mar 2007 14:12:26 +0000
Andrew Haley <aph@redhat.com> wrote:
> I checked in a patch for this yestderday. Let me know if it works for
> you.
Thank you! It fixed most types but long[] at runtime:
$ /usr/lib/gcj/bin/gij Test
Exception in thread "main" java.lang.InternalError: expected pool constant 6 but got 5
at java.lang.Class.getDeclaredAnnotations(libgcj.so.9)
at java.lang.Class.getAnnotations(libgcj.so.9)
at java.lang.Class.getAnnotation(libgcj.so.9)
at Test.main(Test.java:69)
I see another issue with float variables.
I'll open another thread for that.
Hanno
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Test.A1({4.7, 7.5, 2.0})
@Test.A2({4674, 73657, 24585})
public class Test {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface A1 {
public float[] value();
}
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface A2 {
public long[] value();
}
public static void main(String[] args) {
A1 a1 = (Test.class).getAnnotation(A1.class);
for ( float c : a1.value() )
System.out.println(c);
A2 a2 = (Test.class).getAnnotation(A2.class);
for ( long c : a2.value() )
System.out.println(c);
}
}