Skip to content

Commit 6b73fc7

Browse files
committed
Add null check for feature.
1 parent bbf6ea0 commit 6b73fc7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

hub/src/main/java/cloud/katta/protocols/hub/HubUVFVault.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ public HubUVFVault(final Session<?> storage, final Path home) {
4646
public <T> T getFeature(final Session<?> ignore, final Class<T> type, final T delegate) {
4747
log.debug("Delegate to {} for feature {}", storage, type);
4848
// Ignore feature implementation but delegate to storage backend
49-
return super.getFeature(storage, type, storage._getFeature(type));
49+
final T feature = storage._getFeature(type);
50+
if(null == feature) {
51+
log.warn("No feature {} available for {}", type, storage);
52+
return null;
53+
}
54+
return super.getFeature(storage, type, feature);
5055
}
5156

5257
@Override

0 commit comments

Comments
 (0)