[ 
https://issues.apache.org/jira/browse/AXIS2-5300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13265471#comment-13265471
 ] 

Hudson commented on AXIS2-5300:
-------------------------------

Integrated in Axis2 #1412 (See [https://builds.apache.org/job/Axis2/1412/])
    Improving the JSON code - Step 2 - Instead of using some hacks to extract 
the name of the element, just let Axiom determine it lazily using the feature 
introduced by AXIOM-399.

This should make databindings work with Badgerfish (although we have no 
integration test for this yet) and solve AXIS2-5158, AXIS2-5295 and AXIS2-5300. 
(Revision 1332402)

     Result = SUCCESS
veithen : 
Files : 
* 
/axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/AbstractJSONDataSource.java
* 
/axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/AbstractJSONOMBuilder.java
* 
/axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/JSONBadgerfishDataSource.java
* 
/axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/JSONBadgerfishMessageFormatter.java
* 
/axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/JSONBadgerfishOMBuilder.java
* 
/axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/JSONDataSource.java
* 
/axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/JSONMessageFormatter.java
* 
/axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/JSONOMBuilder.java
* 
/axis/axis2/java/core/trunk/modules/json/test/org/apache/axis2/json/JSONDataSourceTest.java
* 
/axis/axis2/java/core/trunk/modules/json/test/org/apache/axis2/json/JSONOMBuilderTest.java

                
> org.apache.axis2.json.AbstractJSONOMBuilder hangs when JSON has wrong format
> ----------------------------------------------------------------------------
>
>                 Key: AXIS2-5300
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5300
>             Project: Axis2
>          Issue Type: Bug
>          Components: json
>    Affects Versions: 1.6.2
>         Environment: Apache tomcat 7.0.25
> Ubuntu 64Bit 11.10
>            Reporter: Matthias Gerber
>            Assignee: Andreas Veithen
>
> org.apache.axis2.json.AbstractJSONOMBuilder hangs when JSON has wrong format:
> Code loping through reader at line 119 and 135 to get localName should check 
> for end of stream. 
> Otherwise the code cycles for ever if the string to parse does not contain a  
> ":"
> Code as it is at the moment:
> 118            char temp = (char)reader.read();
> 119            while (temp != ':') {
> 120               if (temp != ' ' && temp != '{' && temp != '\n' && temp != 
> '\r' && temp != '\t') {
> 121                    localName += temp;
> 122                }
> 123                temp = (char)reader.read();
> 124            }
> Code as it should be (or something like that):
>                   int t = reader.read();
> 118            char temp = (char)t;
> 119            while (temp != ':' && t >= 0) {
> 120               if (temp != ' ' && temp != '{' && temp != '\n' && temp != 
> '\r' && temp != '\t') {
> 121                    localName += temp;
> 122                }
>                      t =  reader.read();
> 123                temp =  (char)t;
> 124            }
> And maybe some error handling if end of stream is reached. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org
For additional commands, e-mail: java-dev-h...@axis.apache.org

Reply via email to