Fixed sudden Eclipse annoyance

This commit is contained in:
Leon Hofmeister 2020-09-21 18:45:01 +02:00
parent d394c2d058
commit 3cd9d76d2c
Signed by: delvh
GPG Key ID: 3DECE05F6D9A647C
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<projectDescription> <projectDescription>
<name>client</name> <name>client</name>
<comment></comment> <comment></comment>

View File

@ -1,9 +1,8 @@
package envoy.client.data.commands; package envoy.client.data.commands;
import java.util.*; import java.util.*;
import java.util.function.Function; import java.util.function.Consumer;
import java.util.logging.Level; import java.util.logging.*;
import java.util.logging.Logger;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -198,13 +197,13 @@ public final class SystemCommandsMap {
* are present * are present
* @since Envoy Client v0.2-beta * @since Envoy Client v0.2-beta
*/ */
public void requestRecommendations(String input, Function<Set<String>, Void> action) { public void requestRecommendations(String input, Consumer<Set<String>> action) {
final var partialCommand = getCommand(input); final var partialCommand = getCommand(input);
// Get the expected commands // Get the expected commands
final var recommendations = recommendCommands(partialCommand); final var recommendations = recommendCommands(partialCommand);
if (recommendations.isEmpty()) return; if (recommendations.isEmpty()) return;
// Execute the given action // Execute the given action
else action.apply(recommendations); else action.accept(recommendations);
} }
/** /**