From fd4efcfa21a9fcd2123bcef95cfeebdbe7f2785a Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Thu, 15 Aug 2019 13:04:26 +0200 Subject: [PATCH] Fix InterfaceTemplate documentation InterfaceTemplate will fail to instantiate with a NPE if a null type is ever passed in. Fix documentation and remove dead code. Change-Id: Ief395cbf0d4d417e8041de39feee1e50d09157e0 Signed-off-by: Robert Varga --- .../binding/java/api/generator/InterfaceTemplate.xtend | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/binding/mdsal-binding-java-api-generator/src/main/java/org/opendaylight/mdsal/binding/java/api/generator/InterfaceTemplate.xtend b/binding/mdsal-binding-java-api-generator/src/main/java/org/opendaylight/mdsal/binding/java/api/generator/InterfaceTemplate.xtend index 8f71efaefe..559d7174ae 100644 --- a/binding/mdsal-binding-java-api-generator/src/main/java/org/opendaylight/mdsal/binding/java/api/generator/InterfaceTemplate.xtend +++ b/binding/mdsal-binding-java-api-generator/src/main/java/org/opendaylight/mdsal/binding/java/api/generator/InterfaceTemplate.xtend @@ -50,14 +50,10 @@ class InterfaceTemplate extends BaseTemplate { * Creates the instance of this class which is used for generating the interface file source * code from genType. * - * @throws IllegalArgumentException if genType equals null + * @throws NullPointerException if genType is null */ new(GeneratedType genType) { super(genType) - if (genType === null) { - throw new IllegalArgumentException("Generated type reference cannot be NULL!") - } - consts = genType.constantDefinitions methods = genType.methodDefinitions enums = genType.enumerations -- 2.36.6