From cb71f38b40b6c35a59bd1c2566e8df4c9cf54508 Mon Sep 17 00:00:00 2001 From: Chapman Flack Date: Fri, 8 Sep 2023 20:29:04 -0400 Subject: [PATCH] Rename AttNames.andIf to alsoIf The name andIf could be misread as suggesting some kind of boolean dependency on what went before, when really each alsoIf only cares about its own predicate. --- .../java/org/postgresql/pljava/pg/CatalogObjectImpl.java | 6 +++--- .../java/org/postgresql/pljava/pg/RegProcedureImpl.java | 2 +- .../src/main/java/org/postgresql/pljava/pg/RegTypeImpl.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pljava/src/main/java/org/postgresql/pljava/pg/CatalogObjectImpl.java b/pljava/src/main/java/org/postgresql/pljava/pg/CatalogObjectImpl.java index 649fd1b90..135edfed3 100644 --- a/pljava/src/main/java/org/postgresql/pljava/pg/CatalogObjectImpl.java +++ b/pljava/src/main/java/org/postgresql/pljava/pg/CatalogObjectImpl.java @@ -895,7 +895,7 @@ public String toString() * attribute names that may be conditional (on something like * {@code PG_VERSION_NUM}). *

- * {@code andIf} adds strings to the list, if the condition is true, or + * {@code alsoIf} adds strings to the list, if the condition is true, or * the same number of nulls of the condition is false. *

* {@code project} filters the list to only the non-null values, using @@ -920,7 +920,7 @@ static class AttNames implements Iterator private Projection it; private Iterator itsItr; - AttNames andIf(boolean p, String... toAdd) + AttNames alsoIf(boolean p, String... toAdd) { if ( p ) for ( String s : toAdd ) @@ -982,7 +982,7 @@ public Attribute next() */ static AttNames attNames(String... names) { - return new AttNames().andIf(true, names); + return new AttNames().alsoIf(true, names); } } diff --git a/pljava/src/main/java/org/postgresql/pljava/pg/RegProcedureImpl.java b/pljava/src/main/java/org/postgresql/pljava/pg/RegProcedureImpl.java index 02c83ecea..0aaccedb7 100644 --- a/pljava/src/main/java/org/postgresql/pljava/pg/RegProcedureImpl.java +++ b/pljava/src/main/java/org/postgresql/pljava/pg/RegProcedureImpl.java @@ -249,7 +249,7 @@ static class Att "probin", "proconfig", "proargdefaults" - ).andIf(PG_VERSION_NUM >= 140000, + ).alsoIf(PG_VERSION_NUM >= 140000, "prosqlbody" ).project(CLASSID.tupleDescriptor()); diff --git a/pljava/src/main/java/org/postgresql/pljava/pg/RegTypeImpl.java b/pljava/src/main/java/org/postgresql/pljava/pg/RegTypeImpl.java index 226cdab43..19b2c3da2 100644 --- a/pljava/src/main/java/org/postgresql/pljava/pg/RegTypeImpl.java +++ b/pljava/src/main/java/org/postgresql/pljava/pg/RegTypeImpl.java @@ -357,7 +357,7 @@ static class Att "typcollation", "typdefault", "typdefaultbin" - ).andIf(PG_VERSION_NUM >= 140000, + ).alsoIf(PG_VERSION_NUM >= 140000, "typsubscript" ).project(CLASSID.tupleDescriptor());