Skip to content

Commit

Permalink
Merge pull request #473 from jeanouii/fix/typos
Browse files Browse the repository at this point in the history
fix: small typos
  • Loading branch information
bjhargrave authored Jun 8, 2023
2 parents 28ee51a + 9854b61 commit 5e1eefe
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
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

0 comments on commit 5e1eefe

Please sign in to comment.