Do not generate CheckReturnValue annotations 17/80217/4
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 7 Feb 2019 18:52:41 +0000 (19:52 +0100)
committerRobert Varga <nite@hq.sk>
Tue, 12 Feb 2019 09:10:53 +0000 (09:10 +0000)
Use of javax.annotation is really hurting our migration to Java 11,
just do not generate it all over the place.

JIRA: MDSAL-372
Change-Id: I81aa4d8b62b12ea0ea503b5d002e744a31855aea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/mdsal/binding/generator/impl/AbstractTypeGenerator.java

index 8cdce60969e008574330d59cc50496c9ed5db973..bf26f2b138ee402f25eff0155087e6cdfb9a1c2a 100644 (file)
@@ -505,8 +505,9 @@ abstract class AbstractTypeGenerator {
                 final MethodSignatureBuilder method = interfaceBuilder.addMethod(rpcMethodName);
 
                 // Do not refer to annotation class, as it may not be available at runtime
-                // FIXME: migrate this to some other annotation type
-                method.addAnnotation("javax.annotation", "CheckReturnValue");
+                // FIXME: migrate this to some other annotation type and re-enable
+                //
+                // method.addAnnotation("javax.annotation", "CheckReturnValue");
                 addComment(method, rpc);
                 method.addParameter(
                     createRpcContainer(context, rpcName, rpc, verifyNotNull(rpc.getInput()), RPC_INPUT), "input");