Skip to content

Commit

Permalink
Merge pull request ballerina-platform#640 from vil02/4927_make_some_j…
Browse files Browse the repository at this point in the history
…ava_classes_proper_utilities

Make some of the Java classes proper utilities
  • Loading branch information
ThisaruGuruge authored Oct 23, 2023
2 parents 79156e3 + a61d923 commit fa72756
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 13 deletions.
4 changes: 2 additions & 2 deletions ballerina-tests/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -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"
6 changes: 3 additions & 3 deletions ballerina-tests/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down Expand Up @@ -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"},
Expand All @@ -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"}
Expand Down
6 changes: 3 additions & 3 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
2 changes: 1 addition & 1 deletion ballerina/CompilerPlugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down Expand Up @@ -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"},
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
* {@code CommonUtil} contains common utility functions related to compiler-plugin.
*/
public final class CommonUtil {
private CommonUtil() {}

public static Optional<AnnotationSymbol> extractSubscriberServiceConfig(ServiceDeclarationSymbol service) {
return service.annotations()
.stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<BString, Object> subscriberConfig) {
Expand Down

0 comments on commit fa72756

Please sign in to comment.