am 7a4cb563: Merge "Frameworks/base: Remove unnecessary Pattern instance"

* commit '7a4cb563a29f05658760739d3bc2e70bd6342174':
  Frameworks/base: Remove unnecessary Pattern instance
This commit is contained in:
Andreas Gampe
2015-03-07 17:13:16 +00:00
committed by Android Git Automerger

View File

@@ -20,7 +20,6 @@ import android.net.Uri;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.regex.Pattern;
/** /**
Utility class to aid in matching URIs in content providers. Utility class to aid in matching URIs in content providers.
@@ -171,7 +170,7 @@ public class UriMatcher
if (path.length() > 0 && path.charAt(0) == '/') { if (path.length() > 0 && path.charAt(0) == '/') {
newPath = path.substring(1); newPath = path.substring(1);
} }
tokens = PATH_SPLIT_PATTERN.split(newPath); tokens = newPath.split("/");
} }
int numTokens = tokens != null ? tokens.length : 0; int numTokens = tokens != null ? tokens.length : 0;
@@ -207,8 +206,6 @@ public class UriMatcher
node.mCode = code; node.mCode = code;
} }
static final Pattern PATH_SPLIT_PATTERN = Pattern.compile("/");
/** /**
* Try to match against the path in a url. * Try to match against the path in a url.
* *