3 Replies Latest reply on May 19, 2008 10:22 AM by timfox

    SimpleString in Core API and User land

    jmesnil

      Just a few thoughts related to the introduction of SimpleString.

      I find it cumbersome to use SimpleString when creating our Core objects (Session, Producers). I'd prefer to have our API expressed using regular String and wrap internally to a SimpleString rather than ask our users to do the wrapping.

      Like wise, I wonder if we shouldn't keep using plain Strings for everything coming from User land (e.g. JMS Text & Map message, headers & properties) to avoid any encoding issues.

      wdyt?



        • 1. Re: SimpleString in Core API and User land
          timfox

           

          "jmesnil" wrote:
          Just a few thoughts related to the introduction of SimpleString.

          I find it cumbersome to use SimpleString when creating our Core objects (Session, Producers). I'd prefer to have our API expressed using regular String and wrap internally to a SimpleString rather than ask our users to do the wrapping.


          We could certainly provide overloaded methods that take standard Strings


          Like wise, I wonder if we shouldn't keep using plain Strings for everything coming from User land (e.g. JMS Text & Map message, headers & properties) to avoid any encoding issues.


          Can you be more specific about what encoding issues?

          • 2. Re: SimpleString in Core API and User land
            jmesnil

             

            "timfox" wrote:
            "jmesnil" wrote:
            Just a few thoughts related to the introduction of SimpleString.

            Like wise, I wonder if we shouldn't keep using plain Strings for everything coming from User land (e.g. JMS Text & Map message, headers & properties) to avoid any encoding issues.


            Can you be more specific about what encoding issues?


            If our users send Strings with Unicode characters encoded on more than 2 bytes, our SimpleString won't encode it correctly.


            • 3. Re: SimpleString in Core API and User land
              timfox

               

              "jmesnil" wrote:

              If our users send Strings with Unicode characters encoded on more than 2 bytes, our SimpleString won't encode it correctly.


              Right, but that's just a bug in the SimpleString class which should be quite straightforward to fix..?