Skip to content

Commit 8db2bb1

Browse files
author
Alvin Reyes
authored
Merge pull request #46 from avanaur/missing-asset-id-issue-45
Fix missing ID on assets API by limiting @exclude on just serialization #44
2 parents 0582048 + d08c497 commit 8db2bb1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/main/java/com/authenteq/util/JsonUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static Gson getGson() {
4343
.registerTypeAdapter(Outputs.class, new OutputsDeserializer())
4444
.registerTypeAdapter(Votes.class, new VoteDeserializer())
4545
.registerTypeAdapterFactory(new GsonEmptyCheckTypeAdapterFactory())
46-
.setExclusionStrategies(new CustomExclusionStrategy()).create();
46+
.addSerializationExclusionStrategy(new CustomExclusionStrategy()).create();
4747
}
4848
return gson;
4949
}

src/test/java/com/authenteq/api/AssetsApiTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public void testAssetSearch()
5959

6060
Assets assets = AssetsApi.getAssets( asQuoted( uuid ) );
6161
assertTrue( assets.size() == 1 ); // there should be one and only one
62+
assertTrue( assets.getAssets().get(0).getId() != null ); // asset ID should not be null
6263
} catch (IOException | StatusException e) {
6364
e.printStackTrace();
6465
}

0 commit comments

Comments
 (0)