Fix spotbugs with Java 11 96/76596/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 3 Oct 2018 09:02:15 +0000 (11:02 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 3 Oct 2018 09:02:15 +0000 (11:02 +0200)
https://github.com/spotbugs/spotbugs/issues/600 is still present,
biting us.

Change-Id: If9bcd5540c5c0d1427a9e69fde87a674d771c182
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/repo/util/FilesystemSchemaSourceCache.java

index 46015017b00e3dec90bdc35179e648b98326d4aa..b408d2d363580988b6d465bdd02e35c7956024db 100644 (file)
@@ -237,6 +237,8 @@ public final class FilesystemSchemaSourceCache<T extends SchemaSourceRepresentat
         }
 
         @Override
+        @SuppressFBWarnings(value = "RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE",
+            justification = "https://github.com/spotbugs/spotbugs/issues/600")
         protected void storeAsType(final File file, final YangTextSchemaSource cast) {
             try (InputStream castStream = cast.openStream()) {
                 Files.copy(castStream, file.toPath(), StandardCopyOption.REPLACE_EXISTING);