From: Mathieu Baudier Date: Fri, 29 Aug 2008 09:42:09 +0000 (+0000) Subject: Revert to Java 5 compatibility X-Git-Tag: argeo-slc-2.1.7~2603 X-Git-Url: http://git.argeo.org/?a=commitdiff_plain;h=82c03027b6ed43138f5a52341a3d416a31895568;p=gpl%2Fargeo-slc.git Revert to Java 5 compatibility git-svn-id: https://svn.argeo.org/slc/trunk@1569 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- diff --git a/eclipse/plugins/org.argeo.slc.ui.launch/.classpath b/eclipse/plugins/org.argeo.slc.ui.launch/.classpath index 9aad730cf..b4e58ac5f 100644 --- a/eclipse/plugins/org.argeo.slc.ui.launch/.classpath +++ b/eclipse/plugins/org.argeo.slc.ui.launch/.classpath @@ -1,7 +1,7 @@ - - - - - - - + + + + + + + diff --git a/eclipse/plugins/org.argeo.slc.ui.launch/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.argeo.slc.ui.launch/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..05eb2567a --- /dev/null +++ b/eclipse/plugins/org.argeo.slc.ui.launch/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +#Fri Aug 29 11:26:23 CEST 2008 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/eclipse/plugins/org.argeo.slc.ui.launch/src/main/java/org/argeo/slc/ui/launch/script/SlcScriptLaunchDelegate.java b/eclipse/plugins/org.argeo.slc.ui.launch/src/main/java/org/argeo/slc/ui/launch/script/SlcScriptLaunchDelegate.java index 28f9671c1..4747cdb80 100644 --- a/eclipse/plugins/org.argeo.slc.ui.launch/src/main/java/org/argeo/slc/ui/launch/script/SlcScriptLaunchDelegate.java +++ b/eclipse/plugins/org.argeo.slc.ui.launch/src/main/java/org/argeo/slc/ui/launch/script/SlcScriptLaunchDelegate.java @@ -1,5 +1,6 @@ package org.argeo.slc.ui.launch.script; +import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.StringReader; import java.util.List; @@ -181,15 +182,20 @@ public class SlcScriptLaunchDelegate extends // Properties Properties properties = new Properties(); - StringReader reader = new StringReader(configuration.getAttribute( - SlcScriptUtils.ATTR_PROPERTIES, "")); + String str = configuration.getAttribute(SlcScriptUtils.ATTR_PROPERTIES, + ""); + ByteArrayInputStream in = new ByteArrayInputStream(str.getBytes()); try { - properties.load(reader); + properties.load(in); } catch (IOException e) { throw new RuntimeException("Cannot read properties", e); } finally { - if (reader != null) - reader.close(); + if (in != null) + try { + in.close(); + } catch (IOException e) { + // silent + } } for (Object key : properties.keySet()) {