Fixed sonar issue in PolicySequence 80/74180/1
authorezhil <ezhrajam@in.ibm.com>
Tue, 4 Dec 2018 08:35:52 +0000 (14:05 +0530)
committerezhil <ezhrajam@in.ibm.com>
Tue, 4 Dec 2018 08:36:04 +0000 (14:06 +0530)
Fixed sonar issues in PolicySequence
Issue-ID: CCSDK-768
Change-Id: Ifc4558d2c970d80d157c825891948fbc57a7bde1
Signed-off-by: ezhil <ezhrajam@in.ibm.com>
ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/policy/PolicySequence.java

index 526f67c..f70b063 100644 (file)
@@ -3,13 +3,14 @@
  * ONAP : CCSDK.apps
  * ================================================================================
  * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2018 IBM.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
 package org.onap.ccsdk.apps.ms.neng.core.policy;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 /**
  * Represents a sequence object in the policy, as a POJO.
  */
 public class PolicySequence {
     /**
-     * The type of the policy sequence. 
+     * The type of the policy sequence.
      */
-    public enum Type { 
-        ALPHA, NUMERIC 
+    public enum Type {
+        ALPHA, NUMERIC
     }
 
     private long startValue;
@@ -41,6 +44,8 @@ public class PolicySequence {
     private String key;
     private String value;
     private Long lastReleaseSeqNumTried;
+    private Logger logger = LoggerFactory.getLogger(PolicySequence.class);
+
 
     public long getStartValue() {
         return startValue;
@@ -79,6 +84,7 @@ public class PolicySequence {
                 try {
                     this.maxValue = Long.valueOf(this.maxValueString, base);
                 } catch (Exception e) {
+                    logger.error("Exception",e);
                     this.maxValue = null;
                 }
             }