Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add @Override annotation where needed. #42

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/main/java/com/zaxxer/hikari/HikariConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,14 @@ public HikariConfig(String propertyFileName)
}

/** {@inheritDoc} */
@Override
public int getAcquireIncrement()
{
return acquireIncrement;
}

/** {@inheritDoc} */
@Override
public void setAcquireIncrement(int acquireIncrement)
{
if (acquireIncrement < 1)
Expand All @@ -160,12 +162,14 @@ public void setAcquireIncrement(int acquireIncrement)
}

/** {@inheritDoc} */
@Override
public int getAcquireRetries()
{
return acquireRetries;
}

/** {@inheritDoc} */
@Override
public void setAcquireRetries(int acquireRetries)
{
if (acquireRetries < 0)
Expand All @@ -176,12 +180,14 @@ public void setAcquireRetries(int acquireRetries)
}

/** {@inheritDoc} */
@Override
public long getAcquireRetryDelay()
{
return acquireRetryDelay;
}

/** {@inheritDoc} */
@Override
public void setAcquireRetryDelay(long acquireRetryDelayMs)
{
if (acquireRetryDelayMs < 0)
Expand Down Expand Up @@ -280,12 +286,14 @@ public void setConnectionInitSql(String connectionInitSql)
}

/** {@inheritDoc} */
@Override
public long getConnectionTimeout()
{
return connectionTimeout;
}

/** {@inheritDoc} */
@Override
public void setConnectionTimeout(long connectionTimeoutMs)
{
if (connectionTimeoutMs == 0)
Expand Down Expand Up @@ -363,12 +371,14 @@ public void setDriverClassName(String driverClassName)
}

/** {@inheritDoc} */
@Override
public long getIdleTimeout()
{
return idleTimeout;
}

/** {@inheritDoc} */
@Override
public void setIdleTimeout(long idleTimeoutMs)
{
this.idleTimeout = idleTimeoutMs;
Expand Down Expand Up @@ -467,12 +477,14 @@ public void setRegisterMbeans(boolean register)
}

/** {@inheritDoc} */
@Override
public long getLeakDetectionThreshold()
{
return leakDetectionThreshold;
}

/** {@inheritDoc} */
@Override
public void setLeakDetectionThreshold(long leakDetectionThresholdMs)
{
this.leakDetectionThreshold = leakDetectionThresholdMs;
Expand All @@ -484,24 +496,28 @@ public void setUseInstrumentation(boolean useInstrumentation)
}

/** {@inheritDoc} */
@Override
public long getMaxLifetime()
{
return maxLifetime;
}

/** {@inheritDoc} */
@Override
public void setMaxLifetime(long maxLifetimeMs)
{
this.maxLifetime = maxLifetimeMs;
}

/** {@inheritDoc} */
@Override
public int getMinimumPoolSize()
{
return minPoolSize;
}

/** {@inheritDoc} */
@Override
public void setMinimumPoolSize(int minPoolSize)
{
if (minPoolSize < 0)
Expand All @@ -512,12 +528,14 @@ public void setMinimumPoolSize(int minPoolSize)
}

/** {@inheritDoc} */
@Override
public int getMaximumPoolSize()
{
return maxPoolSize;
}

/** {@inheritDoc} */
@Override
public void setMaximumPoolSize(int maxPoolSize)
{
if (maxPoolSize < 0)
Expand All @@ -528,6 +546,7 @@ public void setMaximumPoolSize(int maxPoolSize)
}

/** {@inheritDoc} */
@Override
public String getPoolName()
{
return poolName;
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/zaxxer/hikari/HikariDataSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public HikariDataSource(HikariConfig configuration)
}

/** {@inheritDoc} */
@Override
public Connection getConnection() throws SQLException
{
if (isShutdown)
Expand Down Expand Up @@ -96,6 +97,7 @@ public Connection getConnection() throws SQLException
}

/** {@inheritDoc} */
@Override
public Connection getConnection(String username, String password) throws SQLException
{
LOGGER.warn("getConnection() with username and password is not supported, calling getConnection() instead");
Expand All @@ -104,12 +106,14 @@ public Connection getConnection(String username, String password) throws SQLExce
}

/** {@inheritDoc} */
@Override
public PrintWriter getLogWriter() throws SQLException
{
return (pool.dataSource != null ? pool.dataSource.getLogWriter() : null);
}

/** {@inheritDoc} */
@Override
public void setLogWriter(PrintWriter out) throws SQLException
{
if (pool.dataSource != null)
Expand All @@ -119,31 +123,36 @@ public void setLogWriter(PrintWriter out) throws SQLException
}

/** {@inheritDoc} */
@Override
public void setLoginTimeout(int seconds) throws SQLException
{
this.loginTimeout = seconds;
}

/** {@inheritDoc} */
@Override
public int getLoginTimeout() throws SQLException
{
return loginTimeout;
}

/** {@inheritDoc} */
@Override
public java.util.logging.Logger getParentLogger() throws SQLFeatureNotSupportedException
{
throw new SQLFeatureNotSupportedException();
}

/** {@inheritDoc} */
@Override
public <T> T unwrap(Class<T> iface) throws SQLException
{
// TODO Auto-generated method stub
return null;
}

/** {@inheritDoc} */
@Override
public boolean isWrapperFor(Class<?> iface) throws SQLException
{
return (this.getClass().isAssignableFrom(iface));
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/zaxxer/hikari/HikariPool.java
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ private void logPoolState(String... prefix)
*/
private class HouseKeeper extends TimerTask
{
@Override
public void run()
{
debug = LOGGER.isDebugEnabled();
Expand Down
Loading