JSON Integration Adapter Code Review 2 Changes
Contents
JSONMessageFormatter
Tasks | Status |
---|---|
Line 35 // attributes Should be // associations |
Compelete |
Line 40 Move s_logger (final static members) to right before // operations |
Complete |
Line 244
|
Complete |
Line 250, 265, 311 You shouldn’t have to catch ClassCastExceptions. You should catch all Exceptions at the top level and wrap them in an Integration exception with the cause exception contained.
Like this:
catch (IntegrationException e) { throw e; } catch (Exception e) { throw new IntegrationException("err.integration.format", new Object[]{message.getName()}, e); }
|
Complete |
Line 369 Remove it | Complete |
JSONMessageParser
Tasks | Status |
---|---|
Line 297, 338 In method parseObjectArray m_nListDepth is decremented, but never incremented. Is this a bug? |
Complete |
Line 366 parseValue(messagePart) is always called with m_currentMessagePart so you don’t need the argument. |
Complete |
Line 409, 443 In method parseArray m_nListDepth is decremented, but never incremented. Is this a bug? |
Complete |
Line 502 Move to Line 506 – it’s not faster |
Complete |
RootJSONMessagePartMapping
Tasks | Status | |
---|---|---|
Line 50, 75 |
Part instanceof PrimitiveMessagePart should never be true here. You can assert that it isn’t. To make sure that it isn’t iterate over child parts, get their mapping and call finish on the mapping. |
Complete |
RootJSONMessagePartMapping
Tasks | Status |
---|---|
Line 31
|
Complete |
JSONParser
Tasks | Status |
---|---|
Line 71
|
Complete |
JSONWriter
Tasks | Status |
---|---|
Line 53, 76 Instead of having getEndObject and getEndArray methods create public static constants for these characters and use them everywhere. |
Complete |