Community
Participate
Working Groups
n0426 When compiling the org.eclipse.update.core project with Foundation 1.0 class libraries, we get the following compile errors due to use of JDK 1.4 APIs. Also there is use of java.nio, java.net.URI, and java.net.URISyntaxException which are only available in JDK 1.4 and greater. If this use is correct, then the code should protect against the code running when these classes are not available. The method getCause() is undefined for the type CoreException org.eclipse.update.core/src/org/eclipse/update/internal/mirror MirrorSite.java line 249 The method getCause() is undefined for the type CoreException org.eclipse.update.core/src/org/eclipse/update/internal/mirror MirrorSite.java line 249 The method getCause() is undefined for the type CoreException org.eclipse.update.core/src/org/eclipse/update/internal/mirror MirrorSite.java line 296 The method getCause() is undefined for the type CoreException org.eclipse.update.core/src/org/eclipse/update/internal/mirror MirrorSite.java line 296 The method getCause() is undefined for the type Throwable org.eclipse.update.core/src/org/eclipse/update/core Utilities.java line 225 The method getChannel() is undefined for the type FileInputStream org.eclipse.update.core/src/org/eclipse/update/internal/core JarDeltaInstallHandler.java line 94 The method getChannel() is undefined for the type FileOutputStream org.eclipse.update.core/src/org/eclipse/update/internal/core JarDeltaInstallHandler.java line 95 The method getStackTrace() is undefined for the type Throwable org.eclipse.update.core/src/org/eclipse/update/core Utilities.java line 229 The method initCause(Throwable) is undefined for the type CoreException org.eclipse.update.core/src/org/eclipse/update/core Utilities.java line 227 The method split(String) is undefined for the type String org.eclipse.update.core/src/org/eclipse/update/internal/jarprocessor PackStep.java line 94 The method split(String) is undefined for the type String org.eclipse.update.core/src/org/eclipse/update/internal/jarprocessor Utils.java line 154 The method split(String) is undefined for the type String org.eclipse.update.core/src/org/eclipse/update/internal/jarprocessor Utils.java line 169
Created attachment 40204 [details] fix jarprocessor compile problems This patch fixes the 3 compile problems in the jarprocessor package
Released
retro +1. would be good to get someone else...
+1
Created attachment 40391 [details] vm 1.4 Exceptions removed This patch takes out getCause(), initCause(), getStackTrace(), usage from exception handling in MirrorSite and Utilities. This is the last patch this bug needs so please look at it soon.
What is the goal of the patch? There are still references to java.nio.* and java.net.* classes that don't exist in foundation. So we still have to compile against the foundation class libraries. Or is that ok and are we just trying to remove some of the references now and will fix the rest later? The calls to the java.nio.* classes/methods are wrapped in a try/catch block to protect against calling them when they aren't there, but the other code is not protected. As for the patch itself it looks good except the new class needs a copyright notice.
Created attachment 40424 [details] patch for org.eclipse.update.core Here is a new patch for the project. After Branko's changes to remove the references to URI, there were only 6 references to 1.4 APIs. (java.nio.* code) I looked into this and they were isolated to a single class which was just using FileChannel#transferTo. Based on the comments in bug 137336 comment #19, and based on the fact that if we remove these nio references then we can compile against straight foundation (+xml), I have modified the code to do this. I also added the copyright to the new exception class.
+1 - I think we are ready to go here.
Committed.