ICU-5605 Use String#indexOf instead of String#contains for older JRE support

X-SVN-Rev: 21316
This commit is contained in:
Yoshito Umaoka 2007-03-23 00:23:05 +00:00
parent 7db23c30bf
commit f5f32c1594

View File

@ -677,8 +677,8 @@ public class ICUFile {
* @return Whether the current jar is an Eclipse Fragment.
*/
private boolean isEclipseDataFragment() {
return (icuFile.getPath().contains(
"plugins" + File.separator + "com.ibm.icu.data.update") && icuFile
return (icuFile.getPath().indexOf(
"plugins" + File.separator + "com.ibm.icu.data.update") >= 0 && icuFile
.getName().equals("icu-data.jar"));
}
@ -697,7 +697,7 @@ public class ICUFile {
* @return Whether the current jar is an Eclipse Fragment.
*/
private boolean isEclipseMainFragment() {
return (icuFile.getPath().contains("plugins") && icuFile.getName()
return (icuFile.getPath().indexOf("plugins") >= 0 && icuFile.getName()
.startsWith("com.ibm.icu_"));
}