summaryrefslogtreecommitdiffstats
path: root/auth/auth-certman/src
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-certman/src
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-certman/src')
-rw-r--r--auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/facade/Facade.java2
-rw-r--r--auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/facade/FacadeImpl.java4
-rw-r--r--auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/mapper/Mapper.java2
-rw-r--r--auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/mapper/Mapper1_0.java6
-rw-r--r--auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/mapper/Mapper2_0.java6
-rw-r--r--auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/JU_AAF_CM.java2
6 files changed, 11 insertions, 11 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;
}
diff --git a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/JU_AAF_CM.java b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/JU_AAF_CM.java
index 8841eb21..ab3172f0 100644
--- a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/JU_AAF_CM.java
+++ b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/JU_AAF_CM.java
@@ -201,7 +201,7 @@ public class JU_AAF_CM {
}
@Override
- protected TimeTaken newTimeTaken(String name, int flag) {
+ protected TimeTaken newTimeTaken(String name, int flag, Object ... values) {
// TODO Auto-generated method stub
TimeTaken tt= new TimeTaken("nameTest", Env.XML) {