]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libgcj/35950 (jar produces files ecj won't handle)
authorTom Tromey <tromey@redhat.com>
Thu, 17 Apr 2008 17:16:09 +0000 (17:16 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Thu, 17 Apr 2008 17:16:09 +0000 (17:16 +0000)
PR libgcj/35950:
* tools/gnu/classpath/tools/jar/Entry.java: New version from
Classpath.
* tools/classes/gnu/classpath/tools/jar/Entry.class: Update.

From-SVN: r134402

libjava/classpath/ChangeLog.gcj
libjava/classpath/tools/classes/gnu/classpath/tools/jar/Entry.class
libjava/classpath/tools/gnu/classpath/tools/jar/Entry.java

index ffc357133b676798211528f5a2cb92bdbf8ab152..093b2fbe0e47f32cf7b4656a68f7a24ffcfae2ce 100644 (file)
@@ -1,3 +1,10 @@
+2008-04-17  Tom Tromey  <tromey@redhat.com>
+
+       PR libgcj/35950:
+       * tools/gnu/classpath/tools/jar/Entry.java: New version from
+       Classpath.
+       * tools/classes/gnu/classpath/tools/jar/Entry.class: Update.
+
 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
 
        * gnu/java/rmi/registry/RegistryImpl.java (version): Update
index d030d92ddd800119199eb9434c6d6eb4b03534c1..b517df7439dcb49b68354ce5b327d10f063fc7cc 100644 (file)
Binary files a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Entry.class and b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Entry.class differ
index aa8679aab55ca156396c686b8d174b6bdef763f6..b9108798a16fb25b257f8f055aaca7a22841d555 100644 (file)
@@ -1,5 +1,5 @@
 /* Entry.java - represent a single file to write to a jar
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
  This file is part of GNU Classpath.
 
@@ -49,12 +49,22 @@ public class Entry
   public Entry(File file, String name)
   {
     this.file = file;
-    this.name = name;
+
+    /* Removes any './' prefixes automatically. Those caused trouble
+     * in (boot) classpath use-cases. See #32516.
+     */
+    int start = 0;
+    while (name.length() > start + 2
+           && name.codePointAt(start) == '.'
+           && name.codePointAt(start + 1) == File.separatorChar)
+      start += 2;
+
+    this.name = name.substring(start);
   }
 
   public Entry(File file)
   {
-    this.file = file;
-    this.name = file.toString();
+    this(file, file.toString());
   }
+
 }