Skip to content

Commit

Permalink
Merge branch '1.3.x' into upgrade_2.0.20
Browse files Browse the repository at this point in the history
  • Loading branch information
mtakaki committed Mar 24, 2021
2 parents 09a3ed2 + 176245e commit 669a066
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -28,6 +28,7 @@ These are the supported versions of dropwizard:
| 1.3.1 | 1.3.1 | 3.0.0 |
| 1.3.8 | 1.3.8 | 3.3.0 |
| 1.3.18 | 1.3.18 | 3.3.1 |
| 1.3.29 | 1.3.29 | 4.0.3 |
| 2.0.0 | 2.0.0 | 3.4.1 |
| 2.0.1 | 2.0.1 | 3.4.2 |
| 2.0.2 | 2.0.2 | 3.4.2 |
Expand All @@ -43,7 +44,7 @@ The library is available at the maven central, so just add dependency to `pom.xm
<dependency>
<groupId>com.github.mtakaki</groupId>
<artifactId>dropwizard-hikaricp</artifactId>
<version>2.0.10</version>
<version>2.0.20</version>
</dependency>
</dependencies>
```
Expand Down
12 changes: 12 additions & 0 deletions pom.xml
Expand Up @@ -70,6 +70,18 @@
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>${hikaricp.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.25.0-GA</version>
</dependency>

<!-- Avoids boilerplate code -->
Expand Down
12 changes: 7 additions & 5 deletions src/main/java/io/dropwizard/db/DataSourceFactory.java
Expand Up @@ -6,6 +6,7 @@
import java.util.Properties;
import java.util.concurrent.TimeUnit;

import javax.annotation.Nullable;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

Expand Down Expand Up @@ -323,13 +324,14 @@ public void setCommitOnReturn(final boolean commitOnReturn) {
}

@JsonProperty
public Optional<Boolean> getAutoCommitByDefault() {
return this.autoCommitByDefault;
@Nullable
public Boolean getAutoCommitByDefault() {
return this.autoCommitByDefault.orElse(null);
}

@JsonProperty
public void setAutoCommitByDefault(final Optional<Boolean> autoCommit) {
this.autoCommitByDefault = autoCommit;
public void setAutoCommitByDefault(final Boolean autoCommit) {
this.autoCommitByDefault = Optional.ofNullable(autoCommit);
}

@JsonProperty
Expand Down Expand Up @@ -565,4 +567,4 @@ public ManagedDataSource build(final MetricRegistry metricRegistry, final String
public java.util.Optional<Duration> getValidationQueryTimeout() {
return Optional.ofNullable(this.validationQueryTimeout);
}
}
}

0 comments on commit 669a066

Please sign in to comment.