Skip to content

Commit

Permalink
Remove redundant return statement after exitWithError
Browse files Browse the repository at this point in the history
  • Loading branch information
Brijeshthummar02 committed Mar 3, 2025
1 parent 69d5223 commit 42ca8c9
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,16 @@ public void handle() {

if (client == null) {
exitWithError("Client initialization failed.");
return;
}
if (tableName == null) {
exitWithError("Table name could not be determined.");
return;
}

try {
tableData = readTableCSV.parse(columnFile);
columns = readTableCSV.columns(tableData);
if (columns == null || columns.length == 0) {
exitWithError("No valid columns found in the provided file.");
return;
}
} catch (Exception exp) {
exitWithError("Error reading or parsing column file: " + exp.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.apache.gravitino.cli.ErrorMessages;
import org.apache.gravitino.client.GravitinoClient;
import org.apache.gravitino.exceptions.NoSuchCatalogException;
import org.apache.gravitino.exceptions.NoSuchMetalakeException;

/** List the properties of a catalog. */
public class ListCatalogProperties extends ListProperties {
Expand Down Expand Up @@ -53,8 +52,6 @@ public void handle() {

try (GravitinoClient client = buildClient(metalake)) {
gCatalog = client.loadCatalog(catalog);
} catch (NoSuchMetalakeException err) {
exitWithError(ErrorMessages.UNKNOWN_METALAKE);
} catch (NoSuchCatalogException err) {
exitWithError(ErrorMessages.UNKNOWN_CATALOG);
} catch (Exception exp) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public void handle() {

if (columns == null || columns.length == 0) {
exitWithError("No columns found for the specified table.");
return;
}

StringBuilder all = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public void handle() {

if (gFileset == null) {
exitWithError("Failed to load fileset: " + fileset);
return;
}

printProperties(gFileset.properties() != null ? gFileset.properties() : Collections.emptyMap());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public void handle() {

if (gMetalake == null) {
exitWithError("Metalake not found: " + metalake);
return;
}

Map<String, String> properties = gMetalake.properties();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public void handle() {

if (gSchema == null) {
exitWithError("Schema not found: " + schema);
return;
}

Map<String, String> properties = gSchema.properties();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public void handle() {

if (gTable == null) {
exitWithError("Table not found: " + table);
return;
}

Map<String, String> properties = gTable.properties();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public void handle() {

if (gTag == null) {
exitWithError(ErrorMessages.UNKNOWN_TAG);
return;
}

Map<String, String> properties = gTag.properties();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public void handle() {

if (gTopic == null) {
exitWithError(ErrorMessages.UNKNOWN_TOPIC);
return;
}

Map<String, String> properties = gTopic.properties();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ public void handle() {

if (gModel == null) {
exitWithError(ErrorMessages.UNKNOWN_MODEL);
return;
}

String basicInfo =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public void handle() {

if (gTopic == null) {
exitWithError(ErrorMessages.UNKNOWN_TOPIC);
return;
}

printResults("Topic Name: " + gTopic.name() + ", Comment: " + gTopic.comment());
Expand Down

0 comments on commit 42ca8c9

Please sign in to comment.