[kaffe] CVS kaffe (dalibor): Fixes to get JBoss 3.2.2 to load
Kaffe CVS
cvs-commits at kaffe.org
Fri Oct 24 09:45:02 PDT 2003
PatchSet 4122
Date: 2003/10/24 16:42:09
Author: dalibor
Branch: HEAD
Tag: (none)
Log:
Fixes to get JBoss 3.2.2 to load
With the checked in fixes, JBoss 3.2.2 loads on i386-linux. Trying to run
its management console by connecting to http://localhost:8080/jmx-console/index.jsp
doesn't work though.
Members:
ChangeLog:1.1714->1.1715
libraries/javalib/java/util/zip/ZipInputStream.java:1.16->1.17
libraries/javalib/javax/naming/InitialContext.java:1.4->1.5
libraries/javalib/javax/naming/spi/NamingManager.java:1.3->1.4
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1714 kaffe/ChangeLog:1.1715
--- kaffe/ChangeLog:1.1714 Fri Oct 24 13:53:59 2003
+++ kaffe/ChangeLog Fri Oct 24 16:42:09 2003
@@ -1,5 +1,29 @@
2003-10-24 Dalibor Topic <robilad at kaffe.org>
+ * libraries/javalib/java/util/zip/ZipInputStream.java:
+ (getNextEntry) don't throw an IOException if ZipInputStream
+ is invalid. Instead return null, like JDK 1.4.2 does.
+
+ Reported by: Markus Maier <mle at neze.de>
+
+ * javax/naming/InitialContext.java (lookup(Name)): When a
+ CannotProceedException is thrown use the ContinuationContext.
+ (lookup(String)): Likewise.
+ (close): Clear myProps and defaultInitCtx.
+
+ Patch by: Mark Wielaard <mark at klomp.org>,
+ Julian Dolby <dolby at us.ibm.com>
+
+ Taken from GNU Classpath web patch submission form.
+
+ * libraries/javalib/javax/naming/spi/NamingManager.java:
+ (getContinuationContext) Improved readability. Fixed stack
+ trace for re-thrown exception.
+
+ Patch by: Julian Dolby <dolby at us.ibm.com>
+
+2003-10-24 Dalibor Topic <robilad at kaffe.org>
+
* libraries/javalib/gnu/java/beans/IntrospectionIncubator.java:
(addMethod) Add public static methods.
Index: kaffe/libraries/javalib/java/util/zip/ZipInputStream.java
diff -u kaffe/libraries/javalib/java/util/zip/ZipInputStream.java:1.16 kaffe/libraries/javalib/java/util/zip/ZipInputStream.java:1.17
--- kaffe/libraries/javalib/java/util/zip/ZipInputStream.java:1.16 Mon Sep 29 23:50:26 2003
+++ kaffe/libraries/javalib/java/util/zip/ZipInputStream.java Fri Oct 24 16:42:11 2003
@@ -48,7 +48,7 @@
case (int)LOCSIG: // another entry
break;
default: // unexpected
- throw new IOException("Bogus signature: 0x" + Integer.toHexString(sig));
+ return null;
}
// Read remainder of local header
Index: kaffe/libraries/javalib/javax/naming/InitialContext.java
diff -u kaffe/libraries/javalib/javax/naming/InitialContext.java:1.4 kaffe/libraries/javalib/javax/naming/InitialContext.java:1.5
--- kaffe/libraries/javalib/javax/naming/InitialContext.java:1.4 Wed Oct 22 10:35:01 2003
+++ kaffe/libraries/javalib/javax/naming/InitialContext.java Fri Oct 24 16:42:11 2003
@@ -240,12 +240,28 @@
public Object lookup (Name name) throws NamingException
{
- return getURLOrDefaultInitCtx (name).lookup (name);
+ try
+ {
+ return getURLOrDefaultInitCtx (name).lookup (name);
+ }
+ catch (CannotProceedException cpe)
+ {
+ Context ctx = NamingManager.getContinuationContext (cpe);
+ return ctx.lookup (cpe.getRemainingName());
+ }
}
public Object lookup (String name) throws NamingException
{
- return getURLOrDefaultInitCtx (name).lookup (name);
+ try
+ {
+ return getURLOrDefaultInitCtx (name).lookup (name);
+ }
+ catch (CannotProceedException cpe)
+ {
+ Context ctx = NamingManager.getContinuationContext (cpe);
+ return ctx.lookup (cpe.getRemainingName());
+ }
}
public void rebind (Name name, Object obj) throws NamingException
@@ -367,7 +383,8 @@
public void close () throws NamingException
{
- throw new OperationNotSupportedException ();
+ myProps = null;
+ defaultInitCtx = null;
}
public String getNameInNamespace () throws NamingException
Index: kaffe/libraries/javalib/javax/naming/spi/NamingManager.java
diff -u kaffe/libraries/javalib/javax/naming/spi/NamingManager.java:1.3 kaffe/libraries/javalib/javax/naming/spi/NamingManager.java:1.4
--- kaffe/libraries/javalib/javax/naming/spi/NamingManager.java:1.3 Sat Sep 13 21:30:14 2003
+++ kaffe/libraries/javalib/javax/naming/spi/NamingManager.java Fri Oct 24 16:42:12 2003
@@ -314,18 +314,20 @@
icfb = builder;
}
- public static Context getContinuationContext (CannotProceedException cpe)
+ public static Context getContinuationContext (CannotProceedException ex)
throws NamingException
{
- Hashtable env = cpe.getEnvironment ();
+ Hashtable env = ex.getEnvironment ();
if (env != null)
- env.put (CPE, cpe);
+ env.put (CPE, ex);
// It is really unclear to me if this is right.
try
{
- Object obj = getObjectInstance (null, cpe.getAltName (),
- cpe.getAltNameCtx (), env);
+ Object obj = getObjectInstance (ex.getResolvedObj(),
+ ex.getAltName (),
+ ex.getAltNameCtx (),
+ env);
if (obj != null)
return (Context) obj;
}
@@ -333,7 +335,10 @@
{
}
- throw cpe;
+ // fix stack trace for re-thrown exception (message confusing otherwise)
+ ex.fillInStackTrace();
+
+ throw ex;
}
public static Object getStateToBind (Object obj, Name name,
More information about the kaffe
mailing list