@@ -84,7 +84,6 @@ public void setAttribute(String name, Object value) {
84
84
initLookupPath ((ResourceUrlProvider ) value );
85
85
}
86
86
}
87
-
88
87
}
89
88
90
89
private void initLookupPath (ResourceUrlProvider urlProvider ) {
@@ -94,10 +93,12 @@ private void initLookupPath(ResourceUrlProvider urlProvider) {
94
93
String requestUri = pathHelper .getRequestUri (this );
95
94
String lookupPath = pathHelper .getLookupPathForRequest (this );
96
95
this .indexLookupPath = requestUri .lastIndexOf (lookupPath );
97
- Assert .isTrue (this .indexLookupPath != -1 ,
98
- "Failed to find lookupPath '" + lookupPath + "' within requestUri '" + requestUri + ". " +
99
- "Does the path have invalid encoded characters " +
100
- "for characterEncoding=" + getRequest ().getCharacterEncoding () + "?" );
96
+ if (this .indexLookupPath == -1 ) {
97
+ throw new IllegalStateException (
98
+ "Failed to find lookupPath '" + lookupPath + "' within requestUri '" + requestUri + "'. " +
99
+ "Does the path have invalid encoded characters for characterEncoding '" +
100
+ getRequest ().getCharacterEncoding () + "'?" );
101
+ }
101
102
this .prefixLookupPath = requestUri .substring (0 , this .indexLookupPath );
102
103
if ("/" .equals (lookupPath ) && !"/" .equals (requestUri )) {
103
104
String contextPath = pathHelper .getContextPath (this );
@@ -112,7 +113,7 @@ private void initLookupPath(ResourceUrlProvider urlProvider) {
112
113
public String resolveUrlPath (String url ) {
113
114
if (this .resourceUrlProvider == null ) {
114
115
logger .trace ("ResourceUrlProvider not available via request attribute " +
115
- " ResourceUrlProviderExposingInterceptor.RESOURCE_URL_PROVIDER_ATTR" );
116
+ ResourceUrlProviderExposingInterceptor .RESOURCE_URL_PROVIDER_ATTR );
116
117
return null ;
117
118
}
118
119
if (this .indexLookupPath != null && url .startsWith (this .prefixLookupPath )) {
0 commit comments