Use E$$ to capture augmentation type
[mdsal.git] / binding / mdsal-binding-java-api-generator / src / main / java / org / opendaylight / mdsal / binding / java / api / generator / AbstractBuilderTemplate.xtend
index ad9f949ed9716cd22114b95016c6c2b343828a8e..a3e8b92892364c574f50ac7ccef348eb5e9ad2be 100644 (file)
@@ -125,10 +125,10 @@ abstract class AbstractBuilderTemplate extends BaseTemplate {
         «ENDIF»
         «IF augmentType !== null»
 
-            @SuppressWarnings("unchecked")
+            @«SuppressWarnings.importedName»({ "unchecked", "checkstyle:methodTypeParameterName"})
             «IF addOverride»@«Override.importedName»«ENDIF»
-            public <E extends «augmentType.importedName»> E «AUGMENTABLE_AUGMENTATION_NAME»(«Class.importedName»<E> augmentationType) {
-                return (E) «AUGMENTATION_FIELD».get(«CodeHelpers.importedName».nonNullValue(augmentationType, "augmentationType"));
+            public <E$$ extends «augmentType.importedName»> E$$ «AUGMENTABLE_AUGMENTATION_NAME»(«Class.importedName»<E$$> augmentationType) {
+                return (E$$) «AUGMENTATION_FIELD».get(«CodeHelpers.importedName».nonNullValue(augmentationType, "augmentationType"));
             }
         «ENDIF»
     '''