Fix compiler error

This commit is contained in:
BoykoAlex
2022-05-03 12:14:22 -04:00
parent ddcf27e976
commit c880ef943d
2 changed files with 8 additions and 2 deletions

View File

@@ -53,5 +53,9 @@ public class CodeAction {
}
}
}
public Command getCommand() {
return ca.isLeft() ? ca.getLeft() : ca.getRight().getCommand();
}
}

View File

@@ -24,6 +24,7 @@ import java.util.List;
import java.util.Optional;
import org.apache.commons.io.FileUtils;
import org.eclipse.lsp4j.Command;
import org.eclipse.lsp4j.Diagnostic;
import org.eclipse.lsp4j.DiagnosticSeverity;
import org.junit.After;
@@ -3286,9 +3287,10 @@ public class ApplicationYamlEditorTest extends AbstractPropsEditorTest {
}
private String getMissingPropertyName(CodeAction fix) {
String cmd = fix.command.getCommand();
Command command = fix.getCommand();
String cmd = command.getCommand();
assertEquals("sts.vscode-spring-boot.codeAction", cmd);
List<Object> args = fix.command.getArguments();
List<Object> args = command.getArguments();
assertEquals("MISSING_PROPERTY_APP", args.get(0));
MissingPropertyData data = (MissingPropertyData) args.get(1);
return data.getProperty();