From 596f1299cddbdfd30ad840cc145d2df3286f304c Mon Sep 17 00:00:00 2001 From: Sualeh Fatehi Date: Wed, 30 Oct 2024 19:31:24 -0400 Subject: [PATCH] Fix workflow --- .github/workflows/diff-output.yml | 2 +- .../java/schemacrawler/crawl/MutableRoutine.java | 16 ++++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/diff-output.yml b/.github/workflows/diff-output.yml index 2cdbea0e0d..72cfc92287 100644 --- a/.github/workflows/diff-output.yml +++ b/.github/workflows/diff-output.yml @@ -56,7 +56,7 @@ jobs: # ./.github/scripts/diff-output.sh \ schemacrawler-oracle/src/test/resources/testOraclePortable.txt \ - schemacrawler-postgresql/src/test/resources/testDB2Portable.txt \ + schemacrawler-postgresql/src/test/resources/testPostgreSQLPortable.txt \ ./diff-output/oracle-postgresql.html \ "Oracle - PostgreSQL" # diff --git a/schemacrawler-api/src/main/java/schemacrawler/crawl/MutableRoutine.java b/schemacrawler-api/src/main/java/schemacrawler/crawl/MutableRoutine.java index 9a9670e124..cf7e67130a 100644 --- a/schemacrawler-api/src/main/java/schemacrawler/crawl/MutableRoutine.java +++ b/schemacrawler-api/src/main/java/schemacrawler/crawl/MutableRoutine.java @@ -28,10 +28,8 @@ package schemacrawler.crawl; -import static us.fatehi.utility.Utility.isBlank; - import java.util.List; - +import static us.fatehi.utility.Utility.isBlank; import schemacrawler.schema.NamedObject; import schemacrawler.schema.NamedObjectKey; import schemacrawler.schema.Routine; @@ -78,16 +76,15 @@ public int compareTo(final NamedObject obj) { if (obj instanceof Routine) { final Routine other = (Routine) obj; + if (comparison == 0) { + comparison = getSpecificName().compareTo(other.getSpecificName()); + } if (comparison == 0) { final List> thisParameters = getParameters(); final List> otherParameters = other.getParameters(); comparison = CompareUtility.compareLists(thisParameters, otherParameters); } - - if (comparison == 0) { - comparison = this.getSpecificName().compareTo(other.getSpecificName()); - } } return comparison; @@ -114,9 +111,8 @@ public RoutineType getRoutineType() { public final String getSpecificName() { if (isBlank(specificName)) { return getName(); - } else { - return specificName; } + return specificName; } /** {@inheritDoc} */ @@ -150,6 +146,6 @@ private void buildKey() { if (key != null) { return; } - this.key = super.key().with(specificName); + key = super.key().with(specificName); } }