Enable checkstyle in mdsal-dom-schema-service-osgi 69/76869/2
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 11 Oct 2018 11:43:13 +0000 (13:43 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 11 Oct 2018 12:32:11 +0000 (14:32 +0200)
This fixes a few violations and flips enforcement on.

Change-Id: I336e1624564f9f41c62f96294ebf5c9ef0ca839c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
dom/mdsal-dom-schema-service-osgi/pom.xml
dom/mdsal-dom-schema-service-osgi/src/main/java/org/opendaylight/mdsal/dom/schema/service/osgi/OsgiBundleScanningSchemaService.java
dom/mdsal-dom-schema-service-osgi/src/test/java/org/opendaylight/mdsal/dom/schema/service/osgi/util/TestModel.java

index a819898993755400c4d30f024097b965c4ab92c4..0e1d3e68d40e6457f88960a997f4585615736fb5 100644 (file)
                     </instructions>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <configuration>
+                    <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 
index 4180c1339883c4fd92e9388bedbc6f961902dc25..7a9f2f9196e3f5a7284eec6fbaefdd569429e962 100644 (file)
@@ -35,7 +35,7 @@ import org.osgi.util.tracker.ServiceTrackerCustomizer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class OsgiBundleScanningSchemaService extends ScanningSchemaServiceProvider
+public final class OsgiBundleScanningSchemaService extends ScanningSchemaServiceProvider
         implements ServiceTrackerCustomizer<SchemaContextListener, SchemaContextListener> {
 
     private static final Logger LOG = LoggerFactory.getLogger(OsgiBundleScanningSchemaService.class);
index 2027c221d44730276e04d55e1046df44d6a1f44f..189e1357e8b88c272ed54f3ed9e0937083985c11 100644 (file)
@@ -12,7 +12,7 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
 
-public class TestModel {
+public final class TestModel {
 
     public static final QName TEST_QNAME =
             QName.create("urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:test", "2014-03-13", "test");
@@ -45,6 +45,10 @@ public class TestModel {
     public static final YangInstanceIdentifier NEW_SHARD_LIST_PATH =
             YangInstanceIdentifier.builder(ANOTHER_SHARD_PATH).node(NEW_SHARD_LIST).build();
 
+    private TestModel() {
+
+    }
+
     public static SchemaContext createTestContext() {
         return YangParserTestUtils.parseYangResource("/odl-datastore-test.yang");
     }