Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-4309

Potential null pointer dereference in DelegatingConfiguration#keySet()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0, 1.1.2
    • Component/s: None
    • Labels:
      None

      Description

          final int prefixLen = this.prefix == null ? 0 : this.prefix.length();
      
          for (String key : this.backingConfig.keySet()) {
            if (key.startsWith(this.prefix)) {
      

      If this.prefix == null, we would get NPE in startsWith():

          public boolean startsWith(String prefix, int toffset) {
              char ta[] = value;
              int to = toffset;
              char pa[] = prefix.value;
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tsunny Sunny T
                Reporter:
                yuzhihong@gmail.com Ted Yu
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: