diff --git a/cdm/core/src/main/java/thredds/filesystem/ControllerOS.java b/cdm/core/src/main/java/thredds/filesystem/ControllerOS.java index 6c3f3fdcce..22e6b438e4 100644 --- a/cdm/core/src/main/java/thredds/filesystem/ControllerOS.java +++ b/cdm/core/src/main/java/thredds/filesystem/ControllerOS.java @@ -35,6 +35,8 @@ import thredds.inventory.CollectionConfig; import thredds.inventory.MController; import thredds.inventory.MFile; + +import javax.annotation.Nullable; import javax.annotation.concurrent.ThreadSafe; import java.io.File; import java.util.*; @@ -53,6 +55,7 @@ public class ControllerOS implements MController { //////////////////////////////////////// + @Nullable @Override public Iterator getInventoryAll(CollectionConfig mc, boolean recheck) { String path = mc.getDirectoryName(); @@ -68,6 +71,7 @@ public Iterator getInventoryAll(CollectionConfig mc, boolean recheck) { return new FilteredIterator(mc, new MFileIteratorAll(cd), false); } + @Nullable @Override public Iterator getInventoryTop(CollectionConfig mc, boolean recheck) { String path = mc.getDirectoryName(); @@ -83,6 +87,7 @@ public Iterator getInventoryTop(CollectionConfig mc, boolean recheck) { return new FilteredIterator(mc, new MFileIterator(cd), false); // removes subdirs } + @Nullable public Iterator getSubdirs(CollectionConfig mc, boolean recheck) { String path = mc.getDirectoryName(); if (path.startsWith("file:")) { diff --git a/cdm/core/src/main/java/thredds/inventory/MController.java b/cdm/core/src/main/java/thredds/inventory/MController.java index 68477a0650..84b38325f7 100644 --- a/cdm/core/src/main/java/thredds/inventory/MController.java +++ b/cdm/core/src/main/java/thredds/inventory/MController.java @@ -5,6 +5,7 @@ package thredds.inventory; +import javax.annotation.Nullable; import java.io.IOException; import java.util.Iterator; @@ -23,6 +24,7 @@ public interface MController { * @param recheck if false, may use cached results. otherwise must sync with File OS * @return iterator over Mfiles, or null if collection does not exist */ + @Nullable Iterator getInventoryAll(CollectionConfig mc, boolean recheck); /** @@ -32,6 +34,7 @@ public interface MController { * @param recheck if false, may use cached results. otherwise must sync with File OS * @return iterator over Mfiles, or null if collection does not exist */ + @Nullable Iterator getInventoryTop(CollectionConfig mc, boolean recheck) throws IOException; /** @@ -41,6 +44,7 @@ public interface MController { * @param recheck if false, may use cached results. otherwise must sync with File OS * @return iterator over Mfiles, or null if collection does not exist */ + @Nullable Iterator getSubdirs(CollectionConfig mc, boolean recheck); void close();