You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Nicolas Roduit (JIRA)" <ji...@apache.org> on 2014/02/10 20:35:23 UTC

[jira] [Created] (FELIX-4425) Short command in Gogo Shell not working with Java 8

Nicolas Roduit created FELIX-4425:
-------------------------------------

             Summary: Short command in Gogo Shell not working with Java 8 
                 Key: FELIX-4425
                 URL: https://issues.apache.org/jira/browse/FELIX-4425
             Project: Felix
          Issue Type: Bug
          Components: Gogo Command
         Environment: Java 8
            Reporter: Nicolas Roduit


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().



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)