classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch


From: Stuart Ballard
Subject: Re: Patch
Date: Tue, 22 Jul 2003 11:29:01 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030527 Debian/1.3.1-2

Tom Tromey wrote:
"Chris" == Chris Dailey <address@hidden> writes:


Chris> The following patch is an attempt to fix this difference:
Chris> http://japi.sab39.org/htmlout/h-jdk11-classpath.html#err_bad_java_lang
Chris> * field java.lang.reflect.Member.DECLARED: constant [1] in jdk11,
Chris>   but not constant in classpath

I think this must be a japi bug.  A field in an interface is
implicitly public, static, and final; see Java Language Specification,
2nd Ed, section 9.3.

I think you're right.

Could whoever runs the Classpath Japize process try the attached patch to Japize and see if it fixes things in the next overnight run? If so I'll try to put together a release in the next few days incorporating this change.

Thanks,
Stuart.

--
Stuart Ballard, Senior Web Developer
FASTNET - Web Solutions
(215) 283-2300, ext. 126
www.fast.net
Index: src/net/wuffies/japi/JodeField.java
===================================================================
RCS file: /usr/local/cvsroot/japi/src/net/wuffies/japi/JodeField.java,v
retrieving revision 1.7
diff -u -r1.7 JodeField.java
--- src/net/wuffies/japi/JodeField.java 3 Dec 2002 17:11:44 -0000       1.7
+++ src/net/wuffies/japi/JodeField.java 22 Jul 2003 15:21:05 -0000
@@ -31,9 +31,11 @@
   JodeField(FieldInfo f, JodeClass jc) {
     modifiers = f.getModifiers();
     constValue = f.getConstant();
-    if (!Modifier.isStatic(modifiers) || !Modifier.isFinal(modifiers) ||
-        (!Modifier.isPublic(modifiers) && !Modifier.isProtected(modifiers))) {
-      constValue = null;
+    if (!jc.isInterface()) {
+      if (!Modifier.isStatic(modifiers) || !Modifier.isFinal(modifiers) ||
+          (!Modifier.isPublic(modifiers) && !Modifier.isProtected(modifiers))) 
{
+        constValue = null;
+      }
     }
     name = f.getName();
     type = f.getType();

reply via email to

[Prev in Thread] Current Thread [Next in Thread]