Skip to content

explicit split(s, 0) this is the behavior we want here #44

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .lift.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ignoreFiles = """
src/site/hugo/
"""
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
if (!(o instanceof PackageUrl)) {
return false;
}
PackageUrl that = (PackageUrl) o;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static Map<String, String> parseQualifiers(@Nullable final String value) {
return null;
}

String[] pairs = value.split("&");
String[] pairs = value.split("&", 0);
Map<String, String> result = new LinkedHashMap<>(pairs.length);
for (String pair : pairs) {
String[] split = pair.split("=", 2); // Splits the pair into either one or two pieces
Expand Down Expand Up @@ -189,7 +189,7 @@ static List<String> parseSegments(@Nullable final String value, final String...
return null;
}

String[] parts = stripSlashes(value).split("/");
String[] parts = stripSlashes(value).split("/", 0);
List<String> result = new ArrayList<>();
for (String part : parts) {
if (part.isEmpty()) {
Expand Down