gcj registration time error with gcc 4.1 workaround

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

gcj registration time error with gcc 4.1 workaround

Caolán McNamara
I got a dread "no mapping from java to c++" error on registering java
components with gcj. It seems to be this tiny little regression in gnu
classpath.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25389


A silly little probable workaround for jurt shown inline here.


Index: com/sun/star/lib/util/UrlToFileMapper.java
===================================================================
RCS file: /cvs/udk/jurt/com/sun/star/lib/util/UrlToFileMapper.java,v
retrieving revision 1.3
diff -u -p -u -r1.3 UrlToFileMapper.java
--- openoffice.org.orig/jurt/com/sun/star/lib/util/UrlToFileMapper.java
7 Sep 2005 19:05:37 -0000       1.3
+++ openoffice.org/jurt/com/sun/star/lib/util/UrlToFileMapper.java
13 Dec 2005 11:34:14 -0000
@@ -95,6 +95,14 @@ public class UrlToFileMapper {
             // the URI constructor might throw
java.net.URISyntaxException (in
             // Java 1.5, URL.toURI might be used instead).
             String encodedUrl = encode(url.toString());
+
+
+            String mytest = encodedUrl.substring(0, 6);
+            if (mytest.equals("file:.")) {
+                String ans = encodedUrl.substring(5,
encodedUrl.length());
+                return new File(ans);
+            }
+
             try {
                 Object uri = uriConstructor.newInstance(
                     new Object[] { encodedUrl });


C.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]