Author: woonsan
Date: Wed Feb 17 03:00:44 2016
New Revision: 1730780
URL: http://svn.apache.org/viewvc?rev=1730780&view=rev
Log:
check wildcards for both * and %
Modified:
portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalLookupManagerAbstract.java
Modified:
portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalLookupManagerAbstract.java
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalLookupManagerAbstract.java?rev=1730780&r1=1730779&r2=1730780&view=diff
==============================================================================
---
portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalLookupManagerAbstract.java
(original)
+++
portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalLookupManagerAbstract.java
Wed Feb 17 03:00:44 2016
@@ -16,6 +16,19 @@
*/
package org.apache.jetspeed.security.spi.impl;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.swing.text.Segment;
+
import org.apache.commons.lang.StringUtils;
import org.apache.jetspeed.security.JetspeedPrincipal;
import org.apache.jetspeed.security.JetspeedPrincipalAssociationType;
@@ -31,18 +44,6 @@ import org.apache.ojb.broker.query.Query
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.swing.text.Segment;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
/**
* Abstract base class for the principal lookup manager. Defines possible
* database specific abstract methods and provides more generic methods to all
@@ -424,12 +425,12 @@ public abstract class JetspeedPrincipalL
boolean foreWildcard = false;
boolean rearWildcard = false;
- if (textOnly.length() > 0 && textOnly.charAt(0) == '*') {
+ if (textOnly.length() > 0 && (textOnly.charAt(0) == '*' ||
textOnly.charAt(0) == '%')) {
textOnly = textOnly.substring(1);
foreWildcard = true;
}
- if (textOnly.length() > 0 && textOnly.charAt(s.length() - 1) ==
'*') {
+ if (textOnly.length() > 0 && (textOnly.charAt(s.length() - 1) ==
'*' || textOnly.charAt(s.length() - 1) == '%')) {
textOnly = textOnly.substring(0, textOnly.length() - 1);
rearWildcard = true;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]