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

(bf spec) Buffer spec should note that buffers are a closed abstraction

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.0
    • core-libs
    • x86
    • windows_xp



      Name: rmT116609 Date: 04/17/2003


      A DESCRIPTION OF THE REQUEST :
      CharBuffer includes a package-private abstract method, toString(int,int). This effectively precludes making subclasses of CharBuffer in other packages.

      JUSTIFICATION :
      It seems useful and legitimate to allow user subclasses of CharBuffer, which may wrap other object types or annotate the CharBuffer with additional state.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      If precluding such subclasses is intentional design, a Javadoc note explaining why developers should not create their own CharBuffer subclasses would be appreciated.

      If precluding such subclasses is unintentional behavior, please remove the package-private protection on the toString(int,int) method to enable outside subclassing. (It's the only abstract method in CharBuffer so protected.)
      (Review ID: 184321)
      ======================================================================

            bpb Brian Burkhalter
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: