Making JNLP Modules compilable with the new version of Bootstrap module. But it does not work yet.
1.1 --- a/jnlpmodules/src/org/netbeans/modules/jnlpmodules/ClasspathDelegateClassLoader.java Thu Sep 13 08:17:40 2007 +0000
1.2 +++ b/jnlpmodules/src/org/netbeans/modules/jnlpmodules/ClasspathDelegateClassLoader.java Thu Sep 13 09:04:00 2007 +0000
1.3 @@ -52,28 +52,22 @@
1.4 * We do not delegate anything to the parent by code in ProxyClassLoader
1.5 * but we do that ourselves from simpleFindClass.
1.6 */
1.7 + @Override
1.8 protected boolean shouldDelegateResource(String pkg, ClassLoader parent) {
1.9 return false;
1.10 }
1.11
1.12 + @Override
1.13 protected boolean shouldBeCheckedAsParentProxyClassLoader() {
1.14 return false;
1.15 }
1.16
1.17 - protected boolean isSpecialResource(String pkg) {
1.18 - if (mgr != null && mgr.isSpecialResource(pkg)) {
1.19 - return true;
1.20 - }
1.21 - return super.isSpecialResource(pkg);
1.22 - }
1.23 -
1.24 /**
1.25 * Overriden to directly delegate and not to define the classes here.
1.26 */
1.27 - protected Class simpleFindClass(String name, String fileName, String pkgnameSlashes) {
1.28 - if (fileName == null) {
1.29 - fileName = name.replace('.', '/') + ".class";
1.30 - }
1.31 + @Override
1.32 + protected Class doLoadClass(String pkg, String name) {
1.33 + String fileName = name.replace('.', '/') + ".class";
1.34 try {
1.35 for (Enumeration en = delegate.getResources(fileName); en.hasMoreElements(); ) {
1.36 URL url = (URL)en.nextElement();
2.1 --- a/jnlpmodules/src/org/netbeans/modules/jnlpmodules/ClasspathModule.java Thu Sep 13 08:17:40 2007 +0000
2.2 +++ b/jnlpmodules/src/org/netbeans/modules/jnlpmodules/ClasspathModule.java Thu Sep 13 09:04:00 2007 +0000
2.3 @@ -577,13 +577,6 @@
2.4 return null;
2.5 }
2.6
2.7 - protected boolean isSpecialResource(String pkg) {
2.8 - if (getManager().isSpecialResource(pkg)) {
2.9 - return true;
2.10 - }
2.11 - return super.isSpecialResource(pkg);
2.12 - }
2.13 -
2.14 protected boolean shouldDelegateResource(String pkg, ClassLoader parent) {
2.15 if (!super.shouldDelegateResource(pkg, parent)) {
2.16 return false;
3.1 --- a/jnlpmodules/src/org/netbeans/modules/jnlpmodules/JNLPModuleFactory.java Thu Sep 13 08:17:40 2007 +0000
3.2 +++ b/jnlpmodules/src/org/netbeans/modules/jnlpmodules/JNLPModuleFactory.java Thu Sep 13 09:04:00 2007 +0000
3.3 @@ -75,13 +75,16 @@
3.4 }
3.5 }
3.6
3.7 + @Override
3.8 public Module create(java.io.File jar, Object history, boolean reloadable, boolean autoload, boolean eager, ModuleManager mgr, Events ev) throws IOException {
3.9 // System.out.println("Factory creating standard " + jar);
3.10 // return new StandardModule(mgr, ev, jar, history, reloadable, autoload, eager);
3.11 throw new IOException("Standard modules not supported " + jar);
3.12 }
3.13
3.14 - public Module createFixed(java.util.jar.Manifest mani, Object history, ClassLoader loader, ModuleManager mgr, Events ev) throws InvalidException {
3.15 + @Override
3.16 + public Module createFixed(Manifest mani, Object history, ClassLoader loader, boolean autoload, boolean eager,
3.17 + ModuleManager mgr, Events ev) throws InvalidException {
3.18 Attributes attr = mani.getMainAttributes();
3.19 String module = attr.getValue("OpenIDE-Module");
3.20 String prefixURL = prefixedModules.get(module);