Skip to content

Commit

Permalink
Use LinkedHashMap instead of HashMap so order is defined across Java …
Browse files Browse the repository at this point in the history
…versions
  • Loading branch information
ryu2 committed Mar 11, 2016
1 parent a1aa664 commit 3fa1fa5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/dd/plist/BinaryPropertyListWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

/**
Expand Down Expand Up @@ -143,7 +143,7 @@ public static byte[] writeToArray(NSObject root) throws IOException {
private long count;

// map from object to its ID
private Map<NSObject, Integer> idMap = new HashMap<NSObject, Integer>();
private Map<NSObject, Integer> idMap = new LinkedHashMap<NSObject, Integer>();
private int idSizeInBytes;

/**
Expand Down

0 comments on commit 3fa1fa5

Please sign in to comment.