Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-4425

Short command in Gogo Shell not working with Java 8

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: gogo.shell-0.12.0
    • Component/s: Gogo Command
    • Labels:
      None
    • Environment:
      Java 8

      Description

      The bug comes from the different interpretation of String.split() method in line 474 of org.apache.felix.gogo.options.Options (in Gogo Shell).

      Here are the different results of the split method:
      String val = "-k".substring(1).split("");
      Java < 8:
      val[0]=""
      val[1]="k"

      Java 8:
      val[0]="k"

      A simple fix can be an iteration of the characters instead of using split().

        Attachments

          Activity

            People

            • Assignee:
              rickhall Richard S. Hall
              Reporter:
              nroduit Nicolas Roduit
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: