Menu

Bug on 1.1

Narayanan
2008-03-13
2013-04-29
  • Narayanan

    Narayanan - 2008-03-13

    Hi

    We are observing a bug in the
    JSONUtils.stripQuotes( String input ) method.

    While creating a json string from a map and if there is a single quote in the map as value, this method is throwing Exception since the following if loop is valid
    if( input.startsWith( SINGLE_QUOTE ) && input.endsWith( SINGLE_QUOTE ) )

    and the subsequent statement is
    input.substring( 1, input.length() - 1 ); which will fail since the length is 1.

    I'm not sure whether this is fixed in teh latest version.

     
    • aalmiray

      aalmiray - 2008-03-13

      Hi Narayanan,

      It is indeed a bug in 1.x, it has been fixed in 2.x

      Cheers,
      Andres

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.