Skip to content

Commit

Permalink
update to fix error-prone findings
Browse files Browse the repository at this point in the history
  • Loading branch information
jpdahlke committed Jan 17, 2025
1 parent 4ea3b62 commit cc82b16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/main/java/emissary/command/converter/ModeConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

import picocli.CommandLine.ITypeConverter;

import java.util.Locale;

public class ModeConverter implements ITypeConverter<EmissaryNode.Mode> {

@Override
public EmissaryNode.Mode convert(String s) throws Exception {
switch (s.toLowerCase()) {
switch (s.toLowerCase(Locale.getDefault())) {
case "cluster":
return EmissaryNode.Mode.CLUSTER;
case "standalone":
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/emissary/server/api/PeersIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void peersNoDirectoryPlace() throws NamespaceException {

static class TestEmissaryNode extends EmissaryNode {

public TestEmissaryNode(Mode mode) {
public TestEmissaryNode(EmissaryNode.Mode mode) {
super(mode);
nodeNameIsDefault = true;
}
Expand Down

0 comments on commit cc82b16

Please sign in to comment.