Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6cbe154c authored by Tobias Thierer's avatar Tobias Thierer Committed by android-build-merger
Browse files

Merge "Use StrictJarManifest.ATTRIBUTE_NAME_NAME instead of...

Merge "Use StrictJarManifest.ATTRIBUTE_NAME_NAME instead of Attributes.Name.NAME." am: 2dc5a427 am: 597eb7f8 am: d05cdbcc
am: c9923e3e

Change-Id: I249f6ab4b2cc94c9598a71249c1a746060ac283c
parents 24a464a9 c9923e3e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -44,6 +44,9 @@ public class StrictJarManifest implements Cloneable {

    private static final byte[] VALUE_SEPARATOR = new byte[] { ':', ' ' };

    /** The attribute name "Name". */
    static final Attributes.Name ATTRIBUTE_NAME_NAME = new Attributes.Name("Name");

    private final Attributes mainAttributes;
    private final HashMap<String, Attributes> entries;

@@ -276,7 +279,7 @@ public class StrictJarManifest implements Cloneable {
        Iterator<String> i = manifest.getEntries().keySet().iterator();
        while (i.hasNext()) {
            String key = i.next();
            writeEntry(out, Attributes.Name.NAME, key, encoder, buffer);
            writeEntry(out, ATTRIBUTE_NAME_NAME, key, encoder, buffer);
            Attributes attributes = manifest.entries.get(key);
            Iterator<?> entries = attributes.keySet().iterator();
            while (entries.hasNext()) {
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ class StrictJarManifestReader {
    public void readEntries(Map<String, Attributes> entries, Map<String, StrictJarManifest.Chunk> chunks) throws IOException {
        int mark = pos;
        while (readHeader()) {
            if (!Attributes.Name.NAME.equals(name)) {
            if (!StrictJarManifest.ATTRIBUTE_NAME_NAME.equals(name)) {
                throw new IOException("Entry is not named");
            }
            String entryNameValue = value;