|
Re: Meta Characters \t \n \r in String Literal: msg#00100lang.groovy.user
I think I'm seeing something similar using Groovy Version: 1.0-beta-7 JVM: 1.4.2_05-b04 'cmd /c dir /b /s \\myProjectName\\trunk\\*.java'.execute() behaves differently from: "cmd /c dir /b /s \\myProjectName\\trunk\\*.java"'.execute() Based on my limited understanding of groovy, I thought those two statements would work the same, but they don't. In the process of trying to figure out what I was doing wrong I compiled both versions and ran the .class through Jad. I noticed an extra slash being inserted before the "trunk" in second example. The output from Jad is as follows: InvokerHelper.invokeNoArgumentsMethod("cmd /c dir /b /s \\myProjectName\\trunk\\*.java", "execute"); and InvokerHelper.invokeNoArgumentsMethod("cmd /c dir /b /s \\myProjectName\\\trunk\\*.java", "execute"); // notice the extra slash before "trunk" When I looked at the .class with a hex editor, I noticed there was a tab character in place of the 't' in trunk in the second example, so I think Jad is decompiling properly. Interestingly, when I tried: "cmd /c dir /b /s \\myProjectName\\\trunk\\*.java"'.execute() the output is the same in the second example above: InvokerHelper.invokeNoArgumentsMethod("cmd /c dir /b /s \\myProjectName\\\trunk\\*.java", "execute"); Is this behavior expected? thanks, Jason
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Meta Characters \t \n \r in String Literal, phkim-Yd8/yUic+sk+MW+wcPHoAA |
|---|---|
| Next by Date: | Re: Meta Characters \t \n \r in String Literal, Guillaume Laforge |
| Previous by Thread: | Meta Characters \t \n \r in String Literal, phkim-Yd8/yUic+sk+MW+wcPHoAA |
| Next by Thread: | Re: Meta Characters \t \n \r in String Literal, Guillaume Laforge |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |