Skip to content

Commit

Permalink
Address warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
petervdonovan committed May 26, 2023
1 parent de058fb commit 8deabb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
11 changes: 1 addition & 10 deletions buildSrc/src/main/java/lfformat/LfFormatStep.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private Step() throws IOException {
@Override
public String format(
@SuppressWarnings("NullableProblems") String rawUnix,
@SuppressWarnings("NullableProblems") File file)
File file)
throws IOException, InterruptedException {
StringBuilder output = new StringBuilder();
try {
Expand Down Expand Up @@ -119,15 +119,6 @@ private void initializeFormatter() throws IOException {
error = new BufferedReader(new InputStreamReader(formatter.getErrorStream()));
}

// /** Run the formatter on the given file and return the resulting process handle. */
// private Process runFormatter(File file) throws IOException {
// // It looks silly to invoke Java from Java, but it is necessary in
// // order to break the circularity of needing the program to be built
// // in order for it to be built.
// var formatter = getFormatter();
// return formatter;
// }

@SuppressWarnings("NullableProblems")
@Override
public String getName() {
Expand Down
3 changes: 1 addition & 2 deletions org.lflang/src/org/lflang/cli/CliBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.xtext.util.CancelIndicator;
import org.eclipse.xtext.util.RuntimeIOException;
import org.eclipse.xtext.validation.CheckMode;
import org.eclipse.xtext.validation.IResourceValidator;
import org.eclipse.xtext.validation.Issue;
Expand Down Expand Up @@ -180,7 +179,7 @@ protected List<Path> getInputPaths() {
try {
line = reader.readLine();
} catch (IOException e) {
throw new RuntimeIOException(e);
throw new RuntimeException(e);
}
if (line == null) return List.of();
return List.of(Path.of(line));
Expand Down

0 comments on commit 8deabb3

Please sign in to comment.