-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make it possible to run the build with different dependencies and different version of JDK * Fix JUnit to make it forward compatible * Fix other things that are deprecated in Spring 4.3 and removed in Spring 5
- Loading branch information
Showing
8 changed files
with
105 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
spring-ws-core/src/main/java/org/springframework/ws/support/WebUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Copyright 2016 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.springframework.ws.support; | ||
|
||
/** | ||
* Miscellaneous utilities for web applications. Used by various framework classes. | ||
* | ||
* NOTE: These are the parts of org.springframework.web.util.WebUtils deprecated in Spring Framework 5. | ||
* | ||
* @author Greg Turnquist | ||
* @author Rod Johnson | ||
* @author Juergen Hoeller | ||
* @author Sebastien Deleuze | ||
* @since 2.4.0 | ||
*/ | ||
public abstract class WebUtils { | ||
|
||
/** | ||
* Extract the URL filename from the given request URL path. | ||
* Correctly resolves nested paths such as "/products/view.html" as well. | ||
* @param urlPath the request URL path (e.g. "/index.html") | ||
* @return the extracted URI filename (e.g. "index") | ||
*/ | ||
public static String extractFilenameFromUrlPath(String urlPath) { | ||
String filename = extractFullFilenameFromUrlPath(urlPath); | ||
int dotIndex = filename.lastIndexOf('.'); | ||
if (dotIndex != -1) { | ||
filename = filename.substring(0, dotIndex); | ||
} | ||
return filename; | ||
} | ||
|
||
/** | ||
* Extract the full URL filename (including file extension) from the given | ||
* request URL path. Correctly resolve nested paths such as | ||
* "/products/view.html" and remove any path and or query parameters. | ||
* @param urlPath the request URL path (e.g. "/products/index.html") | ||
* @return the extracted URI filename (e.g. "index.html") | ||
*/ | ||
public static String extractFullFilenameFromUrlPath(String urlPath) { | ||
int end = urlPath.indexOf('?'); | ||
if (end == -1) { | ||
end = urlPath.indexOf('#'); | ||
if (end == -1) { | ||
end = urlPath.length(); | ||
} | ||
} | ||
int begin = urlPath.lastIndexOf('/', end) + 1; | ||
int paramIndex = urlPath.indexOf(';', begin); | ||
end = (paramIndex != -1 && paramIndex < end ? paramIndex : end); | ||
return urlPath.substring(begin, end); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* Enable with "-Pprofile=spring4-next" | ||
*/ | ||
|
||
ext.springVersion = "4.3.2.RELEASE" | ||
ext.springSecurityVersion = "4.1.3.RELEASE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* Enable with "-Pprofile=spring5" | ||
*/ | ||
|
||
ext.springVersion = "5.0.0.BUILD-SNAPSHOT" | ||
ext.springSecurityVersion = "4.2.0.BUILD-SNAPSHOT" | ||
|
||
compileJava { | ||
sourceCompatibility=1.8 | ||
targetCompatibility=1.8 | ||
} | ||
|
||
repositories { | ||
maven { url 'https://repo.spring.io/libs-snapshot' } | ||
} |