Properly annotate byte[]
[mdsal.git] / binding / mdsal-binding-java-api-generator / src / main / java / org / opendaylight / mdsal / binding / java / api / generator / AbstractJavaGeneratedType.java
index cdbcc1654d6cf7432e052608fc63190b982cb3b0..63ecbd0dd1a809f2e870bdb9a30586fed5e14906 100644 (file)
@@ -81,9 +81,11 @@ abstract class AbstractJavaGeneratedType {
     }
 
     private String annotateReference(final String ref, final Type type, final String annotation) {
-        return type instanceof ParameterizedType ? getReferenceString(annotate(ref, annotation), type,
-                ((ParameterizedType) type).getActualTypeArguments())
-                : annotate(ref, annotation).toString();
+        if (type instanceof ParameterizedType) {
+            return getReferenceString(annotate(ref, annotation), type,
+                ((ParameterizedType) type).getActualTypeArguments());
+        }
+        return "byte[]".equals(ref) ? "byte @" + annotation + "[]" : annotate(ref, annotation).toString();
     }
 
     final String getFullyQualifiedReference(final Type type, final String annotation) {