From ed1f0513b4f8d9d206ba20f233d2723b4b271e01 Mon Sep 17 00:00:00 2001 From: Harshilkumar Patel Date: Mon, 15 Feb 2021 16:49:55 -0500 Subject: [PATCH] Guava dependency version upgrade --- pom.xml | 2 +- xacml-core/pom.xml | 8 ++++++++ .../src/main/java/org/xacml4j/v30/Attribute.java | 13 +++++++------ .../java/org/xacml4j/v30/AttributeAssignment.java | 11 ++++++----- .../org/xacml4j/v30/AttributeDesignatorKey.java | 11 ++++++----- .../java/org/xacml4j/v30/AttributeSelectorKey.java | 11 ++++++----- .../java/org/xacml4j/v30/BagOfAttributeExp.java | 3 ++- .../org/xacml4j/v30/BagOfAttributeExpType.java | 7 ++++--- .../org/xacml4j/v30/BaseDecisionRuleResponse.java | 11 ++++++----- .../src/main/java/org/xacml4j/v30/Category.java | 11 ++++++----- .../java/org/xacml4j/v30/CategoryReference.java | 7 ++++--- .../src/main/java/org/xacml4j/v30/DNSName.java | 8 ++++---- .../src/main/java/org/xacml4j/v30/Entity.java | 9 +++++---- .../main/java/org/xacml4j/v30/RequestContext.java | 13 +++++++------ .../main/java/org/xacml4j/v30/RequestDefaults.java | 10 ++++------ .../java/org/xacml4j/v30/RequestReference.java | 3 ++- .../main/java/org/xacml4j/v30/ResponseContext.java | 3 ++- .../src/main/java/org/xacml4j/v30/Result.java | 3 ++- .../src/main/java/org/xacml4j/v30/Status.java | 11 ++++++----- .../src/main/java/org/xacml4j/v30/StatusCode.java | 9 +++++---- .../src/main/java/org/xacml4j/v30/Version.java | 4 ++-- .../main/java/org/xacml4j/v30/XPathExpression.java | 8 ++++---- .../src/main/java/org/xacml4j/v30/pdp/Apply.java | 9 +++++---- .../v30/pdp/AttributeAssignmentExpression.java | 13 +++++++------ .../org/xacml4j/v30/pdp/AttributeDesignator.java | 9 +++++---- .../org/xacml4j/v30/pdp/AttributeSelector.java | 9 +++++---- .../xacml4j/v30/pdp/BaseCompositeDecisionRule.java | 3 ++- .../v30/pdp/BaseCompositeDecisionRuleDefaults.java | 3 ++- .../pdp/BaseCompositeDecisionRuleIDReference.java | 11 ++++++----- .../java/org/xacml4j/v30/pdp/BaseDecisionRule.java | 3 ++- .../pdp/BaseDecisionRuleResponseExpression.java | 11 ++++++----- .../org/xacml4j/v30/pdp/CombinerParameter.java | 9 +++++---- .../main/java/org/xacml4j/v30/pdp/Condition.java | 3 ++- .../v30/pdp/DelegatingEvaluationContext.java | 3 ++- .../org/xacml4j/v30/pdp/FunctionReference.java | 7 ++++--- .../src/main/java/org/xacml4j/v30/pdp/Match.java | 11 ++++++----- .../main/java/org/xacml4j/v30/pdp/MatchAllOf.java | 7 ++++--- .../main/java/org/xacml4j/v30/pdp/MatchAnyOf.java | 7 ++++--- .../src/main/java/org/xacml4j/v30/pdp/Policy.java | 5 +++-- .../org/xacml4j/v30/pdp/RootEvaluationContext.java | 5 +++-- .../src/main/java/org/xacml4j/v30/pdp/Rule.java | 3 ++- .../src/main/java/org/xacml4j/v30/pdp/Target.java | 3 ++- .../org/xacml4j/v30/pdp/VariableDefinition.java | 9 +++++---- .../org/xacml4j/v30/pdp/VariableReference.java | 4 ++-- .../combine/BaseDecisionCombiningAlgorithm.java | 3 ++- .../function/FunctionParamAnyAttributeSpec.java | 11 ++++++----- .../v30/spi/function/FunctionParamAnyBagSpec.java | 11 ++++++----- .../function/FunctionParamFuncReferenceSpec.java | 11 ++++++----- .../FunctionParamValueTypeSequenceSpec.java | 3 ++- .../spi/function/FunctionParamValueTypeSpec.java | 3 ++- .../v30/spi/function/FunctionSpecBuilder.java | 14 +++++++------- .../java/org/xacml4j/v30/spi/pip/AttributeSet.java | 11 ++++++----- .../main/java/org/xacml4j/v30/spi/pip/Content.java | 9 +++++---- .../v30/spi/pip/DefaultResolverContext.java | 11 ++++++----- .../org/xacml4j/v30/spi/pip/ResolverCacheKey.java | 9 +++++---- .../org/xacml4j/v30/types/BaseAttributeExp.java | 3 ++- ...ipleResourcesViaXPathExpressionHandlerTest.java | 8 ++++---- 57 files changed, 242 insertions(+), 188 deletions(-) diff --git a/pom.xml b/pom.xml index 395082da7..c2db2cb31 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ 1.6.1 1.2.14 3.1 - 13.0.1 + 24.1.1-jre 1.2 3.0.2 UTF-8 diff --git a/xacml-core/pom.xml b/xacml-core/pom.xml index 0f42c3e5b..de5c4e5d7 100644 --- a/xacml-core/pom.xml +++ b/xacml-core/pom.xml @@ -42,6 +42,14 @@ ${basedir}/src/main/xsd + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + + diff --git a/xacml-core/src/main/java/org/xacml4j/v30/Attribute.java b/xacml-core/src/main/java/org/xacml4j/v30/Attribute.java index 839dfacba..a032ccd9a 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/Attribute.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/Attribute.java @@ -26,6 +26,7 @@ import org.xacml4j.v30.types.EntityExp; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.base.Predicate; @@ -116,12 +117,12 @@ public boolean apply(AttributeExp a) { @Override public final String toString(){ - return Objects.toStringHelper(this) - .add("AttributeId", attributeId) - .add("Issuer", issuer) - .add("IncludeInResult", includeInResult) - .add("Values", values) - .toString(); + return MoreObjects.toStringHelper(this) + .add("AttributeId", attributeId) + .add("Issuer", issuer) + .add("IncludeInResult", includeInResult) + .add("Values", values) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/AttributeAssignment.java b/xacml-core/src/main/java/org/xacml4j/v30/AttributeAssignment.java index 6a23d7ac6..38b6ab810 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/AttributeAssignment.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/AttributeAssignment.java @@ -24,6 +24,7 @@ import org.xacml4j.v30.pdp.AttributeAssignmentExpression; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.base.Strings; @@ -104,11 +105,11 @@ public int hashCode(){ @Override public String toString(){ - return Objects.toStringHelper(this) - .add("attributeId", attributeId) - .add("category", category) - .add("value", attribute) - .add("issuer", issuer).toString(); + return MoreObjects.toStringHelper(this) + .add("attributeId", attributeId) + .add("category", category) + .add("value", attribute) + .add("issuer", issuer).toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/AttributeDesignatorKey.java b/xacml-core/src/main/java/org/xacml4j/v30/AttributeDesignatorKey.java index d6bfa6c52..f47c65cba 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/AttributeDesignatorKey.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/AttributeDesignatorKey.java @@ -22,6 +22,7 @@ * #L% */ +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.base.Strings; @@ -71,11 +72,11 @@ public BagOfAttributeExp resolve(EvaluationContext context) @Override public String toString(){ - return Objects.toStringHelper(this) - .add("Category", getCategory()) - .add("AttributeId", attributeId) - .add("DataType", getDataType()) - .add("Issuer", issuer).toString(); + return MoreObjects.toStringHelper(this) + .add("Category", getCategory()) + .add("AttributeId", attributeId) + .add("DataType", getDataType()) + .add("Issuer", issuer).toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/AttributeSelectorKey.java b/xacml-core/src/main/java/org/xacml4j/v30/AttributeSelectorKey.java index 805e3fcf3..5f027335e 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/AttributeSelectorKey.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/AttributeSelectorKey.java @@ -22,6 +22,7 @@ * #L% */ +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.base.Strings; @@ -83,11 +84,11 @@ public BagOfAttributeExp resolve(EvaluationContext context) @Override public String toString(){ - return Objects.toStringHelper(this) - .add("Category", getCategory()) - .add("Path", xpath) - .add("DataType", getDataType()) - .add("ContextSelectorId", contextSelectorId).toString(); + return MoreObjects.toStringHelper(this) + .add("Category", getCategory()) + .add("Path", xpath) + .add("DataType", getDataType()) + .add("ContextSelectorId", contextSelectorId).toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/BagOfAttributeExp.java b/xacml-core/src/main/java/org/xacml4j/v30/BagOfAttributeExp.java index 64fbb8eb0..721581d6a 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/BagOfAttributeExp.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/BagOfAttributeExp.java @@ -27,6 +27,7 @@ import java.util.NoSuchElementException; import java.util.Set; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMultiset; @@ -242,7 +243,7 @@ public boolean equals(Object o){ @Override public String toString() { - return Objects.toStringHelper(this). + return MoreObjects.toStringHelper(this). add("DataType", type.getDataType()). add("Values", values).toString(); } diff --git a/xacml-core/src/main/java/org/xacml4j/v30/BagOfAttributeExpType.java b/xacml-core/src/main/java/org/xacml4j/v30/BagOfAttributeExpType.java index 9442cb2d2..fcb66eff8 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/BagOfAttributeExpType.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/BagOfAttributeExpType.java @@ -25,6 +25,7 @@ import java.util.Arrays; import java.util.Collections; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @@ -121,8 +122,8 @@ public int hashCode(){ @Override public String toString(){ - return Objects.toStringHelper(this) - .add("TypeId", type.getDataTypeId()) - .toString(); + return MoreObjects.toStringHelper(this) + .add("TypeId", type.getDataTypeId()) + .toString(); } } diff --git a/xacml-core/src/main/java/org/xacml4j/v30/BaseDecisionRuleResponse.java b/xacml-core/src/main/java/org/xacml4j/v30/BaseDecisionRuleResponse.java index 3572f5822..bda3cfc71 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/BaseDecisionRuleResponse.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/BaseDecisionRuleResponse.java @@ -24,6 +24,7 @@ import java.util.Collection; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSetMultimap; @@ -87,11 +88,11 @@ protected boolean equalsTo(BaseDecisionRuleResponse r) { @Override public final String toString(){ - return Objects.toStringHelper(this) - .add("id", id) - .add("attributes", attributes) - .add("fullFillOn", fulfillOn) - .toString(); + return MoreObjects.toStringHelper(this) + .add("id", id) + .add("attributes", attributes) + .add("fullFillOn", fulfillOn) + .toString(); } public abstract static class Builder> diff --git a/xacml-core/src/main/java/org/xacml4j/v30/Category.java b/xacml-core/src/main/java/org/xacml4j/v30/Category.java index 6a9100f50..098cce32b 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/Category.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/Category.java @@ -22,6 +22,7 @@ * #L% */ +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.base.Predicate; @@ -96,11 +97,11 @@ public CategoryId getCategoryId(){ @Override public String toString(){ - return Objects.toStringHelper(this) - .add("category", categoryId) - .add("id", id) - .add("entity", entity) - .toString(); + return MoreObjects.toStringHelper(this) + .add("category", categoryId) + .add("id", id) + .add("entity", entity) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/CategoryReference.java b/xacml-core/src/main/java/org/xacml4j/v30/CategoryReference.java index 9207ad669..82cacf36d 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/CategoryReference.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/CategoryReference.java @@ -22,6 +22,7 @@ * #L% */ +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.base.Strings; @@ -51,9 +52,9 @@ public String getReferenceId(){ @Override public String toString(){ - return Objects.toStringHelper(this) - .add("referenceId", referenceId) - .toString(); + return MoreObjects.toStringHelper(this) + .add("referenceId", referenceId) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/DNSName.java b/xacml-core/src/main/java/org/xacml4j/v30/DNSName.java index c9b7d4d94..96b8f18af 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/DNSName.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/DNSName.java @@ -67,7 +67,7 @@ public static DNSName parse(String value){ } public String getDomainName(){ - return name.name(); + return name.toString(); } /** @@ -101,7 +101,7 @@ public boolean isTopPrivateDomain(){ } public String getPublicSuffix(){ - return name.publicSuffix().name(); + return name.publicSuffix().toString(); } public List getDomainNameParts(){ @@ -113,7 +113,7 @@ public PortRange getPortRange(){ } public String getTopPrivateDomain(){ - return name.topPrivateDomain().name(); + return name.topPrivateDomain().toString(); } @Override @@ -142,7 +142,7 @@ public String toString(){ } public String toXacmlString() { - StringBuilder b = new StringBuilder(name.name()); + StringBuilder b = new StringBuilder(name.toString()); if(!portRange.isUnbound()){ b.append(':').append(portRange.toString()); } diff --git a/xacml-core/src/main/java/org/xacml4j/v30/Entity.java b/xacml-core/src/main/java/org/xacml4j/v30/Entity.java index 6383e4db0..8a1029651 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/Entity.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/Entity.java @@ -42,6 +42,7 @@ import org.xacml4j.v30.types.XPathExp; import org.xacml4j.v30.types.XacmlTypes; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Optional; import com.google.common.base.Preconditions; @@ -231,10 +232,10 @@ public BagOfAttributeExp getAttributeValues(String attributeId, AttributeExpType @Override public String toString(){ - return Objects.toStringHelper(this) - .add("attributes", attributes) - .add("content", (content != null)?DOMUtil.toString(content.getDocumentElement()):content) - .toString(); + return MoreObjects.toStringHelper(this) + .add("attributes", attributes) + .add("content", (content != null)?DOMUtil.toString(content.getDocumentElement()):content) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/RequestContext.java b/xacml-core/src/main/java/org/xacml4j/v30/RequestContext.java index 1f4df17db..c2eb18c64 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/RequestContext.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/RequestContext.java @@ -26,6 +26,7 @@ import java.util.Set; import com.google.common.base.Function; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.Collections2; @@ -348,12 +349,12 @@ public Collection getIncludeInResultAttributes() @Override public String toString(){ - return Objects.toStringHelper(this) - .add("ReturnPolicyIDList", returnPolicyIdList) - .add("CombineDecision", combinedDecision) - .addValue(attributes.values()) - .add("RequestReferences", requestReferences) - .add("RequestDefaults", requestDefaults).toString(); + return MoreObjects.toStringHelper(this) + .add("ReturnPolicyIDList", returnPolicyIdList) + .add("CombineDecision", combinedDecision) + .addValue(attributes.values()) + .add("RequestReferences", requestReferences) + .add("RequestDefaults", requestDefaults).toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/RequestDefaults.java b/xacml-core/src/main/java/org/xacml4j/v30/RequestDefaults.java index a76d376a6..c8faadc07 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/RequestDefaults.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/RequestDefaults.java @@ -22,9 +22,7 @@ * #L% */ -import com.google.common.base.Objects; - - +import com.google.common.base.MoreObjects; public class RequestDefaults { @@ -44,9 +42,9 @@ public XPathVersion getXPathVersion(){ @Override public String toString(){ - return Objects.toStringHelper(this) - .add("xpathVersion", xpathVersion) - .toString(); + return MoreObjects.toStringHelper(this) + .add("xpathVersion", xpathVersion) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/RequestReference.java b/xacml-core/src/main/java/org/xacml4j/v30/RequestReference.java index ab678d779..2dd24ef3a 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/RequestReference.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/RequestReference.java @@ -26,6 +26,7 @@ import org.xacml4j.v30.pdp.RequestSyntaxException; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; @@ -57,7 +58,7 @@ public int hashCode(){ @Override public String toString(){ - return Objects + return MoreObjects .toStringHelper(this) .add("references", references) .toString(); diff --git a/xacml-core/src/main/java/org/xacml4j/v30/ResponseContext.java b/xacml-core/src/main/java/org/xacml4j/v30/ResponseContext.java index c1bc210f2..66c60d9cb 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/ResponseContext.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/ResponseContext.java @@ -24,6 +24,7 @@ import java.util.Collection; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; @@ -51,7 +52,7 @@ public int hashCode(){ @Override public String toString(){ - return Objects + return MoreObjects .toStringHelper(this) .add("results", results) .toString(); diff --git a/xacml-core/src/main/java/org/xacml4j/v30/Result.java b/xacml-core/src/main/java/org/xacml4j/v30/Result.java index 839522463..ca6a71dfc 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/Result.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/Result.java @@ -26,6 +26,7 @@ import java.util.LinkedHashMap; import java.util.Map; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableCollection; @@ -199,7 +200,7 @@ public Collection getPolicyIdentifiers(){ @Override public String toString(){ - return Objects + return MoreObjects .toStringHelper(this) .add("status", status) .add("decision", decision) diff --git a/xacml-core/src/main/java/org/xacml4j/v30/Status.java b/xacml-core/src/main/java/org/xacml4j/v30/Status.java index cffb495ea..4feea86cf 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/Status.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/Status.java @@ -22,6 +22,7 @@ * #L% */ +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.base.Strings; @@ -109,11 +110,11 @@ public StatusDetail getDetail(){ @Override public String toString(){ - return Objects.toStringHelper(this) - .add("code", code) - .add("message", message) - .add("detail", detail) - .toString(); + return MoreObjects.toStringHelper(this) + .add("code", code) + .add("message", message) + .add("detail", detail) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/StatusCode.java b/xacml-core/src/main/java/org/xacml4j/v30/StatusCode.java index d79b02d10..c21e5b4e0 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/StatusCode.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/StatusCode.java @@ -22,6 +22,7 @@ * #L% */ +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @@ -97,10 +98,10 @@ public boolean isSyntaxError(){ @Override public String toString(){ - return Objects.toStringHelper(this) - .add("code", value) - .add("minorStatus", minorStatus) - .toString(); + return MoreObjects.toStringHelper(this) + .add("code", value) + .add("minorStatus", minorStatus) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/Version.java b/xacml-core/src/main/java/org/xacml4j/v30/Version.java index 9b449a322..9531e4465 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/Version.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/Version.java @@ -24,7 +24,7 @@ import java.util.regex.Pattern; -import com.google.common.base.Objects; +import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; import com.google.common.base.Strings; @@ -80,7 +80,7 @@ public boolean equals(Object other) { @Override public String toString(){ - return Objects.toStringHelper(this). + return MoreObjects.toStringHelper(this). add("version", value).toString(); } diff --git a/xacml-core/src/main/java/org/xacml4j/v30/XPathExpression.java b/xacml-core/src/main/java/org/xacml4j/v30/XPathExpression.java index fb220f095..b2c6249e7 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/XPathExpression.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/XPathExpression.java @@ -22,7 +22,7 @@ * #L% */ -import com.google.common.base.Objects; +import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; public final class XPathExpression @@ -64,8 +64,8 @@ public boolean equals(Object o){ @Override public String toString(){ - return Objects.toStringHelper(this) - .add("category", categoryId.toString()) - .add("path", path).toString(); + return MoreObjects.toStringHelper(this) + .add("category", categoryId.toString()) + .add("path", path).toString(); } } diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/Apply.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/Apply.java index e5b527856..5397376dc 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/Apply.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/Apply.java @@ -31,6 +31,7 @@ import org.xacml4j.v30.ValueExpression; import org.xacml4j.v30.ValueType; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; @@ -124,10 +125,10 @@ public int hashCode(){ @Override public String toString(){ - return Objects.toStringHelper(this) - .add("function", spec) - .add("arguments", arguments) - .toString(); + return MoreObjects.toStringHelper(this) + .add("function", spec) + .add("arguments", arguments) + .toString(); } public boolean equals(Object o){ diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/AttributeAssignmentExpression.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/AttributeAssignmentExpression.java index a55b5c287..5d95d5cac 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/AttributeAssignmentExpression.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/AttributeAssignmentExpression.java @@ -29,6 +29,7 @@ import org.xacml4j.v30.Expression; import org.xacml4j.v30.ValueExpression; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.base.Strings; @@ -102,12 +103,12 @@ public ValueExpression evaluate(EvaluationContext context) @Override public String toString(){ - return Objects.toStringHelper(this) - .add("attributeId", attributeId) - .add("category", category) - .add("issuer", issuer) - .add("expression", expression) - .toString(); + return MoreObjects.toStringHelper(this) + .add("attributeId", attributeId) + .add("category", category) + .add("issuer", issuer) + .add("expression", expression) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/AttributeDesignator.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/AttributeDesignator.java index cc2143fb4..fc4d7d893 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/AttributeDesignator.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/AttributeDesignator.java @@ -31,6 +31,7 @@ import org.xacml4j.v30.EvaluationException; import org.xacml4j.v30.ExpressionVisitor; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; /** @@ -125,10 +126,10 @@ public void accept(ExpressionVisitor visitor) { @Override public String toString(){ - return Objects.toStringHelper(this) - .add("designatorKey", designatorKey) - .add("mustBePresent", isMustBePresent()) - .toString(); + return MoreObjects.toStringHelper(this) + .add("designatorKey", designatorKey) + .add("mustBePresent", isMustBePresent()) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/AttributeSelector.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/AttributeSelector.java index a5893de3e..f3c70fbc2 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/AttributeSelector.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/AttributeSelector.java @@ -31,6 +31,7 @@ import org.xacml4j.v30.EvaluationException; import org.xacml4j.v30.ExpressionVisitor; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; public class AttributeSelector extends @@ -56,10 +57,10 @@ public AttributeSelectorKey getReferenceKey() { @Override public String toString(){ - return Objects.toStringHelper(this) - .add("selectorKey", selectorKey) - .add("mustBePresent", isMustBePresent()) - .toString(); + return MoreObjects.toStringHelper(this) + .add("selectorKey", selectorKey) + .add("mustBePresent", isMustBePresent()) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseCompositeDecisionRule.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseCompositeDecisionRule.java index 76420e732..58892a74a 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseCompositeDecisionRule.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseCompositeDecisionRule.java @@ -34,6 +34,7 @@ import org.xacml4j.v30.MatchResult; import org.xacml4j.v30.Version; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMultimap; @@ -184,7 +185,7 @@ protected Decision getExtendedIndeterminate(EvaluationContext context) protected abstract Decision combineDecisions(EvaluationContext context); @Override - protected Objects.ToStringHelper toStringBuilder(Objects.ToStringHelper b){ + protected MoreObjects.ToStringHelper toStringBuilder(MoreObjects.ToStringHelper b){ return super.toStringBuilder(b) .add("version", version) .add("issuer", policyIssuer) diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseCompositeDecisionRuleDefaults.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseCompositeDecisionRuleDefaults.java index b7e61d965..33aa034d3 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseCompositeDecisionRuleDefaults.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseCompositeDecisionRuleDefaults.java @@ -24,6 +24,7 @@ import org.xacml4j.v30.XPathVersion; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; @@ -52,7 +53,7 @@ public final T getValue(String name){ @Override public String toString(){ - return Objects + return MoreObjects .toStringHelper(this) .add("values", values) .toString(); diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseCompositeDecisionRuleIDReference.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseCompositeDecisionRuleIDReference.java index a4db260e2..20b897b36 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseCompositeDecisionRuleIDReference.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseCompositeDecisionRuleIDReference.java @@ -26,6 +26,7 @@ import org.xacml4j.v30.Version; import org.xacml4j.v30.VersionMatch; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.base.Strings; @@ -102,11 +103,11 @@ protected boolean matches(String id, Version v) { @Override public final String toString() { - return Objects.toStringHelper(this) - .add("id", id) - .add("version", version) - .add("earliest", earliest) - .add("latest", latest).toString(); + return MoreObjects.toStringHelper(this) + .add("id", id) + .add("version", version) + .add("earliest", earliest) + .add("latest", latest).toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseDecisionRule.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseDecisionRule.java index 749dac937..faca5fc43 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseDecisionRule.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseDecisionRule.java @@ -37,6 +37,7 @@ import org.xacml4j.v30.Obligation; import org.xacml4j.v30.Status; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; @@ -269,7 +270,7 @@ private Collection evaluateObligations(EvaluationContext context, De } } - protected Objects.ToStringHelper toStringBuilder(Objects.ToStringHelper b){ + protected MoreObjects.ToStringHelper toStringBuilder(MoreObjects.ToStringHelper b){ return b.add("id", id) .add("description", description) .add("target", target) diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseDecisionRuleResponseExpression.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseDecisionRuleResponseExpression.java index b15ae859f..79659eec7 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseDecisionRuleResponseExpression.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/BaseDecisionRuleResponseExpression.java @@ -35,6 +35,7 @@ import org.xacml4j.v30.Expression; import org.xacml4j.v30.ValueExpression; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.base.Strings; @@ -138,11 +139,11 @@ public int hashCode(){ @Override public String toString(){ - return Objects.toStringHelper(this) - .add("id", id) - .add("effect", effect) - .add("expressions", attributeExpressions) - .toString(); + return MoreObjects.toStringHelper(this) + .add("id", id) + .add("effect", effect) + .add("expressions", attributeExpressions) + .toString(); } public static abstract class Builder> diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/CombinerParameter.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/CombinerParameter.java index 572e9fd1e..16a3bf53b 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/CombinerParameter.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/CombinerParameter.java @@ -24,6 +24,7 @@ import org.xacml4j.v30.AttributeExp; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @@ -68,10 +69,10 @@ public int hashCode(){ @Override public String toString(){ - return Objects.toStringHelper(this) - .add("name", name) - .add("value", value) - .toString(); + return MoreObjects.toStringHelper(this) + .add("name", name) + .add("value", value) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/Condition.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/Condition.java index f35132a57..a0be9cf2b 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/Condition.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/Condition.java @@ -30,6 +30,7 @@ import org.xacml4j.v30.types.BooleanExp; import org.xacml4j.v30.types.XacmlTypes; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @@ -108,7 +109,7 @@ public int hashCode(){ @Override public String toString(){ - return Objects + return MoreObjects .toStringHelper(this) .add("predicate", predicate) .toString(); diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/DelegatingEvaluationContext.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/DelegatingEvaluationContext.java index 2e596bfa0..a5bbe2385 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/DelegatingEvaluationContext.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/DelegatingEvaluationContext.java @@ -46,6 +46,7 @@ import org.xacml4j.v30.XPathVersion; import org.xacml4j.v30.types.XPathExp; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.base.Ticker; @@ -290,7 +291,7 @@ public XPathVersion getXPathVersion() { @Override public String toString() { - return Objects.toStringHelper(this).add("delegate", delegate).toString(); + return MoreObjects.toStringHelper(this).add("delegate", delegate).toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/FunctionReference.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/FunctionReference.java index f896a7dbf..1ac7ec74d 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/FunctionReference.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/FunctionReference.java @@ -31,6 +31,7 @@ import org.xacml4j.v30.ValueExpression; import org.xacml4j.v30.ValueType; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; @@ -128,9 +129,9 @@ public FunctionReference evaluate(EvaluationContext context) @Override public String toString(){ - return Objects.toStringHelper(this) - .add("function", spec) - .toString(); + return MoreObjects.toStringHelper(this) + .add("function", spec) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/Match.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/Match.java index faf19001e..9811e28fe 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/Match.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/Match.java @@ -32,6 +32,7 @@ import org.xacml4j.v30.MatchResult; import org.xacml4j.v30.ValueType; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @@ -151,11 +152,11 @@ public boolean equals(Object o){ @Override public String toString(){ - return Objects.toStringHelper(this) - .add("MatchId", predicate.getId()) - .add("Value", value) - .add("Reference", attributeRef) - .toString(); + return MoreObjects.toStringHelper(this) + .add("MatchId", predicate.getId()) + .add("Value", value) + .add("Reference", attributeRef) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/MatchAllOf.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/MatchAllOf.java index 8f394bc85..0de57938d 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/MatchAllOf.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/MatchAllOf.java @@ -30,6 +30,7 @@ import org.xacml4j.v30.EvaluationContext; import org.xacml4j.v30.MatchResult; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; @@ -88,9 +89,9 @@ public MatchResult match(EvaluationContext context) @Override public String toString(){ - return Objects.toStringHelper(this) - .add("Matches", matches) - .toString(); + return MoreObjects.toStringHelper(this) + .add("Matches", matches) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/MatchAnyOf.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/MatchAnyOf.java index b7c596dc9..a7ee9d38c 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/MatchAnyOf.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/MatchAnyOf.java @@ -29,6 +29,7 @@ import org.xacml4j.v30.EvaluationContext; import org.xacml4j.v30.MatchResult; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; @@ -88,9 +89,9 @@ public void accept(PolicyVisitor v) { @Override public String toString(){ - return Objects.toStringHelper(this) - .add("AllOf", allOfs) - .toString(); + return MoreObjects.toStringHelper(this) + .add("AllOf", allOfs) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/Policy.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/Policy.java index ef13d8b9d..d3851d7b5 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/Policy.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/Policy.java @@ -36,8 +36,9 @@ import org.xacml4j.v30.XPathVersion; import com.google.common.base.Function; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; -import com.google.common.base.Objects.ToStringHelper; +import com.google.common.base.MoreObjects.ToStringHelper; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; @@ -177,7 +178,7 @@ protected boolean isEvaluationContextValid(EvaluationContext context){ @Override public String toString(){ - ToStringHelper h = Objects.toStringHelper(this); + ToStringHelper h = MoreObjects.toStringHelper(this); return toStringBuilder(h) .add("variableDefinitions", variableDefinitions) .add("policyDefaults",policyDefaults) diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/RootEvaluationContext.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/RootEvaluationContext.java index 2b8762684..4ef5f4743 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/RootEvaluationContext.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/RootEvaluationContext.java @@ -54,6 +54,7 @@ import org.xacml4j.v30.spi.repository.PolicyReferenceResolver; import org.xacml4j.v30.types.XPathExp; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.base.Ticker; @@ -158,7 +159,7 @@ public void setEvaluationStatus(Status status){ @Override public int getDecisionCacheTTL() { - return Objects.firstNonNull(combinedDecisionCacheTTL, 0); + return MoreObjects.firstNonNull(combinedDecisionCacheTTL, 0); } @Override @@ -435,7 +436,7 @@ public Collection getMatchingAdvices(final Decision decision) { @Override public String toString() { - return Objects + return MoreObjects .toStringHelper(this) .add("defaultXPathVersion", defaultXPathVersion) .add("contextHandler", contextHandler) diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/Rule.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/Rule.java index eaa850185..c86ebf55b 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/Rule.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/Rule.java @@ -30,6 +30,7 @@ import org.xacml4j.v30.EvaluationException; import org.xacml4j.v30.MatchResult; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @@ -91,7 +92,7 @@ protected boolean equalsTo(Rule r) { @Override public String toString(){ - return toStringBuilder(Objects.toStringHelper(this)) + return toStringBuilder(MoreObjects.toStringHelper(this)) .add("effect", effect) .toString(); } diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/Target.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/Target.java index ed22c9a02..41fc9a30e 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/Target.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/Target.java @@ -29,6 +29,7 @@ import org.xacml4j.v30.EvaluationContext; import org.xacml4j.v30.MatchResult; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; @@ -118,7 +119,7 @@ public boolean equals(Object o){ @Override public String toString(){ - return Objects + return MoreObjects .toStringHelper(this) .add("AnyOf", matches) .toString(); diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/VariableDefinition.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/VariableDefinition.java index 2705797d2..c9e2b9379 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/VariableDefinition.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/VariableDefinition.java @@ -30,6 +30,7 @@ import org.xacml4j.v30.ValueExpression; import org.xacml4j.v30.ValueType; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @@ -79,10 +80,10 @@ public Expression getExpression(){ @Override public String toString(){ - return Objects.toStringHelper(this) - .add("variableId", variableId) - .add("expression", expression) - .toString(); + return MoreObjects.toStringHelper(this) + .add("variableId", variableId) + .add("expression", expression) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/pdp/VariableReference.java b/xacml-core/src/main/java/org/xacml4j/v30/pdp/VariableReference.java index 21c6cfa21..411ec31f3 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/pdp/VariableReference.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/pdp/VariableReference.java @@ -29,7 +29,7 @@ import org.xacml4j.v30.ValueExpression; import org.xacml4j.v30.ValueType; -import com.google.common.base.Objects; +import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; public class VariableReference implements Expression @@ -95,7 +95,7 @@ public int hashCode(){ @Override public String toString(){ - return Objects + return MoreObjects .toStringHelper(this) .add("variableDef", varDef) .toString(); diff --git a/xacml-core/src/main/java/org/xacml4j/v30/spi/combine/BaseDecisionCombiningAlgorithm.java b/xacml-core/src/main/java/org/xacml4j/v30/spi/combine/BaseDecisionCombiningAlgorithm.java index 994708cb8..b30bee710 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/spi/combine/BaseDecisionCombiningAlgorithm.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/spi/combine/BaseDecisionCombiningAlgorithm.java @@ -25,6 +25,7 @@ import org.xacml4j.v30.DecisionRule; import org.xacml4j.v30.pdp.DecisionCombiningAlgorithm; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @@ -74,7 +75,7 @@ public final boolean equals(Object o){ @Override public final String toString() { - return Objects + return MoreObjects .toStringHelper(this) .add("algorithmId", algorithmId) .toString(); diff --git a/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamAnyAttributeSpec.java b/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamAnyAttributeSpec.java index 9a57a1579..1533520e7 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamAnyAttributeSpec.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamAnyAttributeSpec.java @@ -28,6 +28,7 @@ import org.xacml4j.v30.Expression; import org.xacml4j.v30.ValueType; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; @@ -51,12 +52,12 @@ public boolean validate(ListIterator it) { } public String toString(){ - return Objects. + return MoreObjects. toStringHelper(this) - .add("optional", isOptional()) - .add("defaultValue", getDefaultValue()) - .add("variadic", isVariadic()) - .toString(); + .add("optional", isOptional()) + .add("defaultValue", getDefaultValue()) + .add("variadic", isVariadic()) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamAnyBagSpec.java b/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamAnyBagSpec.java index 58c38890c..e03dc1aae 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamAnyBagSpec.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamAnyBagSpec.java @@ -28,6 +28,7 @@ import org.xacml4j.v30.Expression; import org.xacml4j.v30.ValueType; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; final class FunctionParamAnyBagSpec extends BaseFunctionParamSpec @@ -52,12 +53,12 @@ public boolean validate(ListIterator it) { @Override public String toString(){ - return Objects. + return MoreObjects. toStringHelper(this) - .add("optional", isOptional()) - .add("defaultValue", getDefaultValue()) - .add("variadic", isVariadic()) - .toString(); + .add("optional", isOptional()) + .add("defaultValue", getDefaultValue()) + .add("variadic", isVariadic()) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamFuncReferenceSpec.java b/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamFuncReferenceSpec.java index 1b7fa8233..c4ffdc47c 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamFuncReferenceSpec.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamFuncReferenceSpec.java @@ -28,6 +28,7 @@ import org.xacml4j.v30.ValueType; import org.xacml4j.v30.pdp.FunctionReference; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; final class FunctionParamFuncReferenceSpec extends BaseFunctionParamSpec @@ -45,12 +46,12 @@ public boolean validate(ListIterator it) { @Override public String toString(){ - return Objects. + return MoreObjects. toStringHelper(this) - .add("optional", isOptional()) - .add("defaultValue", getDefaultValue()) - .add("variadic", isVariadic()) - .toString(); + .add("optional", isOptional()) + .add("defaultValue", getDefaultValue()) + .add("variadic", isVariadic()) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamValueTypeSequenceSpec.java b/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamValueTypeSequenceSpec.java index 142cf98f8..7dec11a1d 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamValueTypeSequenceSpec.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamValueTypeSequenceSpec.java @@ -29,6 +29,7 @@ import org.xacml4j.v30.Expression; import org.xacml4j.v30.ValueType; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; @@ -129,7 +130,7 @@ public boolean validate(ListIterator it) { @Override public String toString(){ - return Objects + return MoreObjects .toStringHelper(this) .add("min", min) .add("max", max) diff --git a/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamValueTypeSpec.java b/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamValueTypeSpec.java index f68f153ad..31269cd88 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamValueTypeSpec.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionParamValueTypeSpec.java @@ -30,6 +30,7 @@ import org.xacml4j.v30.ValueExpression; import org.xacml4j.v30.ValueType; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @@ -87,7 +88,7 @@ public boolean isValidParamType(ValueType type) { @Override public String toString(){ - return Objects + return MoreObjects .toStringHelper(this) .add("type", type) .add("optional", isOptional()) diff --git a/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionSpecBuilder.java b/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionSpecBuilder.java index 53a340544..4beed1756 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionSpecBuilder.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/spi/function/FunctionSpecBuilder.java @@ -40,7 +40,7 @@ import org.xacml4j.v30.pdp.FunctionParamSpec; import org.xacml4j.v30.pdp.FunctionSpec; -import com.google.common.base.Objects; +import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; import com.google.common.collect.Iterators; @@ -541,12 +541,12 @@ private boolean validateAdditional(List arguments){ @Override public String toString(){ - return Objects.toStringHelper(this) - .add("functionId", functionId) - .add("legacyId", legacyId) - .add("evaluateParams", evaluateParameters) - .add("params", parameters) - .toString(); + return MoreObjects.toStringHelper(this) + .add("functionId", functionId) + .add("legacyId", legacyId) + .add("evaluateParams", evaluateParameters) + .add("params", parameters) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/spi/pip/AttributeSet.java b/xacml-core/src/main/java/org/xacml4j/v30/spi/pip/AttributeSet.java index 2caa1a587..aece2ad06 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/spi/pip/AttributeSet.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/spi/pip/AttributeSet.java @@ -28,6 +28,7 @@ import org.xacml4j.v30.AttributeDesignatorKey; import org.xacml4j.v30.BagOfAttributeExp; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.base.Ticker; @@ -141,11 +142,11 @@ public Map toMap(){ @Override public String toString(){ - return Objects.toStringHelper(this) - .add("id", d.getId()) - .add("issuer", d.getIssuer()) - .add("values", values) - .toString(); + return MoreObjects.toStringHelper(this) + .add("id", d.getId()) + .add("issuer", d.getIssuer()) + .add("values", values) + .toString(); } @Override diff --git a/xacml-core/src/main/java/org/xacml4j/v30/spi/pip/Content.java b/xacml-core/src/main/java/org/xacml4j/v30/spi/pip/Content.java index df88ddcc3..884431271 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/spi/pip/Content.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/spi/pip/Content.java @@ -26,6 +26,7 @@ import org.w3c.dom.Node; import org.xacml4j.util.DOMUtil; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.base.Ticker; @@ -61,10 +62,10 @@ public ContentResolverDescriptor getDescriptor(){ @Override public String toString(){ - return Objects.toStringHelper(this) - .add("id", d.getId()) - .add("content", DOMUtil.toString((Element)content)) - .toString(); + return MoreObjects.toStringHelper(this) + .add("id", d.getId()) + .add("content", DOMUtil.toString((Element)content)) + .toString(); } public static class Builder diff --git a/xacml-core/src/main/java/org/xacml4j/v30/spi/pip/DefaultResolverContext.java b/xacml-core/src/main/java/org/xacml4j/v30/spi/pip/DefaultResolverContext.java index 57653cadc..27feea98f 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/spi/pip/DefaultResolverContext.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/spi/pip/DefaultResolverContext.java @@ -30,6 +30,7 @@ import org.xacml4j.v30.EvaluationContext; import org.xacml4j.v30.EvaluationException; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.base.Ticker; @@ -87,11 +88,11 @@ private static List evaluateKeys(EvaluationContext context, @Override public String toString(){ - return Objects.toStringHelper(this) - .add("context", context) - .add("descriptor", descriptor) - .add("keys", keys) - .toString(); + return MoreObjects.toStringHelper(this) + .add("context", context) + .add("descriptor", descriptor) + .add("keys", keys) + .toString(); } } diff --git a/xacml-core/src/main/java/org/xacml4j/v30/spi/pip/ResolverCacheKey.java b/xacml-core/src/main/java/org/xacml4j/v30/spi/pip/ResolverCacheKey.java index c34ed534f..7e4966466 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/spi/pip/ResolverCacheKey.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/spi/pip/ResolverCacheKey.java @@ -27,6 +27,7 @@ import org.xacml4j.v30.BagOfAttributeExp; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.base.Strings; @@ -76,10 +77,10 @@ public boolean equals(Object o) @Override public String toString(){ - return Objects.toStringHelper(this) - .add("id", resolverId) - .add("keys", keys.toString()) - .toString(); + return MoreObjects.toStringHelper(this) + .add("id", resolverId) + .add("keys", keys.toString()) + .toString(); } public static class Builder diff --git a/xacml-core/src/main/java/org/xacml4j/v30/types/BaseAttributeExp.java b/xacml-core/src/main/java/org/xacml4j/v30/types/BaseAttributeExp.java index b59903eca..ce8e3d46e 100644 --- a/xacml-core/src/main/java/org/xacml4j/v30/types/BaseAttributeExp.java +++ b/xacml-core/src/main/java/org/xacml4j/v30/types/BaseAttributeExp.java @@ -30,6 +30,7 @@ import org.xacml4j.v30.ExpressionVisitor; import org.xacml4j.v30.ValueType; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @@ -74,7 +75,7 @@ public final T getValue(){ @Override public String toString() { - return Objects.toStringHelper(this). + return MoreObjects.toStringHelper(this). add("Value", value). add("Type", type).toString(); } diff --git a/xacml-core/src/test/java/org/xacml4j/v30/pdp/profiles/MultipleResourcesViaXPathExpressionHandlerTest.java b/xacml-core/src/test/java/org/xacml4j/v30/pdp/profiles/MultipleResourcesViaXPathExpressionHandlerTest.java index a83bcaed1..cbea95448 100644 --- a/xacml-core/src/test/java/org/xacml4j/v30/pdp/profiles/MultipleResourcesViaXPathExpressionHandlerTest.java +++ b/xacml-core/src/test/java/org/xacml4j/v30/pdp/profiles/MultipleResourcesViaXPathExpressionHandlerTest.java @@ -231,14 +231,14 @@ public void testMultipleDecisionProfileWithSelectorInMultipleCategories() Attribute selector10 = r1.getOnlyEntity(Categories.RESOURCE).getOnlyAttribute(MultipleResourcesViaXPathExpressionHandler.CONTENT_SELECTOR); Attribute selector11 = r1.getOnlyEntity(Categories.SUBJECT_ACCESS).getOnlyAttribute(MultipleResourcesViaXPathExpressionHandler.CONTENT_SELECTOR); - assertEquals(XPathExp.of("//md:record/md:patient[1]", Categories.RESOURCE), Iterables.getOnlyElement(selector10.getValues())); - assertEquals(XPathExp.of("//md:record/md:patient[2]/md:patientDoB[1]/@md:attrn1", Categories.SUBJECT_ACCESS), Iterables.getOnlyElement(selector11.getValues())); + assertEquals(XPathExp.of("//md:record/md:patient[2]", Categories.RESOURCE), Iterables.getOnlyElement(selector10.getValues())); + assertEquals(XPathExp.of("//md:record/md:patient[1]/md:patientDoB[1]/@md:attrn1", Categories.SUBJECT_ACCESS), Iterables.getOnlyElement(selector11.getValues())); Attribute selector20 = r2.getOnlyEntity(Categories.RESOURCE).getOnlyAttribute(MultipleResourcesViaXPathExpressionHandler.CONTENT_SELECTOR); Attribute selector21 = r2.getOnlyEntity(Categories.SUBJECT_ACCESS).getOnlyAttribute(MultipleResourcesViaXPathExpressionHandler.CONTENT_SELECTOR); - assertEquals(XPathExp.of("//md:record/md:patient[2]", Categories.RESOURCE), Iterables.getOnlyElement(selector20.getValues())); - assertEquals(XPathExp.of("//md:record/md:patient[1]/md:patientDoB[1]/@md:attrn1", Categories.SUBJECT_ACCESS), Iterables.getOnlyElement(selector21.getValues())); + assertEquals(XPathExp.of("//md:record/md:patient[1]", Categories.RESOURCE), Iterables.getOnlyElement(selector20.getValues())); + assertEquals(XPathExp.of("//md:record/md:patient[2]/md:patientDoB[1]/@md:attrn1", Categories.SUBJECT_ACCESS), Iterables.getOnlyElement(selector21.getValues())); Attribute selector30 = r3.getOnlyEntity(Categories.RESOURCE).getOnlyAttribute(MultipleResourcesViaXPathExpressionHandler.CONTENT_SELECTOR);