diff options
author | Mirco Dotta <mirco.dotta@typesafe.com> | 2012-02-24 10:47:00 +0100 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-02-24 09:15:57 -0800 |
commit | 74e5468f85dc4cf5f90c0c45b58cb7e567da2171 (patch) | |
tree | 996d89e74f6195688fb91ac205a5455500e3b6b5 | |
parent | 496f29398a19931072b43e1a1f534d4ec21ff147 (diff) | |
download | scala-74e5468f85dc4cf5f90c0c45b58cb7e567da2171.tar.gz scala-74e5468f85dc4cf5f90c0c45b58cb7e567da2171.tar.bz2 scala-74e5468f85dc4cf5f90c0c45b58cb7e567da2171.zip |
-Xplugin value passed by the Eclipse IDE are incorrectly parsed when it
contains whitespaces.
Assume -Xplugin is given the value
C:\Programs Files\plugins\Aplugin.jar C:\Programs Files\plugins\Bplugin.jar
Calling ``tryToSetFromPropertyValue`` with the above value will always result
in a total mess, no matter what, because it will split the string at
whitespaces.
The proposed solution is to change the implementation of
``tryToSetFromPropertyValue`` to use `,` (comma) as the splitting character
Further, I'm quite convinced that the current implementation of
``MultiStringSetting.tryToSetFromPropertyValue`` has never worked, that is why I
did not create an overload of ``tryToSetFromPropertyValue`` where the splitting
character (or string) can be passed as argument.
There is also an Eclipse Scala IDE associated to this issue:
http://scala-ide-portfolio.assembla.com/spaces/scala-ide/tickets/1000917
-rw-r--r-- | src/compiler/scala/tools/nsc/settings/MutableSettings.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/settings/MutableSettings.scala b/src/compiler/scala/tools/nsc/settings/MutableSettings.scala index f890da7bfd..5c2388d081 100644 --- a/src/compiler/scala/tools/nsc/settings/MutableSettings.scala +++ b/src/compiler/scala/tools/nsc/settings/MutableSettings.scala @@ -526,7 +526,7 @@ class MutableSettings(val errorFn: String => Unit) extends AbsSettings with Scal Some(rest) } override def tryToSetColon(args: List[String]) = tryToSet(args) - override def tryToSetFromPropertyValue(s: String) = tryToSet(s.trim.split(" +").toList) + override def tryToSetFromPropertyValue(s: String) = tryToSet(s.trim.split(',').toList) def unparse: List[String] = value map { name + ":" + _ } withHelpSyntax(name + ":<" + arg + ">") |