org.postgresql.jdbc.QueryExecutorTimeZoneProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of postgresql-holo Show documentation
Show all versions of postgresql-holo Show documentation
PostgreSQL JDBC Driver Postgresql
The newest version!
/*
* Copyright (c) 2021, PostgreSQL Global Development Group
* See the LICENSE file in the project root for more information.
*/
package org.postgresql.jdbc;
import org.postgresql.core.Provider;
import org.postgresql.core.QueryExecutor;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.TimeZone;
/**
* This class workarounds Exception when
* indexing guava-30.0-jre.
* It looks like {@code jandex} does not support {@code new Interface<..>} with type annotations.
*
*/
class QueryExecutorTimeZoneProvider implements Provider<@Nullable TimeZone> {
private final QueryExecutor queryExecutor;
QueryExecutorTimeZoneProvider(QueryExecutor queryExecutor) {
this.queryExecutor = queryExecutor;
}
@Override
public @Nullable TimeZone get() {
return queryExecutor.getTimeZone();
}
}