Skip to content

Commit

Permalink
Upgrade Ballerina Lang version and Remove Ballerina internal runtime …
Browse files Browse the repository at this point in the history
…API usage
  • Loading branch information
AzeemMuzammil committed Jul 14, 2023
1 parent 81e5704 commit cfd5cf6
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 120 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<groupId>org.ballerinalang</groupId>
<artifactId>connector-redis-parent</artifactId>
<version>2.3.2</version>
<version>2.5.0</version>
<packaging>pom</packaging>

<scm>
Expand Down Expand Up @@ -313,7 +313,7 @@

<properties>
<project.scm.id>my-scm-server</project.scm.id>
<ballerina.version>2201.3.1</ballerina.version>
<ballerina.version>2201.7.0</ballerina.version>
<mvn.processor.plugin.version>2.2.4</mvn.processor.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.checkstyle.plugin.version>2.17</maven.checkstyle.plugin.version>
Expand Down
2 changes: 1 addition & 1 deletion redis-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>connector-redis-parent</artifactId>
<groupId>org.ballerinalang</groupId>
<version>2.3.2</version>
<version>2.5.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import io.ballerina.runtime.api.utils.StringUtils;
import io.ballerina.runtime.internal.values.MapValueImpl;
import io.ballerina.runtime.api.values.BString;
import io.ballerina.runtime.internal.util.exceptions.BallerinaException;

import java.time.Duration;
import java.util.ArrayList;
Expand Down Expand Up @@ -146,7 +145,7 @@ public void closeConnectionPool() {

private void setRedisStandaloneCommands(List<ServerAddress> serverAddresses, String password, MapValueImpl options) {
if (serverAddresses.size() > 1) {
throw new BallerinaException("More than one hosts have been provided for a non-cluster connection");
throw new RuntimeException("More than one hosts have been provided for a non-cluster connection");
}
RedisURI redisUri;
StatefulRedisConnection<K, V> statefulRedisConnection;
Expand Down Expand Up @@ -236,7 +235,7 @@ private ServerAddress createServerAddress(String hostStr) {
try {
port = Integer.parseInt(hostPort[1]);
} catch (NumberFormatException e) {
throw new BallerinaException("the port of the host string must be an integer: " + hostStr, e);
throw new RuntimeException("the port of the host string must be an integer: " + hostStr, e);
}
} else {
port = DEFAULT_REDIS_PORT;
Expand All @@ -248,7 +247,7 @@ private StatefulConnection<K, V> getStatefulRedisConnectionFromPool() {
try {
return objectPool.borrowObject();
} catch (Exception e) {
throw new BallerinaException("Error occurred while obtaining connection from the pool: " + e);
throw new RuntimeException("Error occurred while obtaining connection from the pool: " + e);
}
}

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import io.ballerina.runtime.api.values.BMap;
import org.ballerinalang.redis.Constants;
import org.ballerinalang.redis.RedisDataSource;
import io.ballerina.runtime.internal.util.exceptions.BallerinaException;

/**
* Creates a Redis client.
Expand Down Expand Up @@ -93,7 +92,7 @@ private static Constants.Codec retrieveCodec(String codecString) {
try {
return Constants.Codec.fromCodecName(codecString);
} catch (IllegalArgumentException e) {
throw new BallerinaException("Unsupported Codec: " + codecString);
throw new RuntimeException("Unsupported Codec: " + codecString);
}
}
}
9 changes: 6 additions & 3 deletions redis/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@
distribution = "2201.3.1"
org="ballerinax"
name = "redis"
version="2.3.2"
version="2.5.0"
authors = ["Ballerina"]
keywords = ["IT Operations/Databases", "Cost/Freemium"]
icon = "icon.png"
repository = "https://github.com/ballerina-platform/module-ballerinax-redis"
license = ["Apache-2.0"]

[platform.java11]
graalvmCompatible = true

[[platform.java11.dependency]]
path = "../redis-utils/target/redis-2.3.2.jar"
path = "../redis-utils/target/redis-2.5.0.jar"
groupId = "org.ballerinalang"
artifactId = "redis-utils"
module = "redis-utils"
version="2.3.2"
version="2.5.0"

[[platform.java11.dependency]]
path = "./libs/lettuce-core-5.1.2.RELEASE.jar"
Expand Down
2 changes: 1 addition & 1 deletion redis/Package.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This package provides the capability to access Redis and it provides the functio
### Compatibility
| | Version |
|---------------------|--------------------|
| Ballerina Language | Swan Lake 2201.3.0 |
| Ballerina Language | Swan Lake 2201.7.0 |

## Report issues
To report bugs, request new features, start new discussions, view project boards, etc., go to the [Ballerina Extended Library repository](https://github.com/ballerina-platform/ballerina-extended-library)
Expand Down
2 changes: 1 addition & 1 deletion redis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>connector-redis-parent</artifactId>
<groupId>org.ballerinalang</groupId>
<version>2.3.2</version>
<version>2.5.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down

0 comments on commit cfd5cf6

Please sign in to comment.