aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/java
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/java')
-rw-r--r--third_party/java/dd_plist/README7
-rw-r--r--third_party/java/dd_plist/java/com/dd/plist/BinaryPropertyListWriter.java4
-rw-r--r--third_party/java/dd_plist/java/com/dd/plist/NSDictionary.java2
3 files changed, 11 insertions, 2 deletions
diff --git a/third_party/java/dd_plist/README b/third_party/java/dd_plist/README
index a2df2f881b..6646f9cf57 100644
--- a/third_party/java/dd_plist/README
+++ b/third_party/java/dd_plist/README
@@ -31,3 +31,10 @@ Local Modifications:
- Allow \ escaping of characters that need not be escaped in
ASCIIPropertyListParser.java.
- Make PropertyListParser.determineType handle an empty bytes array properly.
+- https://github.com/3breadt/dd-plist/commit/3fa1fa56c82df169e06079feb54ba281ad41cae6
+which stabilizes ordering and is required for plists to be parsed by some Apple
+plist parsers.
+- https://github.com/3breadt/dd-plist/commit/a5fb37384d4ca7a3b5039a7605ca0e9ca926a6ec
+which causes dictionaries to generate ids for values the same way the Apple
+implementation does it.
+
diff --git a/third_party/java/dd_plist/java/com/dd/plist/BinaryPropertyListWriter.java b/third_party/java/dd_plist/java/com/dd/plist/BinaryPropertyListWriter.java
index c7b5315fb7..21645befcc 100644
--- a/third_party/java/dd_plist/java/com/dd/plist/BinaryPropertyListWriter.java
+++ b/third_party/java/dd_plist/java/com/dd/plist/BinaryPropertyListWriter.java
@@ -29,7 +29,7 @@ import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
-import java.util.HashMap;
+import java.util.LinkedHashMap;
import java.util.Map;
/**
@@ -143,7 +143,7 @@ public class BinaryPropertyListWriter {
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;
/**
diff --git a/third_party/java/dd_plist/java/com/dd/plist/NSDictionary.java b/third_party/java/dd_plist/java/com/dd/plist/NSDictionary.java
index a193a80e0c..9beedbc75c 100644
--- a/third_party/java/dd_plist/java/com/dd/plist/NSDictionary.java
+++ b/third_party/java/dd_plist/java/com/dd/plist/NSDictionary.java
@@ -406,6 +406,8 @@ public class NSDictionary extends NSObject implements Map<String, NSObject> {
super.assignIDs(out);
for (Map.Entry<String, NSObject> entry : dict.entrySet()) {
new NSString(entry.getKey()).assignIDs(out);
+ }
+ for (Map.Entry<String, NSObject> entry : dict.entrySet()) {
entry.getValue().assignIDs(out);
}
}