Correct @NonNull CodeHelpers.compilePatterns() 36/85936/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:30:43 +0000 (14:30 +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>
(cherry picked from commit c03c60cc068b342582a2d54861719718c750a880)

binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/CodeHelpers.java

index 0356fe5cba1a043ec3dbbbbf93d8fd9fd29c4232..de4d74aa7f9f5844f07d417cd505f741917ce178 100644 (file)
@@ -115,10 +115,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));
         }