[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: reindented URLClassLoader
Kaffe CVS
cvs-commits at kaffe.org
Mon Oct 4 02:41:55 PDT 2004
PatchSet 5240
Date: 2004/10/04 09:37:43
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: reindented URLClassLoader
2004-10-04 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/java/net/URLClassLoader.java:
Resynced with GNU Classpath.
2004-09-28 Michael Koch <konqueror at gmx.de>
* java/net/URLClassLoader.java:
Reformated.
(addURLImpl): Partly merged with libgcj's version.
Members:
ChangeLog:1.2794->1.2795
libraries/javalib/java/net/URLClassLoader.java:1.16->1.17
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2794 kaffe/ChangeLog:1.2795
--- kaffe/ChangeLog:1.2794 Mon Oct 4 09:01:24 2004
+++ kaffe/ChangeLog Mon Oct 4 09:37:43 2004
@@ -1,3 +1,14 @@
+2004-10-04 Dalibor Topic <robilad at kaffe.org>
+
+ * libraries/javalib/java/net/URLClassLoader.java:
+ Resynced with GNU Classpath.
+
+ 2004-09-28 Michael Koch <konqueror at gmx.de>
+
+ * java/net/URLClassLoader.java:
+ Reformated.
+ (addURLImpl): Partly merged with libgcj's version.
+
2004-10-03 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/java/awt/image/RescaleOp.java:
Index: kaffe/libraries/javalib/java/net/URLClassLoader.java
diff -u kaffe/libraries/javalib/java/net/URLClassLoader.java:1.16 kaffe/libraries/javalib/java/net/URLClassLoader.java:1.17
--- kaffe/libraries/javalib/java/net/URLClassLoader.java:1.16 Mon May 17 22:25:08 2004
+++ kaffe/libraries/javalib/java/net/URLClassLoader.java Mon Oct 4 09:37:47 2004
@@ -35,6 +35,7 @@
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
+
package java.net;
import java.io.ByteArrayOutputStream;
@@ -59,7 +60,6 @@
import java.util.jar.JarFile;
import java.util.jar.Manifest;
-
/**
* A secure class loader that can load classes and resources from
* multiple locations. Given an array of <code>URL</code>s this class
@@ -656,11 +656,12 @@
if (loader == null)
{
String file = newUrl.getFile();
+ String protocol = newUrl.getProtocol();
// Check that it is not a directory
if (! (file.endsWith("/") || file.endsWith(File.separator)))
loader = new JarURLLoader(this, newUrl);
- else if ("file".equals(newUrl.getProtocol()))
+ else if ("file".equals(protocol))
loader = new FileURLLoader(this, newUrl);
else
loader = new RemoteURLLoader(this, newUrl);
@@ -811,14 +812,18 @@
// And finally construct the class!
SecurityManager sm = System.getSecurityManager();
if (sm != null && securityContext != null)
- return (Class) AccessController.doPrivileged(new PrivilegedAction()
- {
- public Object run()
+ {
+ return (Class)AccessController.doPrivileged
+ (new PrivilegedAction()
{
- return defineClass(className, classData, 0,
- classData.length, source);
- }
- }, securityContext);
+ public Object run()
+ {
+ return defineClass(className, classData,
+ 0, classData.length,
+ source);
+ }
+ }, securityContext);
+ }
else
return defineClass(className, classData, 0, classData.length, source);
}
@@ -955,13 +960,17 @@
// If the file end in / it must be an directory.
if (file.endsWith("/") || file.endsWith(File.separator))
- // Grant permission to read everything in that directory and
- // all subdirectories.
- permissions.add(new FilePermission(file + "-", "read"));
+ {
+ // Grant permission to read everything in that directory and
+ // all subdirectories.
+ permissions.add(new FilePermission(file + "-", "read"));
+ }
else
- // It is a 'normal' file.
- // Grant permission to access that file.
- permissions.add(new FilePermission(file, "read"));
+ {
+ // It is a 'normal' file.
+ // Grant permission to access that file.
+ permissions.add(new FilePermission(file, "read"));
+ }
}
else
{
More information about the kaffe
mailing list