Uploaded image for project: 'QuickFIX/J'
  1. QuickFIX/J
  2. QFJ-436

\\ characters are skipped from the directory name on Windows

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Default
    • Resolution: Not a bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Engine
    • Labels:
      None

      Description

      Hi,

      The appendReplacement methof of Matcher removes the backslash required under Windows to create the directory tree

      private Pattern variablePattern = Pattern.compile("\\$

      {(.+?)}

      ");

      private String interpolate(String value) {

      //"value"= "$

      {servicemix.home}

      /data/log/quickfix/files/server"

      if (value == null || value.indexOf('$') == -1)

      { return value; }

      StringBuffer buffer = new StringBuffer();
      Matcher m = variablePattern.matcher(value);
      while (m.find()) {
      if (m.start() > 0 && value.charAt(m.start() - 1) == '
      ')

      { continue; }

      String variable = m.group(1);
      // variable = servicemix.home
      String variableValue = variableValues.getProperty(variable);
      // "variableValue"= "D:\\\\Dvlpt\\\\Java\\\\workspace-ganymede\\\\esb\\\\apache-servicemix-kernel-1.2.0-SNAPSHOT" ---> OK
      if (variableValue != null)

      { m.appendReplacement(buffer, variableValue); "buffer.toString()"= "D:DvlptJavaworkspace-ganymedeesbapache-servicemix-kernel-1.2.0-SNAPSHOT" --> NOK }

      }
      m.appendTail(buffer);

      return buffer.toString();

      }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cmoulliard Charles Moulliard
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: