Skip to content

Commit

Permalink
Merge pull request #204 from mohrezaei/master
Browse files Browse the repository at this point in the history
Fix json deserialization of null and prepare for 17.1.2 release
  • Loading branch information
mohrezaei authored Sep 19, 2019
2 parents 66a3ae6 + 50c7d18 commit 9a2e79e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log
## 17.1.2 - 2019-09-01
## 17.1.2 - 2019-09-19
### Bug Fixes:
- Fix json deserialization with nulls
- Fix ArrayIndexOutOfBoundsException in MultiExtractorHashStrategy

## 17.1.1 - 2019-09-01
### Bug Fixes:
- Fix json deserialization without relationships

Expand Down
2 changes: 1 addition & 1 deletion build/reladomo-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
under the License.
-->
<project name="mithra-config" default="determine-jdk">
<property name="reladomo.version" value="17.1.1"/>
<property name="reladomo.version" value="17.1.2"/>
<property name="snapshot" value=""/>
</project>
2 changes: 1 addition & 1 deletion build/sign-release.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
setlocal

set VER=17.1.0
set VER=17.1.2

cd ../target
gpg -ab reladomo-%VER%-javadoc.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1915,7 +1915,7 @@ public void parseFieldFromString(String value, ReladomoDeserializer deserializer
@Override
public void setFieldOrRelationshipNull(ReladomoDeserializer deserializer) throws DeserializationException
{
deserializer.data.attribute.setValueNull(deserializer.data.partial);
deserializer.data.attribute.setValueNull(deserializer.data.partial.dataObject);
attributeDone(deserializer);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@ public void testBitemporalOrder() throws Exception
assertTrue(serialized.getWrapped().zIsDetached());
}

@Test
public void testBitemporalOrderWithNullString() throws Exception
{
SerializationConfig config = SerializationConfig.shallowWithDefaultAttributes(BitemporalOrderFinder.getFinderInstance());
BitemporalOrder order = findOrder(1).getNonPersistentCopy();
order.setDescription(null);
String sb = toSerializedString(new Serialized(order, config));

Serialized<BitemporalOrder> serialized = fromSerializedString(sb);
BitemporalOrder wrapped = serialized.getWrapped();
assertEquals(1, wrapped.getOrderId());
assertNull(wrapped.getDescription());
}

private BitemporalOrder findOrder(int orderId)
{
Operation op = BitemporalOrderFinder.orderId().eq(orderId);
Expand Down

0 comments on commit 9a2e79e

Please sign in to comment.