Skip to content
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

fix: small typos #473

Merged
merged 3 commits into from
Jun 8, 2023
Merged
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
.classpath
bin/

# IntelliJ Idea
/.idea/

# OS
.DS_Store
.*.swp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -691,16 +691,15 @@ protected void processOrphan(String sourceName, String sinkName, String key, Str
}
}

private Map<String, String> loadSubstitutions(String masterRef, String selector, String substitutionsRef)
throws IOException, URISyntaxException {
private Map<String, String> loadSubstitutions(String masterRef, String selector, String substitutionsRef) {
String referenceName = "Substitutions matching [ " + selector + " ]";
List<String> substitutionsRefs = Strings.split(substitutionsRef);

Map<String, String> substitutions = substitutionsRefs.stream()
.reduce(new HashMap<>(), asBiFunction((props, ref) -> {
String relativeSubstitutionsRef = (masterRef != null) ? relativize(ref, masterRef) : ref;
if (!relativeSubstitutionsRef.equals(ref)) {
getLogger().debug(consoleMarker, "Adjusted substition reference from [ {} ] to [ {} ]", ref,
getLogger().debug(consoleMarker, "Adjusted substitution reference from [ {} ] to [ {} ]", ref,
relativeSubstitutionsRef);
}
Properties p = loadProperties0(referenceName, relativeSubstitutionsRef);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ public void recordDuplicated(Action action) {

private static final String DATA_LINE = "[ %14s ] [ %6s ] %10s [ %6s ] %10s [ %6s ]%s";

private String formatData(Object... parms) {
return String.format(DATA_LINE, parms);
private String formatData(Object... params) {
return String.format(DATA_LINE, params);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ class SelectionTests {
@Test
void selections() throws Exception {
UTF8Properties properties = new UTF8Properties();
properties.load("# comment\n*=UTF-8\n*.properties=ISO-8859-1\n*Abstract*=US-ASCII\nwide/*=UTF-16\n! comment\n*.proto=!", null, null);
properties.load("# comment\n" +
"*=UTF-8\n" +
"*.properties=ISO-8859-1\n" +
"*Abstract*=US-ASCII\n" +
"wide/*=UTF-16\n" +
"! comment\n" +
"*.proto=!", null, null);
Map<String, String> selectionProperties = new HashMap<>();
properties.forEach((k,v) -> {
selectionProperties.put(k.toString(), v.toString());
Expand Down