Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-346

wierd behaviour in handling escape char "\" used in rules

XMLWordPrintable

      1. unzip bytemanReproducer.zip
      2. optionally recompile example class: javac org/my/AppMain.java
      3. ./runReproducer.sh (set BYTEMAN_HOME to point to a byteman 3.0.10 install dir)

      Probably I'm missing something very basilar here, I've also checked documentation and jira issues with no luck.
      It seems that the handling of escape char "\" in rules is different form what one would expect; running the reproducer attached (see steps to reproduce) I'd expected this output:

      $ ./runReproducer.sh 
      1) A STRING
      2) A BACKSLASH WITH traceln: \
      3) A BACKSLASH WITH sysout: \
      4) A STRING2 WITH REPLACE
      5) A DOUBLE BACKSLASH WITH traceln replaced: \\
      6) A DOUBLE BACKSLASH WITH sysout replaced: \\
      7) A DOUBLE quotes: "
      8) WIERD 2 BACKSLASHES PRINTED:======================\==============
      Ciao!
      

      got this instead:

      $ ./runReproducer.sh 
      1) A STRING
      4) A STRING2 WITH REPLACE
      7) A DOUBLE quotes: "
      8) WIERD 2 BACKSLASHES PRINTED:======================\\==============
      Ciao!
      

            rhn-engineering-adinn Andrew Dinn
            atarocch@redhat.com Andrea Tarocchi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: