X-Git-Url: https://gerrit.onap.org/r/gitweb?p=dmaap%2Fdatarouter.git;a=blobdiff_plain;f=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fauthz%2Fimpl%2FAuthRespImpl.java;h=c7d71996a3107bec524f21e5869c0d2639c4a57f;hp=f32783327f94923a4ecc2844eefc66d9a3b35397;hb=00cc27b0fa1346435c7685300286f1adc98b69fb;hpb=98572b78fcce9ff28fa7429c9265812bd1e78bf2
diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/authz/impl/AuthRespImpl.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/authz/impl/AuthRespImpl.java
index f3278332..c7d71996 100644
--- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/authz/impl/AuthRespImpl.java
+++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/authz/impl/AuthRespImpl.java
@@ -44,21 +44,23 @@ public class AuthRespImpl implements AuthorizationResponse {
/** Constructor. This version will not be used in Data Router R1 since we will not have advice and obligations.
*
* @param authorized flag indicating whether the response carried a permit response (true
)
- * or something else (false
).
+ * or something else (false
).
* @param advice list of advice elements returned in the response.
* @param obligations list of obligation elements returned in the response.
*/
- public AuthRespImpl(boolean authorized, List advice, List obligations) {
+ private AuthRespImpl(boolean authorized, List advice,
+ List obligations) {
this.authorized = authorized;
- this.advice = (advice == null ? null : new ArrayList (advice));
- this.obligations = (obligations == null ? null : new ArrayList (obligations));
+ this.advice = (advice == null ? null : new ArrayList<>(advice));
+ this.obligations = (obligations == null ? null : new ArrayList<>(obligations));
}
/** Constructor. Simple version for authorization responses that have no advice and no obligations.
*
- * @param authorized flag indicating whether the response carried a permit (true
) or something else (false
).
+ * @param authorized flag indicating whether the response carried a permit (true
)
+ * or something else (false
).
*/
- public AuthRespImpl(boolean authorized) {
+ AuthRespImpl(boolean authorized) {
this(authorized, null, null);
}
@@ -69,25 +71,25 @@ public class AuthRespImpl implements AuthorizationResponse {
*/
@Override
public boolean isAuthorized() {
- return authorized;
+ return authorized;
}
/**
* Returns any advice elements that were included in the authorization response.
*
- * @return A list of objects implementing the AuthorizationResponseSupplement
interface, with each object representing an
- * advice element from the authorization response.
+ * @return A list of objects implementing the AuthorizationResponseSupplement
interface,
+ * with each object representing an advice element from the authorization response.
*/
@Override
public List getAdvice() {
- return advice;
+ return advice;
}
/**
* Returns any obligation elements that were included in the authorization response.
*
- * @return A list of objects implementing the AuthorizationResponseSupplement
interface, with each object representing an
- * obligation element from the authorization response.
+ * @return A list of objects implementing the AuthorizationResponseSupplement
interface,
+ * with each object representing an obligation element from the authorization response.
*/
@Override
public List getObligations() {