Skip to content

Commit

Permalink
Update dependency versions
Browse files Browse the repository at this point in the history
  • Loading branch information
LadyCailin committed Mar 27, 2024
1 parent 65f154d commit fd0913f
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 41 deletions.
69 changes: 38 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
<!-- Apache 2.0 -->
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.41.2.2</version>
<version>3.45.2.0</version>
<scope>compile</scope>
</dependency>

Expand All @@ -228,7 +228,7 @@
<!-- MIT -->
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.9.0</version>
<version>5.2.0-beta1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
Expand All @@ -238,7 +238,7 @@
<!-- GPL -->
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>8.0.33</version>
<version>8.3.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
Expand All @@ -259,15 +259,15 @@
<!-- NOTE: If you change this version, you also have to change the install-mssql-auth command to
download the corresponding version of the mssql-auth dll. This will also require users to re-install
it, so an upgrade routine will need to be released as well. -->
<version>8.2.2.jre8</version>
<version>12.6.1.jre11</version>
</dependency>

<!-- Yaml parsing -->
<dependency>
<!-- Apache 2.0 -->
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>2.0</version>
<version>2.2</version>
</dependency>

<!-- Apache commons IO -->
Expand Down Expand Up @@ -297,7 +297,7 @@
<!-- BSD -->
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.54</version>
<version>0.1.55</version>
</dependency>

<!-- Charset detection library -->
Expand All @@ -323,10 +323,17 @@
<!-- Test libraries -->
<!-- Hamcrest must come before powermock -->
<dependency>
<artifactId>hamcrest-core</artifactId>
<artifactId>hamcrest</artifactId>
<groupId>org.hamcrest</groupId>
<type>jar</type>
<version>1.3</version>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>hamcrest-library</artifactId>
<groupId>org.hamcrest</groupId>
<type>jar</type>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -338,7 +345,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.10.0</version>
<version>5.11.0</version>
<scope>test</scope>
</dependency>
<!--<dependency>
Expand All @@ -364,17 +371,17 @@
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<type>jar</type>
<version>1.13</version>
<version>1.16.1</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>9.1</version>
<version>9.7</version>
</dependency>
<dependency>
<groupId>jline</groupId>
<artifactId>jline</artifactId>
<version>2.14.5</version>
<version>2.14.6</version>
</dependency>
<!-- Java Mail -->
<dependency>
Expand All @@ -391,7 +398,7 @@
<dependency>
<groupId>org.eclipse.lsp4j</groupId>
<artifactId>org.eclipse.lsp4j</artifactId>
<version>0.21.0</version>
<version>0.22.0</version>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
Expand Down Expand Up @@ -482,7 +489,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.12.1</version>
<configuration>
<showDeprecation>true</showDeprecation>
<release>16</release>
Expand All @@ -498,7 +505,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<version>3.3.0</version>
<configuration>
<archive>
<addMavenDescriptor>true</addMavenDescriptor>
Expand All @@ -520,7 +527,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<version>3.5.2</version>
<executions>
<execution>
<id>ShadedBundle</id>
Expand Down Expand Up @@ -946,7 +953,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<version>3.2.0</version>
<executions>
<execution>
<id>cache-annotations</id>
Expand All @@ -967,7 +974,7 @@
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>5.0-jdk8-rc1</version>
<version>5.0-jdk8-rc3</version>
<executions>
<execution>
<id>process</id>
Expand All @@ -990,7 +997,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<version>3.2.5</version>
<configuration>
<trimStackTrace>false</trimStackTrace>
<includes>
Expand All @@ -1010,7 +1017,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.0.0-M4</version>
<version>3.0.1</version>
<configuration>
<pushChanges>false</pushChanges>
<localCheckout>true</localCheckout>
Expand All @@ -1022,37 +1029,37 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.0</version>
<version>3.6.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
<version>3.1.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<version>3.3.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.0.0-M1</version>
<version>3.1.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<version>3.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.9.1</version>
<version>4.0.0-M13</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand All @@ -1064,7 +1071,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.2</version>
<version>3.3.1</version>
<executions>
<execution>
<id>checkstyle</id>
Expand Down Expand Up @@ -1096,7 +1103,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-maven</id>
Expand All @@ -1106,7 +1113,7 @@
<configuration>
<rules>
<requireMavenVersion>
<version>3.5.2</version>
<version>3.6.3</version>
</requireMavenVersion>
</rules>
</configuration>
Expand Down Expand Up @@ -1147,7 +1154,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.13.0</version>
<configuration>
<showDeprecation>false</showDeprecation>
</configuration>
Expand Down
23 changes: 13 additions & 10 deletions src/main/java/com/laytonsmith/persistence/RedisDataSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import redis.clients.jedis.DefaultJedisClientConfig;
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisShardInfo;
import redis.clients.jedis.JedisClientConfig;
import redis.clients.jedis.Transaction;
import redis.clients.jedis.exceptions.JedisConnectionException;

Expand All @@ -26,7 +28,7 @@ public class RedisDataSource extends AbstractDataSource {

private Jedis connection;
private Transaction transaction;
private JedisShardInfo shardInfo;
private JedisClientConfig shardInfo;
private String host;
private int port;
private int timeout;
Expand All @@ -44,19 +46,16 @@ public RedisDataSource(URI uri, ConnectionMixinFactory.ConnectionMixinOptions op
host = uri.getHost();
port = uri.getPort();
Map<String, String> queryString = WebUtility.getQueryMap(uri.getQuery());
if(port == -1) {
shardInfo = new JedisShardInfo(host);
} else {
shardInfo = new JedisShardInfo(host, port);
}
DefaultJedisClientConfig.Builder builder = DefaultJedisClientConfig.builder();
if(queryString.containsKey("timeout")) {
timeout = Integer.parseInt(queryString.get("timeout"));
shardInfo.setSoTimeout(timeout);
builder.socketTimeoutMillis(timeout);
}
if(queryString.containsKey("password")) {
password = queryString.get("password");
shardInfo.setPassword(password);
builder.password(password);
}
shardInfo = builder.build();
connect();
} catch (Exception e) {
throw new DataSourceException(e.getMessage(), e);
Expand Down Expand Up @@ -87,7 +86,11 @@ private void connect() {
}
}
if(needToConnect) {
connection = new Jedis(shardInfo);
int oPort = 6379;
if(port != -1) {
oPort = port;
}
connection = new Jedis(new HostAndPort(host, oPort), shardInfo);
}
}

Expand Down

0 comments on commit fd0913f

Please sign in to comment.