bug fixes for required dependencies
This commit is contained in:
Scott Battaglia 2007-11-14 21:24:30 +00:00
parent 89f936d66b
commit 14b32f0549
2 changed files with 11 additions and 5 deletions

View File

@ -97,9 +97,11 @@ public abstract class AbstractUrlBasedTicketValidator implements TicketValidator
final String key = (String) entry.getKey();
final String value = (String) entry.getValue();
buffer.append(key);
buffer.append("=");
buffer.append(value);
if (value != null) {
buffer.append(key);
buffer.append("=");
buffer.append(value);
}
}
return buffer.toString();
@ -113,6 +115,10 @@ public abstract class AbstractUrlBasedTicketValidator implements TicketValidator
* @return the encoded url, or the original url if "UTF-8" character encoding could not be found.
*/
protected final String encodeUrl(final String url) {
if (url == null) {
return null;
}
try {
return URLEncoder.encode(url, "UTF-8");
} catch (final UnsupportedEncodingException e) {

View File

@ -55,7 +55,7 @@ public final class Cas20ProxyReceivingTicketValidationFilter extends AbstractTic
public void init() {
super.init();
CommonUtils.assertNotNull(this.proxyReceptorUrl, "proxyReceptorUrl cannot be null.");
// CommonUtils.assertNotNull(this.proxyReceptorUrl, "proxyReceptorUrl cannot be null.");
CommonUtils.assertNotNull(this.proxyGrantingTicketStorage, "proxyGrantingTicketStorage cannot be null.");
}
@ -106,7 +106,7 @@ public final class Cas20ProxyReceivingTicketValidationFilter extends AbstractTic
final HttpServletResponse response = (HttpServletResponse) servletResponse;
final String requestUri = request.getRequestURI();
if (!requestUri.endsWith(proxyReceptorUrl)) {
if (CommonUtils.isEmpty(this.proxyReceptorUrl) || !requestUri.endsWith(this.proxyReceptorUrl)) {
return true;
}