This is the mail archive of the java-patches@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]

Patch: FYI: Fix PR 20975 and 20958


I'm checking these patches from Aaron Luchko to HEAD. The first one fixes some code errors that are not correctly diagnosed by GCJ (I've filed PRs for these issues). The second one removes the obsolete and unused scripts/TexinfoDoclet.java and associated Makefile entries. Together these make libgcj development in eclipse a little more friendly.

Bryce


2005-04-12 Aaron Luchko <aluchko@redhat.com>


   PR libgcj/20958
   * gnu/gcj/runtime/PersistentByteMap.java (close): Throw IOException.
   * gnu/gcj/tools/gcj_dbtool/Main.java (addJar): Make 'length' an int.

--- gcc/libjava/gnu/gcj/tools/gcj_dbtool/Main.java	2005/04/06 15:06:04	1.10
+++ gcc/libjava/gnu/gcj/tools/gcj_dbtool/Main.java	2005/04/12 23:22:13	1.11
@@ -375,7 +375,7 @@
	if (classfile.getName().endsWith(".class"))
	  {
	    InputStream str = jar.getInputStream(classfile);
-	    long length = classfile.getSize();
+	    int length = (int) classfile.getSize();
	    if (length == -1)
	      throw new EOFException();

@@ -383,7 +383,7 @@
	    int pos = 0;
	    while (length - pos > 0)
	      {
-		int len = str.read(data, pos, (int)(length - pos));
+		int len = str.read(data, pos, length - pos);
		if (len == -1)
		  throw new EOFException("Not enough data reading from: "


+ classfile.getName());



--- gcc/libjava/gnu/gcj/runtime/PersistentByteMap.java 2005/02/16 17:32:59 1.4 +++ gcc/libjava/gnu/gcj/runtime/PersistentByteMap.java 2005/04/12 23:22:14 1.5 @@ -452,7 +452,7 @@

  // Close the map.  Once this has been done, the map can no longer be
  // used.
-  public void close()
+  public void close() throws IOException
  {
    force();
    fc.close();



2005-04-12 Aaron Luchko <aluchko@redhat.com>

   PR libgcj/20975
   * scripts/TexinfoDoclet.java: Removed.
   * Makefile.am (texinfo): Removed.
   * Makefile.in: Regenerated.



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