Skip to content

Polish LayersIndex #20874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/**
* Index describing the layer to which each entry in a jar belongs. Index files are simple
* text files that should be read from top to bottom. Each file defines the layers and
* their content. Layers names are written as quoted strings prefixed by a dash space
* their content. Layer names are written as quoted strings prefixed by a dash space
* ({@code "- "}) and with a colon ({@code ":"}) suffix. Layer content is either a file or
* folder name written as a quoted string prefixed by space space dash space
* ({@code " - "}). A folder name ends with {@code /}, a file name does not. When a
Expand Down Expand Up @@ -107,7 +107,7 @@ public void writeTo(OutputStream out) throws IOException {
}

/**
* A node within the index represeting a single path segment.
* A node within the index representing a single path segment.
*/
private static class Node {

Expand All @@ -122,7 +122,7 @@ private static class Node {
this.layers = new HashSet<>();
}

Node(String name, Layer layer, Node parent) {
Node(String name, Layer layer) {
this.name = name;
this.layers = new HashSet<>(Collections.singleton(layer));
}
Expand All @@ -135,7 +135,7 @@ Node updateOrAddNode(String segment, boolean isFolder, Layer layer) {
return child;
}
}
Node child = new Node(name, layer, this);
Node child = new Node(name, layer);
this.children.add(child);
return child;
}
Expand Down