Commit d9b4eadc authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Util: avoid a copy

parent 955ed3ca
......@@ -85,10 +85,9 @@ public class Util {
return URI;
}
public static String stripTrailingSlash(String _s) {
String s = _s;
public static String stripTrailingSlash(String s) {
if( s.endsWith("/") && s.length() > 1 )
s = s.substring(0,s.length()-1);
return s.substring(0, s.length() - 1);
return s;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment