You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by dk...@apache.org on 2019/10/31 14:36:30 UTC
[ws-wss4j] 04/05: JDK 1.5.x compilation fixes.
This is an automated email from the ASF dual-hosted git repository.
dkulp pushed a commit to annotated tag 1_6_0-alpha
in repository https://gitbox.apache.org/repos/asf/ws-wss4j.git
commit 7c2987443a1effc2b11a1f8af3bae61e52a15107
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Thu Feb 10 18:11:28 2011 +0000
JDK 1.5.x compilation fixes.
---
src/main/java/org/apache/ws/security/message/token/Reference.java | 2 +-
.../apache/ws/security/message/token/SecurityTokenReference.java | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/ws/security/message/token/Reference.java b/src/main/java/org/apache/ws/security/message/token/Reference.java
index 55a7f66..d44312f 100644
--- a/src/main/java/org/apache/ws/security/message/token/Reference.java
+++ b/src/main/java/org/apache/ws/security/message/token/Reference.java
@@ -58,7 +58,7 @@ public class Reference {
String uri = getURI();
// Reference URI cannot be null or empty
- if (uri == null || uri.isEmpty()) {
+ if (uri == null || "".equals(uri)) {
throw new WSSecurityException(
WSSecurityException.INVALID_SECURITY, "badReferenceURI"
);
diff --git a/src/main/java/org/apache/ws/security/message/token/SecurityTokenReference.java b/src/main/java/org/apache/ws/security/message/token/SecurityTokenReference.java
index 4d3b4ed..b1b8ff8 100644
--- a/src/main/java/org/apache/ws/security/message/token/SecurityTokenReference.java
+++ b/src/main/java/org/apache/ws/security/message/token/SecurityTokenReference.java
@@ -786,14 +786,14 @@ public class SecurityTokenReference {
String valueType = getKeyIdentifierValueType();
// ValueType cannot be null
- if (valueType == null || valueType.isEmpty()) {
+ if (valueType == null || "".equals(valueType)) {
throw new WSSecurityException(
WSSecurityException.INVALID_SECURITY, "invalidValueType"
);
}
String encodingType = getFirstElement().getAttribute("EncodingType");
// Encoding Type must be equal to Base64Binary if it's specified
- if (encodingType != null && !encodingType.isEmpty()
+ if (encodingType != null && !"".equals(encodingType)
&& !BinarySecurity.BASE64_ENCODING.equals(encodingType)) {
throw new WSSecurityException(
WSSecurityException.INVALID_SECURITY,
@@ -804,7 +804,7 @@ public class SecurityTokenReference {
// Encoding type must be specified other than for a SAML Assertion
if (!WSConstants.WSS_SAML_KI_VALUE_TYPE.equals(valueType)
&& !WSConstants.WSS_SAML2_KI_VALUE_TYPE.equals(valueType)
- && (encodingType == null || encodingType.isEmpty())) {
+ && (encodingType == null || "".equals(encodingType))) {
throw new WSSecurityException(
WSSecurityException.INVALID_SECURITY, "noEncodingType"
);