United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7157587 Convert String.contains() to String.indexOf() to run on JDKs earlier than 1.5
JDK-7157587 : Convert String.contains() to String.indexOf() to run on JDKs earlier than 1.5

Details
Type:
Bug
Submit Date:
2012-03-28
Status:
Resolved
Updated Date:
2012-04-04
Project Name:
JDK
Resolved Date:
2012-04-04
Component:
deploy
OS:
generic
Sub-Component:
deployment_toolkit
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:

Related Reports
Backport:

Sub Tasks

Description
Part of 7130404 added support for checking os.name against "OS X".  The fix used the String.contains() method which was not added until Java 1.5.  Java Plug-in needs to run on 1.4 JDKs so this method needs to be converted to String.indexOf().

                                    

Comments
EVALUATION

Callsite replacement in a dozen files...

< osName.contains("OS X");
> osName.indexOf("OS X") != -1
                                     
2012-03-29



Hardware and Software, Engineered to Work Together