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

fields are private rather than protected

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.8
    • core-libs
    • generic
    • generic



      Name: skT88420 Date: 07/07/99


      The fields of many of the standard classes are private rather than
      protected, which inhibits the ability to easily derive new objects.
      For instance, I would like to create a Logfile class that derives from
      PrintWriter, but automatically rotates the log file when (for example)
      a certain number of lines are written or a certain amount of time has passed.
      If the fields were protected, this is a simple matter of modifying
      PrintWriter.newLine() and touching PrintWriter.out as necessary. However,
      now I have to duplicate the PrintWriter for no good reason.
      (Review ID: 85299)
      ======================================================================

            Unassigned Unassigned
            skonchad Sandeep Konchady
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: