Skip to content

Commit

Permalink
Merge pull request #3036 from hazendaz/master
Browse files Browse the repository at this point in the history
Small build cleanups, fix spelling, fix test warnings, remove hard coded hsqldb versions from internal code
  • Loading branch information
hazendaz authored Dec 10, 2023
2 parents e561f73 + a949357 commit ca826c5
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 31 deletions.
70 changes: 44 additions & 26 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@

<properties>
<clirr.comparisonVersion>3.4.6</clirr.comparisonVersion>

<byte-buddy.version>1.14.10</byte-buddy.version>
<derby.version>10.17.1.0</derby.version>
<log4j.version>2.22.0</log4j.version>
<mssql-jdbc.version>12.4.2.jre11</mssql-jdbc.version>
Expand Down Expand Up @@ -173,30 +175,6 @@
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.9</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
<version>1.2.25</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.3.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
Expand Down Expand Up @@ -291,9 +269,21 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>eu.codearte.catch-exception</groupId>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>${byte-buddy.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<version>${byte-buddy.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.hazendaz.catch-exception</groupId>
<artifactId>catch-exception</artifactId>
<version>2.0</version>
<version>2.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -321,6 +311,34 @@
<version>${mssql-jdbc.version}</version>
<scope>provided</scope>
</dependency>

<!-- Logging Support -->
<dependency>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
<version>1.2.25</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.3.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.9</version>
<optional>true</optional>
</dependency>

<!-- Logging Support used in testing -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ private ResultSetWrapper getFirstResultSet(Statement stmt) throws SQLException {
ResultSet rs = stmt.getResultSet();
while (rs == null) {
// move forward to get the first resultset in case the driver
// doesn't return the resultset as the first result (HSQLDB 2.1)
// doesn't return the resultset as the first result (HSQLDB)
if (stmt.getMoreResults()) {
rs = stmt.getResultSet();
} else if (stmt.getUpdateCount() == -1) {
Expand All @@ -261,7 +261,7 @@ private ResultSetWrapper getNextResultSet(Statement stmt) {
try {
if (stmt.getConnection().getMetaData().supportsMultipleResultSets()) {
// Crazy Standard JDBC way of determining if there are more results
// DO NOT try to 'imporove' the condition even if IDE tells you to!
// DO NOT try to 'improve' the condition even if IDE tells you to!
// It's important that getUpdateCount() is called here.
if (!(!stmt.getMoreResults() && stmt.getUpdateCount() == -1)) {
ResultSet rs = stmt.getResultSet();
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/apache/ibatis/io/ResolverUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void setClassLoader() {
@Test
void findImplementationsWithNullPackageName() {
ResolverUtil<VFS> resolverUtil = new ResolverUtil<>();
resolverUtil.findImplementations(VFS.class, null);
resolverUtil.findImplementations(VFS.class, (String[]) null);
assertEquals(resolverUtil.getClasses().size(), 0);
}

Expand All @@ -88,7 +88,7 @@ void findImplementations() {
@Test
void findAnnotatedWithNullPackageName() {
ResolverUtil<Object> resolverUtil = new ResolverUtil<>();
resolverUtil.findAnnotated(CacheNamespace.class, null);
resolverUtil.findAnnotated(CacheNamespace.class, (String[]) null);
assertEquals(resolverUtil.getClasses().size(), 0);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void shouldInsertOffsetDateTime() {
}
}

@Disabled("HSQLDB 2.4.1 does not support this.")
@Disabled("HSQLDB does not support this.")
@Test
void shouldInsertOffsetTime() {
OffsetTime ot = OffsetTime.of(11, 22, 33, 123456000, ZoneOffset.ofHoursMinutes(1, 23));
Expand Down

0 comments on commit ca826c5

Please sign in to comment.