mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 16:28:56 +00:00
[ls] fixed args testing
Signed-off-by: Anton Kosiakov <anton.kosyakov@typefox.io>
This commit is contained in:
parent
9cff8e1696
commit
fcef1ccdd1
2 changed files with 6 additions and 5 deletions
|
@ -95,11 +95,11 @@ class ServerLauncher {
|
|||
}
|
||||
|
||||
def static boolean testArg(String[] args, String ... values) {
|
||||
return args.exists[testArg(values)]
|
||||
return args.exists[arg|arg.testArg(values)]
|
||||
}
|
||||
|
||||
def static boolean testArg(String arg, String ... values) {
|
||||
return values.exists[value|value === arg]
|
||||
return values.exists[value|value == arg]
|
||||
}
|
||||
|
||||
def static void logStandardStreams(String prefix) {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
package org.eclipse.xtext.ide.server;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.io.ByteStreams;
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Inject;
|
||||
|
@ -116,15 +117,15 @@ public class ServerLauncher {
|
|||
}
|
||||
|
||||
public static boolean testArg(final String[] args, final String... values) {
|
||||
final Function1<String, Boolean> _function = (String it) -> {
|
||||
return Boolean.valueOf(ServerLauncher.testArg(values));
|
||||
final Function1<String, Boolean> _function = (String arg) -> {
|
||||
return Boolean.valueOf(ServerLauncher.testArg(arg, values));
|
||||
};
|
||||
return IterableExtensions.<String>exists(((Iterable<String>)Conversions.doWrapArray(args)), _function);
|
||||
}
|
||||
|
||||
public static boolean testArg(final String arg, final String... values) {
|
||||
final Function1<String, Boolean> _function = (String value) -> {
|
||||
return Boolean.valueOf((value == arg));
|
||||
return Boolean.valueOf(Objects.equal(value, arg));
|
||||
};
|
||||
return IterableExtensions.<String>exists(((Iterable<String>)Conversions.doWrapArray(values)), _function);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue