Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
gr812b committed May 13, 2024
1 parent 8d8d7ee commit fa76dbb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion backend/src/main/java/com/mcmasterbaja/ExceptionMappers.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ public Response mapUnsatisfiedLink(NoClassDefFoundError e) {
new ErrorResponse(
errorId,
e.getStackTrace()[0].getClassName() + "." + e.getStackTrace()[0].getMethodName(),
"Failed to link to parser library. Probably need to restart your backend, live reload for the parser does not work.",
"Failed to link to parser library. Probably need to restart your backend, live reload"
+ " for the parser does not work.",
"UNSATISFIED_LINK_ERROR",
e.getMessage());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ public String uploadFile(
break;

default:
try {fileData.close();} catch (IOException e) {throw new StorageException("Failed to close fileData", e);}
try {
fileData.close();
} catch (IOException e) {
throw new StorageException("Failed to close fileData", e);
}
throw new IllegalArgumentException("Invalid filetype: " + fileExtension);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.util.Arrays;
import java.util.Locale;
import java.util.NoSuchElementException;
import java.util.stream.Stream;
import org.apache.commons.io.input.ReversedLinesFileReader;
import org.jboss.logging.Logger;

Expand Down Expand Up @@ -72,7 +71,7 @@ public Double[] getMinMax(Path targetPath, String column) {
if (columnIndex == -1) {
throw new IllegalArgumentException("Column not found in file: " + targetPath.toString());
}

// Then get the minimum and maximum values
String line;
while ((line = reader.readLine()) != null) {
Expand All @@ -87,13 +86,12 @@ public Double[] getMinMax(Path targetPath, String column) {
}

} catch (IOException e) {
throw new FileNotFoundException(
"Failed to get min max of file: " + targetPath.toString(), e);
throw new FileNotFoundException("Failed to get min max of file: " + targetPath.toString(), e);
} catch (NumberFormatException e) {
throw new MalformedCsvException(
"Failed to get min max of file: " + targetPath.toString(), targetPath.toString(), e);
}

return new Double[] {min, max};
}

Expand Down

0 comments on commit fa76dbb

Please sign in to comment.