Emir Buğra KÖKSALAN created WW-4034:
---------------------------------------

             Summary: JSon exception improvement
                 Key: WW-4034
                 URL: https://issues.apache.org/jira/browse/WW-4034
             Project: Struts 2
          Issue Type: Improvement
          Components: Plugin - JSON
            Reporter: Emir Buğra KÖKSALAN
            Priority: Minor


Throws when accessing to a private inner class in that method:

private void map(Map map, Method method) throws JSONException

May be pass when trying to access a private class. example source code should 
be:

private void map(Map map, Method method) throws JSONException {
    this.add("{");
...
    while (it.hasNext()) {
        Map.Entry entry = (Map.Entry) it.next();
        Object key = entry.getKey();
        String expr = null;
        if (this.buildExpr) {
            try {
                if (key == null) {
                    LOG.error("Cannot build expression for null key in " + 
this.exprStack);
                    continue;
                } else {
                    expr = this.expandExpr(key.toString());
                    if (this.shouldExcludeProperty(expr)) {
                        continue;
                    }
                    expr = this.setExprStack(expr);
                }
            }
            catch (Exception ex) {
                LOG.error("Error: " + ex.getLocalizedMessage());
                continue;
            }
        }
        if (hasData) {
            this.add(',');
        }
...
    this.add("}");
}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to