diff options
Diffstat (limited to 'auth/auth-oauth/src')
4 files changed, 7 insertions, 7 deletions
diff --git a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/facade/OAFacade.java b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/facade/OAFacade.java index c0bb8e7e..23011d27 100644 --- a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/facade/OAFacade.java +++ b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/facade/OAFacade.java @@ -50,7 +50,7 @@ public interface OAFacade<INTROSPECT> { * @param response * @param status */ - public void error(AuthzTrans trans, HttpServletResponse response, int status, String msg, String ... detail); + public void error(AuthzTrans trans, HttpServletResponse response, int status, String msg, Object ... detail); public Result<Void> createBearerToken(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp); diff --git a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/facade/OAFacadeImpl.java b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/facade/OAFacadeImpl.java index e5e12bd6..63306641 100644 --- a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/facade/OAFacadeImpl.java +++ b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/facade/OAFacadeImpl.java @@ -237,11 +237,11 @@ public abstract class OAFacadeImpl<TOKEN_REQ,TOKEN,INTROSPECT,ERROR> 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-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper.java b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper.java index 8e1c52e6..d741469c 100644 --- a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper.java +++ b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper.java @@ -37,7 +37,7 @@ public interface Mapper<TOKEN_REQ,TOKEN,INTROSPECT,ERROR> extends MapperIntrospe 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 TOKEN_REQ tokenReqFromParams(HttpServletRequest req); public OCreds credsFromReq(TOKEN_REQ tokReq); diff --git a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper1_0.java b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper1_0.java index 027a51a7..d4852c1a 100644 --- a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper1_0.java +++ b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper1_0.java @@ -73,13 +73,13 @@ public class Mapper1_0 extends MapperIntrospect1_0 implements Mapper<TokenReques ////////////// 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; } |