Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4405992

Uneccesary String object created in java.util.Properties.java line 203

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • core-libs
    • beta
    • generic
    • generic
    • Verified



      Name: yyT116575 Date: 01/18/2001


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      In java.util.Properties, line 203 marks the statement:

      nextLine = new String("");

      I am pretty sure that this is a creating 2 new String objects (one via the
      constructor and one via the object literal) where only 1 is needed. Since
      java.util.Properties is so heavily used I figured it might be worthwhile to
      bring this to your attention.
      (Review ID: 115398)
      ======================================================================

            mmcclosksunw Michael Mccloskey (Inactive)
            yyoungsunw Yung-ching Young (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: