From 81c2abdcbe9ca52674be209f7c20ed4cb7e14c86 Mon Sep 17 00:00:00 2001 From: ezhil Date: Fri, 28 Dec 2018 23:24:51 +0530 Subject: Fixed sonar issues in VlantagApiServiceImpl.java Fixed major sonar issue Change-Id: I32700d3e42f3838ab2b7498047a782492409e619 Issue-ID: CCSDK-878 Signed-off-by: ezhil --- .../ccsdk/apps/ms/vlantagapi/core/service/VlantagApiServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ms/vlantag-api/src') diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiServiceImpl.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiServiceImpl.java index 93f8a21e..abc18c5f 100644 --- a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiServiceImpl.java +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiServiceImpl.java @@ -1,6 +1,6 @@ /******************************************************************************* * Copyright © 2017-2018 AT&T Intellectual Property. - * + * 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 @@ -192,7 +192,7 @@ public class VlantagApiServiceImpl implements VlantagApiService { * so it will ignore the current range min-max in the policy. Persist in the DB * if available else Fail. */ - if (element.getOverwrite() != null && element.getOverwrite().equalsIgnoreCase("TRUE")) { + if (element.getOverwrite() != null && "TRUE".equalsIgnoreCase(element.getOverwrite())) { Range range = new Range(); range.min = Integer.parseInt(resourceValue); rangeList.add(range); @@ -223,6 +223,7 @@ public class VlantagApiServiceImpl implements VlantagApiService { return resourceValues[i].trim(); } } catch (IndexOutOfBoundsException e) { + log.error("Exception : " + e.getMessage(), e); throw new VlantagApiException("No Matching Resource Value found from Recipe : \"" + model.getResourceResolutionRecipe() + "\" for Vlantag Name : " + element.getVlantagName()); } -- cgit 1.2.3-korg