Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-948

Exception while using ExtendedMessageFormat and escaping braces

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2, 3.2.1
    • 3.4
    • lang.text.*
    • None

    Description

      Exception while trying to format a string containing escaped braces

      Exception in thread "main" java.lang.IllegalArgumentException: Invalid format argument index at position 7: }
      	at org.apache.commons.lang3.text.ExtendedMessageFormat.readArgumentIndex(ExtendedMessageFormat.java:357)
      	at org.apache.commons.lang3.text.ExtendedMessageFormat.applyPattern(ExtendedMessageFormat.java:167)
      	at org.apache.commons.lang3.text.ExtendedMessageFormat.<init>(ExtendedMessageFormat.java:128)
      	at org.apache.commons.lang3.text.ExtendedMessageFormat.<init>(ExtendedMessageFormat.java:113)
      	at test.TestExtendedMessageFormat.main(TestExtendedMessageFormat.java:16)
      

      I will attach a source

      Attachments

        1. TestExtendedMessageFormat.java
          1 kB
          Nicolò Chieffo
        2. TestExtendedMessageFormat2.java
          1 kB
          Nicolò Chieffo

        Activity

          People

            britter Benedikt Ritter
            n.chieffo@tecla.it Nicolò Chieffo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: