File tree 2 files changed +0
-18
lines changed
main/java/org/apache/cxf/common/util
test/java/org/apache/cxf/common/util
2 files changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -60,14 +60,6 @@ public static boolean isEmpty(List<String> list) {
60
60
return list .size () == 1 && isEmpty (list .get (0 ));
61
61
}
62
62
63
- public static String diff (String str1 , String str2 ) {
64
- int index = str1 .lastIndexOf (str2 );
65
- if (index > -1 ) {
66
- return str1 .substring (str2 .length ());
67
- }
68
- return str1 ;
69
- }
70
-
71
63
public static String getFirstFound (String contents , String regex ) {
72
64
if (isEmpty (regex ) || isEmpty (contents )) {
73
65
return null ;
Original file line number Diff line number Diff line change 27
27
28
28
public class StringUtilsTest {
29
29
30
- @ Test
31
- public void testDiff () throws Exception {
32
- String str1 = "http://local/SoapContext/SoapPort/greetMe/me/CXF" ;
33
- String str2 = "http://local/SoapContext/SoapPort" ;
34
- String str3 = "http://local/SoapContext/SoapPort/" ;
35
- assertEquals ("/greetMe/me/CXF" , StringUtils .diff (str1 , str2 ));
36
- assertEquals ("greetMe/me/CXF" , StringUtils .diff (str1 , str3 ));
37
- assertEquals ("http://local/SoapContext/SoapPort/" , StringUtils .diff (str3 , str1 ));
38
- }
39
-
40
30
@ Test
41
31
public void testGetFirstFound () throws Exception {
42
32
String regex = "velocity-\\ d+\\ .\\ d+\\ .jar" ;
You can’t perform that action at this time.
0 commit comments