Commit 0edfc6a7 authored by Ricki Hirner's avatar Ricki Hirner

Remove unnecessary method

parent 2d01d3b4
......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
buildToolsVersion "23.0.3"
defaultConfig {
minSdkVersion 9
......
package at.bitfire.dav4android;
import android.text.TextUtils;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import okhttp3.HttpUrl;
......@@ -26,20 +23,6 @@ public class UrlUtils {
}
}
/**
* Returns the last non-empty path segment of the given URL, or "" if none.
*/
public static String lastSegment(HttpUrl url) {
String segment = "";
List<String> segments = url.pathSegments();
for (int i = segments.size()-1; i >= 0; i--) {
segment = segments.get(i);
if (!TextUtils.isEmpty(segment))
break;
}
return segment;
}
public static HttpUrl omitTrailingSlash(HttpUrl url) {
int idxLast = url.pathSize() - 1;
boolean hasTrailingSlash = "".equals(url.pathSegments().get(idxLast));
......
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