JDK-7157587 : Convert String.contains() to String.indexOf() to run on JDKs earlier than 1.5
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-03-28
  • Updated: 2012-04-04
  • Resolved: 2012-04-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u6Fixed 8 b33Fixed
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