Fix checkstyle in yang-parser-api 48/71048/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 17 Apr 2018 17:26:39 +0000 (19:26 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 17 Apr 2018 17:26:39 +0000 (19:26 +0200)
Fix the few violations and start enforcing checkstyle.

Change-Id: I04929e336d369265969989082e42db61c2a485ef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-parser-api/pom.xml
yang/yang-parser-api/src/main/java/org/opendaylight/yangtools/yang/model/parser/api/YangParser.java

index 4ae63ce27613e07e763ca69866bca58b41793494..36f875dde99edea7c1dc72896c62296ce2292cd2 100644 (file)
         </dependency>
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <configuration>
+                    <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>
index 1560104c19d59dbba181bf51cb54dd9627553dcf..2905ab02b154a71075746145c06abeb36af3c202 100644 (file)
@@ -57,7 +57,7 @@ public interface YangParser {
      * @throws IOException when an IO error occurs
      * @throws IllegalArgumentException if the representation is not supported
      */
-    YangParser addSource(final SchemaSourceRepresentation source) throws IOException, YangSyntaxErrorException;
+    YangParser addSource(SchemaSourceRepresentation source) throws IOException, YangSyntaxErrorException;
 
     /**
      * Add main sources. All main sources are present in resulting SchemaContext.
@@ -123,7 +123,7 @@ public interface YangParser {
      *            Set of supported features in the final SchemaContext.
      *            If the set is empty, no features encountered will be supported.
      */
-    YangParser setSupportedFeatures(@Nonnull final Set<QName> supportedFeatures);
+    YangParser setSupportedFeatures(@Nonnull Set<QName> supportedFeatures);
 
     /**
      * Set YANG modules which can be deviated by specified modules during the parsing process.
@@ -158,7 +158,7 @@ public interface YangParser {
     }
 
     /**
-     * Build effective {@link SchemaContext}
+     * Build effective {@link SchemaContext}.
      *
      * @return An effective schema context comprised of configured models.
      * @throws YangSyntaxErrorException When a syntactic error is encountered.