diff --git a/pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java b/pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java index eb653666e9..fec5bb0a37 100644 --- a/pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java +++ b/pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java @@ -280,7 +280,7 @@ public ProtocolConnection openConnectionImpl(HostSpec[] hostSpecs, String user, * * @return The current JVM time zone in postgresql format. */ - private String createPostgresTimeZone() { + private static String createPostgresTimeZone() { String tz = TimeZone.getDefault().getID(); if (tz.length() <= 3 || !tz.startsWith("GMT")) { return tz; diff --git a/pgjdbc/src/main/java/org/postgresql/ds/common/BaseDataSource.java b/pgjdbc/src/main/java/org/postgresql/ds/common/BaseDataSource.java index ba3148787e..9037a25d72 100644 --- a/pgjdbc/src/main/java/org/postgresql/ds/common/BaseDataSource.java +++ b/pgjdbc/src/main/java/org/postgresql/ds/common/BaseDataSource.java @@ -1133,7 +1133,7 @@ public void setFromReference(Reference ref) { } } - private String getReferenceProperty(Reference ref, String propertyName) { + private static String getReferenceProperty(Reference ref, String propertyName) { RefAddr addr = ref.get(propertyName); if (addr == null) { return null; diff --git a/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java b/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java index 82a7d87193..2a3b5df7b1 100644 --- a/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java +++ b/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java @@ -2059,7 +2059,7 @@ private static List parseACLArray(String aclString) { * Add the user described by the given acl to the Lists of users with the privileges described by * the acl. */ - private void addACLPrivileges(String acl, Map>> privileges) { + private static void addACLPrivileges(String acl, Map>> privileges) { int equalIndex = acl.lastIndexOf("="); int slashIndex = acl.lastIndexOf("/"); if (equalIndex == -1) { diff --git a/pgjdbc/src/main/java/org/postgresql/util/PGInterval.java b/pgjdbc/src/main/java/org/postgresql/util/PGInterval.java index ca53fd141b..85a47908b6 100644 --- a/pgjdbc/src/main/java/org/postgresql/util/PGInterval.java +++ b/pgjdbc/src/main/java/org/postgresql/util/PGInterval.java @@ -375,7 +375,7 @@ public void scale(int factor) { * @return integer parsed from string value * @throws NumberFormatException if the string contains invalid chars */ - private int nullSafeIntGet(String value) throws NumberFormatException { + private static int nullSafeIntGet(String value) throws NumberFormatException { return (value == null) ? 0 : Integer.parseInt(value); } @@ -386,7 +386,7 @@ private int nullSafeIntGet(String value) throws NumberFormatException { * @return double parsed from string value * @throws NumberFormatException if the string contains invalid chars */ - private double nullSafeDoubleGet(String value) throws NumberFormatException { + private static double nullSafeDoubleGet(String value) throws NumberFormatException { return (value == null) ? 0 : Double.parseDouble(value); } diff --git a/pgjdbc/src/main/java/org/postgresql/util/StreamWrapper.java b/pgjdbc/src/main/java/org/postgresql/util/StreamWrapper.java index bebded982a..4a42891825 100644 --- a/pgjdbc/src/main/java/org/postgresql/util/StreamWrapper.java +++ b/pgjdbc/src/main/java/org/postgresql/util/StreamWrapper.java @@ -159,7 +159,7 @@ public String toString() { return ""; } - private int copyStream(InputStream inputStream, OutputStream outputStream, int limit) + private static int copyStream(InputStream inputStream, OutputStream outputStream, int limit) throws IOException { int totalLength = 0; byte[] buffer = new byte[2048]; diff --git a/ubenchmark/src/main/java/org/postgresql/benchmark/profilers/FlightRecorderProfiler.java b/ubenchmark/src/main/java/org/postgresql/benchmark/profilers/FlightRecorderProfiler.java index 040684488e..379af5a6b7 100644 --- a/ubenchmark/src/main/java/org/postgresql/benchmark/profilers/FlightRecorderProfiler.java +++ b/ubenchmark/src/main/java/org/postgresql/benchmark/profilers/FlightRecorderProfiler.java @@ -50,7 +50,7 @@ public Collection addJVMOptions(BenchmarkParams params) { + params.getBenchmark() + "_" + sb + ".jfr"); } - private long getDurationSeconds(IterationParams warmup) { + private static long getDurationSeconds(IterationParams warmup) { return warmup.getTime().convertTo(TimeUnit.SECONDS) * warmup.getCount(); }