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

writeBuffer field of java.io.DataOutputStream should be final

XMLWordPrintable

    • b28
    • Verified

      A DESCRIPTION OF THE PROBLEM :
      java.io.DataOutputStream has a field
          private byte writeBuffer[] = new byte[8];
      which is used as temporary buffer by writeLong(long) method. While contents of this array get modified, the array reference itself is once set on object's instantiation and never gets mutated. Thus it is reasonable to make this field final.


      FREQUENCY : always


            bpb Brian Burkhalter
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: