diff options
author | Instrumental <jonathan.gathman@att.com> | 2019-02-03 06:09:34 -0600 |
---|---|---|
committer | Instrumental <jonathan.gathman@att.com> | 2019-02-03 06:09:46 -0600 |
commit | 59ffb7d529245c3bd0233dbf6cb0ae9fe9ccb856 (patch) | |
tree | 48f79984b766211d0f570f50485cbe288dd2f990 /auth/auth-certman/src/main/java | |
parent | e36daf12cf4c5aa4b22fa3cec66a79ff2e2b8b94 (diff) |
Approval Batch, prep better JUnit
Issue-ID: AAF-740
Change-Id: Id9e8ca121c9bf92c2f98c7a61631e2417bba70b1
Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-certman/src/main/java')
5 files changed, 10 insertions, 10 deletions
diff --git a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/facade/Facade.java b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/facade/Facade.java index 4952dbec..2a49d3cd 100644 --- a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/facade/Facade.java +++ b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/facade/Facade.java @@ -53,7 +53,7 @@ public interface Facade<REQ,CERT,ARTIFACTS,ERROR> { * @param response * @param status */ - void error(AuthzTrans trans, HttpServletResponse response, int status, String msg, String ... detail); + void error(AuthzTrans trans, HttpServletResponse response, int status, String msg, Object ... detail); /** * Permission checker diff --git a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/facade/FacadeImpl.java b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/facade/FacadeImpl.java index 10e20ed0..cba53795 100644 --- a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/facade/FacadeImpl.java +++ b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/facade/FacadeImpl.java @@ -136,11 +136,11 @@ public abstract class FacadeImpl<REQ,CERT,ARTIFACTS,ERROR> extends org.onap.aaf. public void error(AuthzTrans trans, HttpServletResponse response, Result<?> result) { error(trans, response, result.status, result.details==null?"":result.details.trim(), - result.variables==null?new String[0]:result.variables); + result.variables==null?Result.EMPTY_VARS:result.variables); } @Override - public void error(AuthzTrans trans, HttpServletResponse response, int status, final String _msg, final String ... _detail) { + public void error(AuthzTrans trans, HttpServletResponse response, int status, final String _msg, final Object ... _detail) { String msgId; String prefix; boolean hidemsg=false; diff --git a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/mapper/Mapper.java b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/mapper/Mapper.java index 7328f099..4a7019dd 100644 --- a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/mapper/Mapper.java +++ b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/mapper/Mapper.java @@ -40,7 +40,7 @@ public interface Mapper<REQ,CERT,ARTIFACTS,ERROR> public Class<?> getClass(API api); public<A> A newInstance(API api); - public ERROR errorFromMessage(StringBuilder holder, String msgID, String text, String... detail); + public ERROR errorFromMessage(StringBuilder holder, String msgID, String text, Object ... detail); public Result<CERT> toCert(AuthzTrans trans, Result<CertResp> in, boolean withTrustChain) throws IOException; public Result<CERT> toCert(AuthzTrans trans, Result<List<CertDAO.Data>> in); diff --git a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/mapper/Mapper1_0.java b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/mapper/Mapper1_0.java index 99d0c478..663cee82 100644 --- a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/mapper/Mapper1_0.java +++ b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/mapper/Mapper1_0.java @@ -81,13 +81,13 @@ public class Mapper1_0 implements Mapper<BaseRequest,CertInfo,Artifacts,Error> { ////////////// Mapping Functions ///////////// @Override - public Error errorFromMessage(StringBuilder holder, String msgID, String text, String... var) { + public Error errorFromMessage(StringBuilder holder, String msgID, String text, Object ... var) { Error err = new Error(); err.setMessageId(msgID); // AT&T Restful Error Format requires numbers "%" placements err.setText(Vars.convert(holder, text, var)); - for (String s : var) { - err.getVariables().add(s); + for (Object s : var) { + err.getVariables().add(s.toString()); } return err; } diff --git a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/mapper/Mapper2_0.java b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/mapper/Mapper2_0.java index 55a292e0..3ff88d27 100644 --- a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/mapper/Mapper2_0.java +++ b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/mapper/Mapper2_0.java @@ -81,13 +81,13 @@ public class Mapper2_0 implements Mapper<BaseRequest,CertInfo,Artifacts,Error> { ////////////// Mapping Functions ///////////// @Override - public Error errorFromMessage(StringBuilder holder, String msgID, String text, String... var) { + public Error errorFromMessage(StringBuilder holder, String msgID, String text, Object ... var) { Error err = new Error(); err.setMessageId(msgID); // AT&T Restful Error Format requires numbers "%" placements err.setText(Vars.convert(holder, text, var)); - for (String s : var) { - err.getVariables().add(s); + for (Object s : var) { + err.getVariables().add(s.toString()); } return err; } |