Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1139515 - [GSS] (6.4.0) cli deploy command with unpaired quotation mark causes StringIndexOutOfBoundsException
[GSS] (6.4.0) cli deploy command with unpaired quotation mark causes StringIn...
Status: VERIFIED
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: CLI (Show other bugs)
6.3.0
All Windows
medium Severity medium
: DR1
: EAP 6.4.0
Assigned To: Shailendra Jadhav
Petr Kremensky
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-09 02:43 EDT by Jay SenSharma
Modified: 2018-03-06 15:39 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When running previous versions of Jboss EAP 6 on Windows, using `jboss-cli.bat` to deploy an application would throw an exception when trying to tab complete an open quote ("). Attempting this action would result in the following error: ---- java.lang.StringIndexOutOfBoundsException: String index out of range: -1 ---- In this release, the exception will not occur.
Story Points: ---
Clone Of:
Environment:
Windows
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker WFCORE-92 Major Resolved cli deploy command with unpaired quotation mark causes StringIndexOutOfBoundsException 2017-11-07 06:11 EST

  None (edit)
Description Jay SenSharma 2014-09-09 02:43:19 EDT
Description of problem:
======================

    CLI "deploy" command with open quote and tab for completion results in a "StringIndexOutOfBoundsException" exception

    Type 'connect' to connect to the server or 'help' for the list of supported commands.

    [disconnected /] connect
    [standalone@localhost:9999 /] deploy "d<Tab>

    [standalone@localhost:9990 /] deploy "djava.lang.StringIndexOutOfBoundsException: String index out of range: -1


java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1911)
        at org.jboss.as.cli.handlers.WindowsFilenameTabCompleter.complete(WindowsFilenameTabCompleter.java:54)
        at org.jboss.as.cli.operation.OperationRequestCompleter.complete(OperationRequestCompleter.java:224)
        at org.jboss.as.cli.CommandCompleter.complete(CommandCompleter.java:95)
        at org.jboss.as.cli.impl.Console$Factory$1$1.complete(Console.java:102)
        at org.jboss.aesh.console.Console.complete(Console.java:1155)
        at org.jboss.aesh.console.Console.parseOperation(Console.java:550)
        at org.jboss.aesh.console.Console.read(Console.java:452)
        at org.jboss.aesh.console.Console.read(Console.java:346)
        at org.jboss.as.cli.impl.Console$Factory$1.readLine(Console.java:178)
        at org.jboss.as.cli.impl.CommandContextImpl.interact(CommandContextImpl.java:1233)
        at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:263)
        at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.jboss.modules.Module.run(Module.java:312)
        at org.jboss.modules.Main.main(Main.java:460)
Version-Release number of selected component (if applicable):




How reproducible:
=================
Steps to Reproduce:
1.  Use a Windows OS (like Windows 2008 R2) and install WildFly in it.
2.  Using "jboss-cli.bat" script connect to JBoss and then try the following command which contains incomplete quotation mark then press tab.

    deploy "test<TAB>


Actual results:
==============
Following error occurs and CLI terminates:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1


Expected results:
==============
No Error was supposed to occur there


Additional info:
==============
Issue can be reproduced only in Windows Platform.
Comment 2 Petr Kremensky 2014-09-19 04:41:29 EDT
Verified on EAP 6.4.0.DR1.1

Note You need to log in before you can comment on or make changes to this bug.