diff options
author | Mirco Dotta <mirco.dotta@typesafe.com> | 2012-02-24 10:47:00 +0100 |
---|---|---|
committer | Mirco Dotta <mirco.dotta@typesafe.com> | 2012-02-24 11:00:43 +0100 |
commit | e7b362ff91904c22ccf6cebdc9816fbd7d129d7d (patch) | |
tree | 17cf006b3c48c1ca77ea9708940f0b4eb18bfe1f | |
parent | 24b15a1f796ed1c6cad59ff5d096ffe291d45bf1 (diff) | |
download | scala-e7b362ff91904c22ccf6cebdc9816fbd7d129d7d.tar.gz scala-e7b362ff91904c22ccf6cebdc9816fbd7d129d7d.tar.bz2 scala-e7b362ff91904c22ccf6cebdc9816fbd7d129d7d.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 f99d1399c0..e7959f36b2 100644 --- a/src/compiler/scala/tools/nsc/settings/MutableSettings.scala +++ b/src/compiler/scala/tools/nsc/settings/MutableSettings.scala @@ -533,7 +533,7 @@ class MutableSettings(val errorFn: String => Unit) 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 + ">") |