Skip to content
Snippets Groups Projects
Commit 05c78063 authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

check file path

parent 1c0e9cb9
No related branches found
No related tags found
2 merge requests!128Production Release | nshmp-ws-static,!127Resolves - Handle Multiple NetCDF Files for AASHTO Service
...@@ -38,6 +38,10 @@ public abstract class Netcdf<T> implements Comparable<Netcdf<T>> { ...@@ -38,6 +38,10 @@ public abstract class Netcdf<T> implements Comparable<Netcdf<T>> {
throw new IllegalArgumentException("Path to Netcdf file [" + netcdfPath + "] does not exist"); throw new IllegalArgumentException("Path to Netcdf file [" + netcdfPath + "] does not exist");
} }
if (!netcdfPath.getFileName().toString().endsWith(".nc")) {
throw new IllegalArgumentException("NetCDF file not found (.nc) " + netcdfPath);
}
var reader = getNetcdfData(netcdfPath); var reader = getNetcdfData(netcdfPath);
netcdfData = reader.netcdfData(); netcdfData = reader.netcdfData();
netcdfShape = reader.netcdfShape(); netcdfShape = reader.netcdfShape();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment