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

Consider removing unused instance field 'name' from T2KFontFile

    XMLWordPrintable

    Details

      Description

      the instance field name in T2KFontFile, to the best of my knowledge, is not used. I believe it (and all related code) could be removed.

      If we decided to keep this field, we should fix the constructor:
          private T2KFontFile(String name, String filename, int fIndex)
                                                          throws Exception {
              this.name = name;
              this.filename = filename;
              init(fIndex);
              if (name == null || name.equals("")) {
                  name = fullName;
                  if (name == null) {
                      name = "";
                  }
              }
          }

      note that the final 5 lines in this code is adjusting the parameter name, not the instance field (this.name).

        Attachments

          Activity

            People

            Assignee:
            yaow Yao Wang (Inactive)
            Reporter:
            fheidric Felipe Heidrich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: