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

check for null

parent dcf5722e
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,7 +38,9 @@ public abstract class Netcdf<T> implements Comparable<Netcdf<T>> {
throw new IllegalArgumentException("Path to Netcdf file [" + netcdfPath + "] does not exist");
}
if (!netcdfPath.getFileName().toString().endsWith(".nc")) {
Path fileName = netcdfPath.getFileName();
if (fileName == null || !fileName.toString().endsWith(".nc")) {
throw new IllegalArgumentException("NetCDF file not found (.nc) " + netcdfPath);
}
......
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