Skip to content

Commit c3c1110

Browse files
authored
Merge pull request #10 from scifio/gson-33.4.8-fixes
Use class instead of TypeToken object
2 parents 225381f + 9ba4ede commit c3c1110

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/io/scif/labeling/DefaultLabelingIOService.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,7 @@ private <T, S> void writeLabelingFile(final String file,
257257
{
258258
final Writer writer = new FileWriter(LabelingUtil.getFilePathWithExtension(
259259
file, LabelingUtil.LBL_ENDING, Paths.get(file).getParent().toString()));
260-
final Type labelingDataType = new TypeToken<LabelingData<T, S>>() {}
261-
.getType();
262-
this.gson.toJson(labelingData, labelingDataType, writer);
260+
this.gson.toJson(labelingData, LabelingData.class, writer);
263261
writer.flush();
264262
writer.close();
265263
}

0 commit comments

Comments
 (0)