diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2018-02-08 17:55:25 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-02-08 17:55:25 +0000 |
commit | 321417267ab93b0a8f0244aef07c45cdc37dbef4 (patch) | |
tree | f795a51f0e61f2f1bac11529f55eaf1e963835f6 /POLICY-SDK-APP/src/main | |
parent | 9a322232dd7840065a37004000372f4332b055c9 (diff) | |
parent | c5d97e8a9a6bea71f3be329a2e44bdbe5fe50882 (diff) |
Merge "MS Model Input Validation"
Diffstat (limited to 'POLICY-SDK-APP/src/main')
-rw-r--r-- | POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java index 96e104656..64928f3f4 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP Policy Engine * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,6 +78,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; public class AutoPushController extends RestrictedBaseController{ private static final Logger logger = FlexLogger.getLogger(AutoPushController.class); + private static final String UTF8 = "UTF-8"; + @Autowired CommonClassDao commonClassDao; @@ -319,9 +321,9 @@ public class AutoPushController extends RestrictedBaseController{ updatedGroupObject.setPolicies(currentPoliciesInGroup); this.container.updateGroup(updatedGroupObject); - response.setCharacterEncoding("UTF-8"); + response.setCharacterEncoding(UTF8); response.setContentType("application / json"); - request.setCharacterEncoding("UTF-8"); + request.setCharacterEncoding(UTF8); PrintWriter out = response.getWriter(); refreshGroups(); @@ -336,8 +338,8 @@ public class AutoPushController extends RestrictedBaseController{ } } catch (Exception e){ - response.setCharacterEncoding("UTF-8"); - request.setCharacterEncoding("UTF-8"); + response.setCharacterEncoding(UTF8); + request.setCharacterEncoding(UTF8); PrintWriter out = response.getWriter(); logger.error(e); out.write(PolicyUtils.CATCH_EXCEPTION); @@ -379,9 +381,9 @@ public class AutoPushController extends RestrictedBaseController{ this.container.updateGroup(updatedGroupObject); } - response.setCharacterEncoding("UTF-8"); + response.setCharacterEncoding(UTF8); response.setContentType("application / json"); - request.setCharacterEncoding("UTF-8"); + request.setCharacterEncoding(UTF8); PrintWriter out = response.getWriter(); refreshGroups(); @@ -393,8 +395,8 @@ public class AutoPushController extends RestrictedBaseController{ return null; } catch (Exception e){ - response.setCharacterEncoding("UTF-8"); - request.setCharacterEncoding("UTF-8"); + response.setCharacterEncoding(UTF8); + request.setCharacterEncoding(UTF8); PrintWriter out = response.getWriter(); logger.error(e); out.write(PolicyUtils.CATCH_EXCEPTION); |