[jboss-jira] [JBoss JIRA] (WFCORE-1868) wrong parse of double quote in `\\"`
Hisanobu Okuda (JIRA)
issues at jboss.org
Fri Oct 21 07:58:01 EDT 2016
[ https://issues.jboss.org/browse/WFCORE-1868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13310326#comment-13310326 ]
Hisanobu Okuda commented on WFCORE-1868:
----------------------------------------
Jean-Francois, I found that the latest wildfly-core 3.0.x blows it off to find open quote setting false to org.jboss.aesh.parser.Parser.setParsingQuotes().
{code}
[hokuda at dhcp-193-78 01719672_eap7_jboss-cli]$ rljdb -attach localhost:8787
/usr/local/bin/rlwrap -H ./rljdb.history -l ./rljdb.log -w 10 -pRED -C jdbxxx -b ' .' -z /home/hokuda/bin/rljdb_filter jdb -attach localhost:8787
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
Initializing jdb ...
>
VM Started: No frames on the current call stack
Found ./rljdb.breakpoint
main[1] run
> Set deferred breakpoint org.jboss.aesh.parser.Parser.setParsingQuotes(boolean)
Set deferred breakpoint org.jboss.aesh.parser.Parser.doesStringContainOpenQuote(java.lang.String)
Breakpoint hit: "thread=main", org.jboss.aesh.parser.Parser.setParsingQuotes(), line=790 bci=0
main[1] where
[1] org.jboss.aesh.parser.Parser.setParsingQuotes (Parser.java:790)
[2] org.jboss.aesh.console.Console.init (Console.java:162)
[3] org.jboss.aesh.console.Console.<init> (Console.java:118)
[4] org.jboss.as.cli.impl.Console$Factory.getConsole (Console.java:123)
[5] org.jboss.as.cli.impl.Console$Factory.getConsole (Console.java:116)
[6] org.jboss.as.cli.impl.CommandContextImpl.initBasicConsole (CommandContextImpl.java:413)
[7] org.jboss.as.cli.impl.CommandContextImpl.<init> (CommandContextImpl.java:381)
[8] org.jboss.as.cli.impl.CommandContextFactoryImpl.newCommandContext (CommandContextFactoryImpl.java:157)
[9] org.jboss.as.cli.impl.CliLauncher.initCommandContext (CliLauncher.java:305)
[10] org.jboss.as.cli.impl.CliLauncher.main (CliLauncher.java:285)
[11] org.jboss.as.cli.CommandLineMain.main (CommandLineMain.java:45)
[12] sun.reflect.NativeMethodAccessorImpl.invoke0 (native method)
[13] sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
[14] sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
[15] java.lang.reflect.Method.invoke (Method.java:498)
[16] org.jboss.modules.Module.run (Module.java:336)
[17] org.jboss.modules.Main.main (Main.java:520)
main[1] locals
Method arguments:
parsingQuotes = false
Local variables:
{code}
If parsingQuotes == false, org.jboss.aesh.parser.Parser.doesStringContainOpenQuote() does nothing.
{code}
public static boolean doesStringContainOpenQuote(String text)
{
if (!parsingQuotes) {
return false;
}
{code}
[https://github.com/wildfly/wildfly-core/commit/027bfe959988b25e45771491e494ca61c19a986b#diff-c929deeb25b1e0886f6c256907ea7c44] introduced disabling parsing quotes in cli/src/main/java/org/jboss/as/cli/impl/CommandContextImpl.java:
{code}
+ settings.parsingQuotes(false);
{code}
The above line should be removed, and the fix should be applied.
> wrong parse of double quote in `\\"`
> -------------------------------------
>
> Key: WFCORE-1868
> URL: https://issues.jboss.org/browse/WFCORE-1868
> Project: WildFly Core
> Issue Type: Bug
> Components: CLI
> Environment: JBoss EAP 7.0.0
> Reporter: Hisanobu Okuda
> Assignee: Jean-Francois Denise
>
> jboss-cli does not parse command line if command line contains {code}\\"{code}
> When a command is
> {code}/system-property=foo4:add(value="vvv\\"){code}
> it shows the sub-prompt '> ' like:
> {code}
> [standalone at localhost:9990 /] /system-property=foo4:add(value="vvv\\")
> >
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list