Use SUPPRESS_WARNINGS reference 16/85316/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 21 Oct 2019 19:15:07 +0000 (21:15 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 21 Oct 2019 21:03:33 +0000 (23:03 +0200)
When suppressing warnings, we should use the JavaTypeName constant
available in JavaFileTemplate.

Change-Id: I9b6a46403b67f4411356e2aaf16c758b15430273
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit b5a4b1eb66e208a957cef4ff43fe58a68af4c928)

binding/mdsal-binding-java-api-generator/src/main/java/org/opendaylight/mdsal/binding/java/api/generator/BuilderTemplate.xtend

index 047b515ab70bc1b36576f41a1d47e54b2876374c..eb2d2f973801c5e05fdf94425394897fe28b5543 100644 (file)
@@ -410,7 +410,7 @@ class BuilderTemplate extends AbstractBuilderTemplate {
     }
 
     private def generateAugmentation() '''
-        @«SuppressWarnings.importedName»({ "unchecked", "checkstyle:methodTypeParameterName"})
+        @«SUPPRESS_WARNINGS.importedName»({ "unchecked", "checkstyle:methodTypeParameterName"})
         public <E$$ extends «augmentType.importedName»> E$$ «AUGMENTABLE_AUGMENTATION_NAME»(«Class.importedName»<E$$> augmentationType) {
             return (E$$) «AUGMENTATION_FIELD».get(«CodeHelpers.importedName».nonNullValue(augmentationType, "augmentationType"));
         }