Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7903478

JMH: Use different padding names for B1 and B3 classes to avoid "hiding fields with same name" warnings

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • None
    • None
    • tools
    • None
    • jmh

      Currently, ErrorProne emits a warning:

      {noformat}
      PropertyGetBenchmarkKotlin_jmhType_B3.java:3: warning: [HidingField] Hiding fields of superclasses may cause confusion and errors. This field is hiding a field of the same name in superclass: PropertyGetBenchmarkKotlin_jmhType_B1
          byte p000, p001, p002, p003, p004, p005, p006, p007, p008, p009, p010, p011, p012, p013, p014, p015;
                           ^
          (see https://errorprone.info/bugpattern/HidingField)
      {noformat}

      Even though the fields are not used, it makes sense resolving the warning.

            vsitnikov Vladimir Sitnikov
            vsitnikov Vladimir Sitnikov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: