summaryrefslogtreecommitdiffstats
path: root/auth/auth-oauth
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2019-02-03 06:09:34 -0600
committerInstrumental <jonathan.gathman@att.com>2019-02-03 06:09:46 -0600
commit59ffb7d529245c3bd0233dbf6cb0ae9fe9ccb856 (patch)
tree48f79984b766211d0f570f50485cbe288dd2f990 /auth/auth-oauth
parente36daf12cf4c5aa4b22fa3cec66a79ff2e2b8b94 (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-oauth')
-rw-r--r--auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/facade/OAFacade.java2
-rw-r--r--auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/facade/OAFacadeImpl.java4
-rw-r--r--auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper.java2
-rw-r--r--auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper1_0.java6
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;
}