Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Foster2015-07-17 16:28:35 -0400
committerBob Foster2015-07-17 16:28:35 -0400
commit214e70fb873435481e425ed0d41be3427a12c33d (patch)
tree878b06d64c98001f8b474eab24060d917ff85830
parent9492d4dca1570000f25e3f23fe0bce6f75e70a75 (diff)
downloadorg.eclipse.hudson.core-214e70fb873435481e425ed0d41be3427a12c33d.tar.gz
org.eclipse.hudson.core-214e70fb873435481e425ed0d41be3427a12c33d.tar.xz
org.eclipse.hudson.core-214e70fb873435481e425ed0d41be3427a12c33d.zip
Back off to Java 1.6 again.
Turns out all libraries that modify bytecode are now required to include the additional StackMapTable attributes introduced in Java 7. This includes ASM, AOP libraries like guava, etc. Upgrading these base libraries in Stapler and Hudson doesn't seem worth the trouble. Yet.
-rw-r--r--hudson-core/pom.xml4
-rw-r--r--hudson-core/src/main/java/org/eclipse/hudson/init/InitialSetup.java7
2 files changed, 8 insertions, 3 deletions
diff --git a/hudson-core/pom.xml b/hudson-core/pom.xml
index 67d83705..b824f677 100644
--- a/hudson-core/pom.xml
+++ b/hudson-core/pom.xml
@@ -36,8 +36,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
- <source>1.7</source>
- <target>1.7</target>
+ <source>1.6</source>
+ <target>1.6</target>
</configuration>
<executions>
<execution>
diff --git a/hudson-core/src/main/java/org/eclipse/hudson/init/InitialSetup.java b/hudson-core/src/main/java/org/eclipse/hudson/init/InitialSetup.java
index 10b4f471..47ff434c 100644
--- a/hudson-core/src/main/java/org/eclipse/hudson/init/InitialSetup.java
+++ b/hudson-core/src/main/java/org/eclipse/hudson/init/InitialSetup.java
@@ -45,6 +45,7 @@ import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
import org.eclipse.hudson.WebAppController;
import org.eclipse.hudson.plugins.InstalledPluginManager;
import org.eclipse.hudson.plugins.InstalledPluginManager.InstalledPluginInfo;
@@ -536,9 +537,13 @@ final public class InitialSetup {
File localCacheFile = new File(hudsonHomeDir, "updates/default.json");
if (!localCacheFile.exists() || (localCacheFile.lastModified() < lastModified)) {
+ InputStream urlStream = null;
String jsonStr = null;
- try (InputStream urlStream = updateCenterJsonUrl.openStream()) {
+ try {
+ urlStream = updateCenterJsonUrl.openStream();
jsonStr = org.apache.commons.io.IOUtils.toString(urlStream);
+ } finally {
+ IOUtils.closeQuietly(urlStream);
}
jsonStr = jsonStr.trim();
if (jsonStr.startsWith("updateCenter.post(")) {

Back to the top