Skip to content

Commit

Permalink
[refactor] Replace C-style array declaration with Java-style (#16525)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsxu authored Jul 13, 2022
1 parent 0dee92d commit 8d1fb17
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private static boolean argsContains(String[] args, String arg) {
return Arrays.asList(args).contains(arg);
}

public static void main(String args[]) throws Exception {
public static void main(String[] args) throws Exception {
// Start standalone
PulsarStandaloneStarter standalone = new PulsarStandaloneStarter(args);
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private static class Arguments {
private boolean generateDocs = false;
}

public static void main(String args[]) {
public static void main(String[] args) {
Arguments arguments = new Arguments();
JCommander jcommander = new JCommander();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected void cleanup() throws Exception {

@Test
public void testWithoutMetadataStoreUrlInConfFile() throws Exception {
String args[] = new String[]{"--config",
String[] args = new String[]{"--config",
"../conf/standalone.conf"};
PulsarStandaloneStarter standalone = new PulsarStandaloneStarter(args);
assertNotNull(standalone.getConfig().getProperties().getProperty("metadataStoreUrl"));
Expand All @@ -50,7 +50,7 @@ public void testWithoutMetadataStoreUrlInConfFile() throws Exception {

@Test
public void testAdvertised() throws Exception {
String args[] = new String[]{"--config",
String[] args = new String[]{"--config",
"./src/test/resources/configurations/pulsar_broker_test_standalone.conf"};
PulsarStandaloneStarter standalone = new PulsarStandaloneStarter(args);
assertNull(standalone.getConfig().getAdvertisedAddress());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public String getConnectionString() {

public static boolean waitForServerUp(String hp, long timeout) {
long start = System.currentTimeMillis();
String split[] = hp.split(":");
String[] split = hp.split(":");
String host = split[0];
int port = Integer.parseInt(split[1]);
while (true) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private static class Arguments {
private boolean generateDocs = false;
}

public static void main(String args[]) throws Exception {
public static void main(String[] args) throws Exception {
Arguments arguments = new Arguments();
JCommander jcommander = new JCommander();
try {
Expand Down

0 comments on commit 8d1fb17

Please sign in to comment.