Correct @NonNull CodeHelpers.compilePatterns() 33/85933/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 21 Nov 2019 13:27:12 +0000 (14:27 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 21 Nov 2019 13:28:11 +0000 (14:28 +0100)
Arrays and type-use annotations have weird way of being written,
this adds the correct form.

JIRA: MDSAL-487
Change-Id: I2e31c90eca5b59250f0a9e33444fa8b3b8ae5e4c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/CodeHelpers.java

index dda90f4c8db2355beeeba0349d74f26337e749b1..6fdc5cfec64b8553e8256fbb8caeccfbfe9ffec5 100644 (file)
@@ -120,10 +120,10 @@ public final class CodeHelpers {
      * @throws NullPointerException if the list or any of its elements is null
      * @throws VerifyException if the list has fewer than two elements
      */
-    public static @NonNull Pattern[] compilePatterns(final @NonNull List<String> patterns) {
+    public static Pattern @NonNull[] compilePatterns(final @NonNull List<String> patterns) {
         final int size = patterns.size();
         verify(size > 1, "Patterns has to have at least 2 elements");
-        final @NonNull Pattern[] result = new Pattern[size];
+        final Pattern[] result = new Pattern[size];
         for (int i = 0; i < size; ++i) {
             result[i] = Pattern.compile(patterns.get(i));
         }