diff --git a/ballerina-tests/Ballerina.toml b/ballerina-tests/Ballerina.toml index c459b6c5..5672b49e 100644 --- a/ballerina-tests/Ballerina.toml +++ b/ballerina-tests/Ballerina.toml @@ -1,10 +1,10 @@ [package] org = "ballerina" name = "websub_tests" -version = "2.10.0" +version = "2.10.1" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] -path = "../native/build/libs/websub-native-2.10.0.jar" +path = "../native/build/libs/websub-native-2.10.1-SNAPSHOT.jar" diff --git a/ballerina-tests/Dependencies.toml b/ballerina-tests/Dependencies.toml index f6d05ec7..a00ec0e4 100644 --- a/ballerina-tests/Dependencies.toml +++ b/ballerina-tests/Dependencies.toml @@ -66,7 +66,7 @@ dependencies = [ [[package]] org = "ballerina" name = "http" -version = "2.10.0" +version = "2.10.3" scope = "testOnly" dependencies = [ {org = "ballerina", name = "auth"}, @@ -315,7 +315,7 @@ dependencies = [ [[package]] org = "ballerina" name = "websub" -version = "2.10.0" +version = "2.10.1" scope = "testOnly" dependencies = [ {org = "ballerina", name = "crypto"}, @@ -336,7 +336,7 @@ modules = [ [[package]] org = "ballerina" name = "websub_tests" -version = "2.10.0" +version = "2.10.1" dependencies = [ {org = "ballerina", name = "test"}, {org = "ballerina", name = "websub"} diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index d067f279..8a680a1b 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "websub" -version = "2.10.0" +version = "2.10.1" authors = ["Ballerina"] keywords = ["websub", "subscriber", "service", "listener"] repository = "https://github.com/ballerina-platform/module-ballerina-websub" @@ -15,5 +15,5 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "websub-native" -version = "2.10.0" -path = "../native/build/libs/websub-native-2.10.0.jar" +version = "2.10.1" +path = "../native/build/libs/websub-native-2.10.1-SNAPSHOT.jar" diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index c52f82c5..bf70174e 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "websub-compiler-plugin" class = "io.ballerina.stdlib.websub.WebSubCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/websub-compiler-plugin-2.10.0.jar" +path = "../compiler-plugin/build/libs/websub-compiler-plugin-2.10.1-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 21a0e6f9..fc33e18e 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -64,7 +64,7 @@ dependencies = [ [[package]] org = "ballerina" name = "http" -version = "2.10.0" +version = "2.10.3" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, @@ -335,7 +335,7 @@ modules = [ [[package]] org = "ballerina" name = "websub" -version = "2.10.0" +version = "2.10.1" dependencies = [ {org = "ballerina", name = "crypto"}, {org = "ballerina", name = "http"}, diff --git a/changelog.md b/changelog.md index c818e067..629a8f3d 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - [Introduce new `ClientConfiguration` record to be used for `websub:SubscriptionClient` and `websub:DiscoveryService`](https://github.com/ballerina-platform/ballerina-standard-library/issues/4706) +### Changed +- [Make some of the Java classes proper utility classes](https://github.com/ballerina-platform/ballerina-standard-library/issues/4927) + ## [2.9.1] - 2023-09-14 ### Added diff --git a/compiler-plugin-tests/src/test/java/io/ballerina/stdlib/websub/TestUtils.java b/compiler-plugin-tests/src/test/java/io/ballerina/stdlib/websub/TestUtils.java index 0dd5dff7..bf230b50 100644 --- a/compiler-plugin-tests/src/test/java/io/ballerina/stdlib/websub/TestUtils.java +++ b/compiler-plugin-tests/src/test/java/io/ballerina/stdlib/websub/TestUtils.java @@ -33,6 +33,8 @@ * {@code TestUtils} contains the utility methods for compiler plugin tests. */ public final class TestUtils { + private TestUtils() {} + private static final Path RESOURCE_PATH = Paths.get("src", "test", "resources"); private static final Path DISTRIBUTION_PATH = Paths .get("../", "target", "ballerina-runtime").toAbsolutePath(); diff --git a/compiler-plugin/src/main/java/io/ballerina/stdlib/websub/CommonUtil.java b/compiler-plugin/src/main/java/io/ballerina/stdlib/websub/CommonUtil.java index c92123d9..78ce4e1e 100644 --- a/compiler-plugin/src/main/java/io/ballerina/stdlib/websub/CommonUtil.java +++ b/compiler-plugin/src/main/java/io/ballerina/stdlib/websub/CommonUtil.java @@ -30,6 +30,8 @@ * {@code CommonUtil} contains common utility functions related to compiler-plugin. */ public final class CommonUtil { + private CommonUtil() {} + public static Optional extractSubscriberServiceConfig(ServiceDeclarationSymbol service) { return service.annotations() .stream() diff --git a/compiler-plugin/src/main/java/io/ballerina/stdlib/websub/action/CodeActionUtil.java b/compiler-plugin/src/main/java/io/ballerina/stdlib/websub/action/CodeActionUtil.java index 542295b2..405fe4e3 100644 --- a/compiler-plugin/src/main/java/io/ballerina/stdlib/websub/action/CodeActionUtil.java +++ b/compiler-plugin/src/main/java/io/ballerina/stdlib/websub/action/CodeActionUtil.java @@ -34,6 +34,8 @@ * {@code CodeActionUtil} contains utility functions related to code-actions. */ public final class CodeActionUtil { + private CodeActionUtil() {} + /** * Finds a node in syntax-tree by line-range. * diff --git a/compiler-plugin/src/main/java/io/ballerina/stdlib/websub/task/AnalyserUtils.java b/compiler-plugin/src/main/java/io/ballerina/stdlib/websub/task/AnalyserUtils.java index 9f4b609f..60681a4d 100644 --- a/compiler-plugin/src/main/java/io/ballerina/stdlib/websub/task/AnalyserUtils.java +++ b/compiler-plugin/src/main/java/io/ballerina/stdlib/websub/task/AnalyserUtils.java @@ -47,6 +47,8 @@ * {@code AnalyserUtils} contains utility functions required for {@code websub:SubscriberService} validation. */ public final class AnalyserUtils { + private AnalyserUtils() {} + public static void updateContext(SyntaxNodeAnalysisContext context, WebSubDiagnosticCodes errorCode, NodeLocation location, Object... args) { DiagnosticInfo diagnosticInfo = new DiagnosticInfo( diff --git a/native/src/main/java/io/ballerina/stdlib/websub/NativeHttpToWebsubAdaptor.java b/native/src/main/java/io/ballerina/stdlib/websub/NativeHttpToWebsubAdaptor.java index f18d61da..ab2df15e 100644 --- a/native/src/main/java/io/ballerina/stdlib/websub/NativeHttpToWebsubAdaptor.java +++ b/native/src/main/java/io/ballerina/stdlib/websub/NativeHttpToWebsubAdaptor.java @@ -53,7 +53,9 @@ /** * {@code NativeHttpToWebsubAdaptor} is a wrapper object used for service method execution. */ -public class NativeHttpToWebsubAdaptor { +public final class NativeHttpToWebsubAdaptor { + private NativeHttpToWebsubAdaptor() {} + public static void externInit(BObject adaptor, BObject service) { adaptor.addNativeData(SERVICE_OBJECT, service); } diff --git a/native/src/main/java/io/ballerina/stdlib/websub/NativeWebSubListenerAdaptor.java b/native/src/main/java/io/ballerina/stdlib/websub/NativeWebSubListenerAdaptor.java index 696eb803..4c16fa24 100644 --- a/native/src/main/java/io/ballerina/stdlib/websub/NativeWebSubListenerAdaptor.java +++ b/native/src/main/java/io/ballerina/stdlib/websub/NativeWebSubListenerAdaptor.java @@ -36,7 +36,9 @@ /** * {@code NativeWebSubListenerAdaptor} is a wrapper object used to save/retrieve native data related to WebSub Listener. */ -public class NativeWebSubListenerAdaptor { +public final class NativeWebSubListenerAdaptor { + private NativeWebSubListenerAdaptor() {} + public static void externAttach(BObject websubListener, BString servicePath, BObject subscriberService, BObject httpService, BMap subscriberConfig) {