re PR libgcj/20958 (Compile Errors In two files in gnu.gcj)
authorAaron Luchko <aluchko@redhat.com>
Tue, 12 Apr 2005 23:22:14 +0000 (23:22 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Tue, 12 Apr 2005 23:22:14 +0000 (00:22 +0100)
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.

From-SVN: r98053

libjava/ChangeLog
libjava/gnu/gcj/runtime/PersistentByteMap.java
libjava/gnu/gcj/tools/gcj_dbtool/Main.java

index 03aa02c7105e7aa4c47b2d6b69764e6d86a48bf2..0ae3d5ec5b828043ee9a6daa1e4519328bb34936 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2005-04-12  Aaron Luchko  <aluchko@redhat.com>
 
        PR libgcj/20975
index a20f5b8ab2bec3a3c8bf48cd8f320501e2d9778d..a2b91da84fa4560387bd4dcabf3cd50b7bedf690 100644 (file)
@@ -452,7 +452,7 @@ public class PersistentByteMap
 
   // 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();
index 58e9720f5fb0af160d8198d20f4f1a21262bab6a..f16a86a3698de0a56202d1be233f6b060b774e59 100644 (file)
@@ -375,7 +375,7 @@ public class Main
        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 @@ public class Main
            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());