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

This PR modifies some code formatting #182

Merged
merged 3 commits into from
Nov 18, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class PackageResolver {

static String BITSAIL_HOME_KEY = "BITSAIL_HOME";

private static String LIBS_PATH = "./libs";
private static final String LIBS_PATH = "./libs";
private static String CLIENT_PATH = LIBS_PATH + "/clients";
private static String COMPONENTS_PATH = LIBS_PATH + "components";
private static String CONNECTORS_PATH = LIBS_PATH + "connectors";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public static void main(String[] args) {
.load(entry.sysConfiguration, entry.baseCommandArgs);

exit = securityContext.doAs(
() -> entry.runCommand());
entry::runCommand);

System.exit(exit);
} catch (Exception e) {
Expand All @@ -103,7 +103,7 @@ public static void main(String[] args) {
public static BaseCommandArgs loadCommandArguments(String[] args) {
if (args.length < 1) {
CommandArgsParser.printHelp();
System.out.println("Please specify an action. Supported action are" + CommandAction.RUN_COMMAND);
System.out.println("Please specify an action. Supported action are " + CommandAction.RUN_COMMAND);
System.exit(EntryConstants.ERROR_EXIT_CODE_COMMAND_ERROR);
}
final String mainCommand = args[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class BitSailConfiguration implements Serializable {
private static final long serialVersionUID = 1L;

private Set<String> secretKeyPathSet =
new HashSet<String>();
new HashSet<>();

private Object root = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public <T> ConfigOption<T> noDefaultValue(Class<T> clazz) {
}

public <T> ConfigOption<T> onlyReference(TypeReference<T> reference) {
return new ConfigOption<T>(key, null, reference);
return new ConfigOption<>(key, null, reference);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static Matcher listMatcher(String column) {
return LIST_VALUE_PATTERN.matcher(column);
}

public static enum PathType {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aozeyu why do we remove this static

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@garyli1019 hi, I think the properties of the enumeration java have already helped us turn it into static, there is no need to add static in front of the enumeration.
截屏2022-11-18 10 27 48

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks for the information!

public enum PathType {

/**
* Array list
Expand Down