fix sonar issue: pmd:PreserveStackTrace checkstyle:FinalClassCheck
authorm.dalakov <m.dalakov@samsung.com>
Mon, 25 Sep 2017 15:29:55 +0000 (18:29 +0300)
committerm.dalakov <m.dalakov@samsung.com>
Mon, 25 Sep 2017 15:29:55 +0000 (18:29 +0300)
servers/api-integration-tests/src/main/java/com/samsung/ci/basic/api/AppConfigInit.java
servers/api-integration-tests/src/main/java/com/samsung/ci/basic/api/Cloud.java
servers/dsm/src/main/java/com/samsung/dsm/rest/iotcloud/IotCloudApi.java
servers/dsm/src/main/java/com/samsung/dsm/rest/iotcloud/IotCloudAssociatedUserNotExists.java

index 69cac5c..a84486c 100644 (file)
@@ -40,9 +40,7 @@ import org.springframework.core.env.Environment;
 @PropertySources({
         @PropertySource("classpath:application.properties"),
         @PropertySource("classpath:jdbc.properties") })
-//CHECKSTYLE:OFF: checkstyle:hideutilityclassconstructorcheck
-//CHECKSTYLE:OFF: HideUtilityClassConstructorCheck
-@SuppressWarnings("checkstyle:HideUtilityClassConstructorCheck")
+//CHECKSTYLE.OFF: HideUtilityClassConstructorCheck
 public class AppConfigInit {
 
     static {
index 3fe485e..e8f46f1 100644 (file)
@@ -49,7 +49,7 @@ import org.iotivity.base.ServiceType;
  * @par LLC "Samsung Electronics Co", Ltd (Seoul, Republic of Korea)
  * @par Copyright: (c) Samsung Electronics Co, Ltd 2017. All rights reserved.
  */
-public class Cloud {
+public final class Cloud {
 
     private static final String IOTIVITY_HOST = AppConfigInit.getEnv().getRequiredProperty("iotivity.host");
     private static final String MODEL_NAME = AppConfigInit.getEnv().getRequiredProperty("iotivity.model.name");
index a129f5a..d4fc07d 100644 (file)
@@ -57,7 +57,7 @@ public class IotCloudApi {
             LOG.debug(format("User saved [%s]", user.toString()));
             return new ResponseEntity<>(OK);
         } catch (IllegalArgumentException e) {
-            throw new IotCloudAssociatedUserNotExists();
+            throw new IotCloudAssociatedUserNotExists(e);
         }
 
     }
index f85ad0a..58bfacb 100644 (file)
@@ -10,4 +10,9 @@ public class IotCloudAssociatedUserNotExists extends RuntimeException {
     public IotCloudAssociatedUserNotExists() {
         super();
     }
+
+    public IotCloudAssociatedUserNotExists(Exception e) {
+        super(e);
+    }
+
 }