Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-292

Properties do not support continuation (as documented) where \r\n is used to end a line

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.0, 0.11.0
    • 0.11.0
    • Configurator
    • None
    • Any platform that uses \r\n to end lines of property files e.g. Windows

    Description

      According to the documentation a slash '\' on the last character of a line is meant to act as a continuation character. This does not work where the line is ended with \r\n.

      e.g.
      my_prop_name = first_part_of_value \
      second_part_of_value

      If the platform uses \r\n to end the line then second_part_of_value will be treated as a key name not a continuation of the value for my_prop_name.

      The bug is caused by a cut and paste error in the code:

      Around line 256 of properties.cpp the following code currently appears:

      case ELEMENT_CONTINUE2:
      switch(c)
      {
      case 0x20: // '\n'

      It should read thus:

      case ELEMENT_CONTINUE2:
      switch(c)
      {
      case 0x0A: // '\n'

      Attachments

        Activity

          People

            carnold@apache.org Curt Arnold
            mbartosik Mark Bartosik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: