From 1f507e4224e14fc38984b8a8e4ed0b0502fb9a4d Mon Sep 17 00:00:00 2001 From: geethkokila Date: Fri, 22 May 2015 01:13:38 +0530 Subject: [PATCH] Removing unneccessary catch exception --- .../impl/PolicyAdministratorPointImpl.java | 28 ++++--------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/PolicyAdministratorPointImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/PolicyAdministratorPointImpl.java index c61b9802a2..859f29bd1c 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/PolicyAdministratorPointImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/PolicyAdministratorPointImpl.java @@ -88,7 +88,8 @@ public class PolicyAdministratorPointImpl implements PolicyAdministratorPoint { return policyManager.getPolicies(); } - @Override public Policy getPolicy(int policyId) throws PolicyManagementException { + @Override + public Policy getPolicy(int policyId) throws PolicyManagementException { return policyManager.getPolicy(policyId); } @@ -184,34 +185,17 @@ public class PolicyAdministratorPointImpl implements PolicyAdministratorPoint { @Override public Feature addFeature(Feature feature) throws FeatureManagementException { - try { - return featureManager.addFeature(feature); - } catch (FeatureManagementException e) { - String msg = "Error occurred while persisting the feature."; - log.error(msg, e); - throw new FeatureManagementException(msg, e); - } + return featureManager.addFeature(feature); } @Override public Feature updateFeature(Feature feature) throws FeatureManagementException { - try { - return featureManager.updateFeature(feature); - } catch (FeatureManagementException e) { - String msg = "Error occurred while persisting the feature."; - log.error(msg, e); - throw new FeatureManagementException(msg, e); - } + return featureManager.updateFeature(feature); + } @Override public boolean deleteFeature(int featureId) throws FeatureManagementException { - try { - return featureManager.deleteFeature(featureId); - } catch (FeatureManagementException e) { - String msg = "Error occurred while deleting the feature."; - log.error(msg, e); - throw new FeatureManagementException(msg, e); - } + return featureManager.deleteFeature(featureId); } }