diff options
author | Geoffrey Washburn <geoffrey.washburn@epfl.ch> | 2008-01-15 15:34:35 +0000 |
---|---|---|
committer | Geoffrey Washburn <geoffrey.washburn@epfl.ch> | 2008-01-15 15:34:35 +0000 |
commit | b9461d35c43b19088f2243581e138890cae89b44 (patch) | |
tree | 353c49d6c94da6d536afd4dd4fd2091c0b4a696e | |
parent | abbcc46aca83f2b4c767b405cf687c06a7480247 (diff) | |
download | scala-b9461d35c43b19088f2243581e138890cae89b44.tar.gz scala-b9461d35c43b19088f2243581e138890cae89b44.tar.bz2 scala-b9461d35c43b19088f2243581e138890cae89b44.zip |
Learned of the shorter way of converting string...
Learned of the shorter way of converting strings to ints.
-rw-r--r-- | src/compiler/scala/tools/nsc/Interpreter.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/ScriptRunner.scala | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/Interpreter.scala b/src/compiler/scala/tools/nsc/Interpreter.scala index 9ec9b8b60d..79b80e28b5 100644 --- a/src/compiler/scala/tools/nsc/Interpreter.scala +++ b/src/compiler/scala/tools/nsc/Interpreter.scala @@ -63,7 +63,7 @@ class Interpreter(val settings: Settings, out: PrintWriter) { /* If the interpreter is running on pre-jvm-1.5 JVM, it is necessary to force the target setting to jvm-1.4 */ val major = System.getProperty("java.class.version").split("\\.")(0) - if (Integer.valueOf(major).intValue < 49) { + if (major.toInt < 49) { this.settings.target.value = "jvm-1.4" } diff --git a/src/compiler/scala/tools/nsc/ScriptRunner.scala b/src/compiler/scala/tools/nsc/ScriptRunner.scala index 46a59a0391..10531a1bf5 100644 --- a/src/compiler/scala/tools/nsc/ScriptRunner.scala +++ b/src/compiler/scala/tools/nsc/ScriptRunner.scala @@ -275,7 +275,7 @@ object ScriptRunner { /* If the script is running on pre-jvm-1.5 JVM, it is necessary to force the target setting to jvm-1.4 */ val major = System.getProperty("java.class.version").split("\\.")(0) - if (Integer.valueOf(major).intValue < 49) { + if (major.toInt < 49) { settings.target.value = "jvm-1.4" } |