This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Illegal Package-Private Accesses Yet Again!


Hi,

    Here's the promised follow up patch to my previous mail that
temporarily avoids illegal package-private accesses in libgcj.

Please, please, *PLEASE* let us apply this (or something 
similar)!

Procrastination merely lets the silly bug remain and claim more
unwitting victims.

Ranjit.

Index: ChangeLog
from  Ranjit Mathew  <rmathew@hotmail.com>

	* gnu/gcj/runtime/StackTrace.java (stackTraceAddrs): Temporarily
	make public to avoid illegal package-private access elsewhere.
	* gnu/java/nio/channels/FileChannelImpl (READ, WRITE, APPEND,
	EXCL, SYNC, DSYNC): Likewise.
	(available): Likewise.
	* java/lang/StackTraceElement (constructor): Likewise.

Index: gnu/gcj/runtime/StackTrace.java
===================================================================
--- gnu/gcj/runtime/StackTrace.java	2004-03-29 22:38:04.000000000 +0530
+++ gnu/gcj/runtime/StackTrace.java	2004-03-29 22:41:26.000000000 +0530
@@ -152,5 +152,7 @@ public final class StackTrace
   }
 
-  gnu.gcj.RawData stackTraceAddrs()
+  // XXX Temporarily avoid incorrect package-private access
+  // from java.lang.VMThrowable.
+  public gnu.gcj.RawData stackTraceAddrs()
   {
     return addrs;
Index: gnu/java/nio/channels/FileChannelImpl.java
===================================================================
--- gnu/java/nio/channels/FileChannelImpl.java	2004-03-29 22:46:38.000000000 +0530
+++ gnu/java/nio/channels/FileChannelImpl.java	2004-03-29 23:41:33.000000000 +0530
@@ -63,12 +63,12 @@ public class FileChannelImpl extends Fil
 
   // These are mode values for open().
-  static final int READ   = 1;
-  static final int WRITE  = 2;
-  static final int APPEND = 4;
+  public static final int READ   = 1;
+  public static final int WRITE  = 2;
+  public static final int APPEND = 4;
 
   // EXCL is used only when making a temp file.
-  static final int EXCL   = 8;
-  static final int SYNC   = 16;
-  static final int DSYNC  = 32;
+  public static final int EXCL   = 8;
+  public static final int SYNC   = 16;
+  public static final int DSYNC  = 32;
 
   /**
@@ -111,6 +111,9 @@ public class FileChannelImpl extends Fil
     this.mode = mode;
   }
+  
+  // XXX Temporarily avoid illegal package-private access from
+  // java.io.FileInputStream.available()
+  public native int available () throws IOException;
 
-  native int available () throws IOException;
   private native long implPosition ();
   private native void seek (long newPosition);
Index: java/lang/StackTraceElement.java
===================================================================
--- java/lang/StackTraceElement.java	2004-03-29 22:54:22.000000000 +0530
+++ java/lang/StackTraceElement.java	2004-03-29 22:55:36.000000000 +0530
@@ -102,6 +102,8 @@ public class StackTraceElement implement
    * @param isNative true if native, false otherwise
    */
-  StackTraceElement(String fileName, int lineNumber, String className,
-                    String methodName, boolean isNative)
+  // XXX FIXME Temporarily avoid illegal package-private access from
+  // gnu.gcj.runtime.NameFinder
+  public StackTraceElement(String fileName, int lineNumber, String className,
+                           String methodName, boolean isNative)
   {
     this.fileName = fileName;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]