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

Dead code in DefaultFilenameTabCompleter - completeCandidates

XMLWordPrintable

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

      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.

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

                Created:
                Updated:
                Resolved: