Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-7785

Dead code in DefaultFilenameTabCompleter - completeCandidates

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.1.0.DR10
    • 7.1.0.DR9
    • CLI
    • None

    Description

      https://github.com/wildfly/wildfly-core/blob/master/cli/src/main/java/org/jboss/as/cli/handlers/DefaultFilenameTabCompleter.java#L65

      needsEscape = needsEscape || containsQuote;
      ....
      EscapeSelector escSelector = containsQuote && !needsEscape
      ? QUOTES_ONLY_ESCAPE_SELECTOR : ESCAPE_SELECTOR;
      

      QUOTES_ONLY_ESCAPE_SELECTOR will be never used, because containsQuote would have to be true and needsEscape false. But because of needsEscape = needsEscape || containsQuote needsEscape will be always true when containsQuote is true.

      Attachments

        Issue Links

          Activity

            People

              jdenise@redhat.com Jean Francois Denise
              rsvoboda@redhat.com Rostislav Svoboda
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: