From bd592fe7107987184eebb83b42afad53a3fa933b Mon Sep 17 00:00:00 2001 From: vil02 Date: Mon, 23 Oct 2023 17:17:28 +0200 Subject: [PATCH 1/2] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 6 +++--- ballerina/Dependencies.toml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 447ce58..98830b0 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "soap" -version = "0.8.0" +version = "0.8.1" authors = ["Ballerina"] export=["soap", "soap.soap11", "soap.soap12"] keywords = ["soap"] @@ -19,8 +19,8 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "soap-native" -version = "0.8.0" -path = "../native/build/libs/soap-native-0.8.0.jar" +version = "0.8.1" +path = "../native/build/libs/soap-native-0.8.1-SNAPSHOT.jar" [[platform.java17.dependency]] groupId = "org.apache.wss4j" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 98717ce..f390a49 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -64,7 +64,7 @@ dependencies = [ [[package]] org = "ballerina" name = "http" -version = "2.10.1" +version = "2.10.3" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, @@ -269,7 +269,7 @@ dependencies = [ [[package]] org = "ballerina" name = "soap" -version = "0.8.0" +version = "0.8.1" dependencies = [ {org = "ballerina", name = "crypto"}, {org = "ballerina", name = "http"}, From 08723e86d337519b6ee33ecf7e424d89f35c545a Mon Sep 17 00:00:00 2001 From: vil02 Date: Mon, 23 Oct 2023 17:18:33 +0200 Subject: [PATCH 2/2] Make some Java classes proper utilities Made the design cleaner by marking Java classes as `final` and explicitly declaring their default constructors as `private`. This change makes the code coverage reports more accurate. Closes #5075. --- changelog.md | 3 +++ native/src/main/java/org/wssec/WsSecurity.java | 4 +++- native/src/main/java/org/wssec/WsSecurityUtils.java | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 558c38e..c75c193 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,9 @@ This file contains all the notable changes done to the Ballerina SOAP package th ## [Unreleased] +### Changed +- [Make some of the Java classes proper utility classes](https://github.com/ballerina-platform/ballerina-standard-library/issues/5075) + ## [0.8.0] - 2023-10-16 ### Added diff --git a/native/src/main/java/org/wssec/WsSecurity.java b/native/src/main/java/org/wssec/WsSecurity.java index 5e74312..ebf30b7 100644 --- a/native/src/main/java/org/wssec/WsSecurity.java +++ b/native/src/main/java/org/wssec/WsSecurity.java @@ -56,7 +56,9 @@ import static org.wssec.WsSecurityUtils.convertDocumentToString; import static org.wssec.WsSecurityUtils.setUTChildElements; -public class WsSecurity { +public final class WsSecurity { + + private WsSecurity() {} public static Object applyUsernameTokenPolicy(BObject wsSecHeader, BString username, BString password, BString passwordType) { diff --git a/native/src/main/java/org/wssec/WsSecurityUtils.java b/native/src/main/java/org/wssec/WsSecurityUtils.java index 38c45e4..e7dcbf4 100644 --- a/native/src/main/java/org/wssec/WsSecurityUtils.java +++ b/native/src/main/java/org/wssec/WsSecurityUtils.java @@ -59,7 +59,9 @@ import static org.wssec.Constants.XML_DS_NS; import static org.wssec.Constants.XML_ENC_NS; -public class WsSecurityUtils { +public final class WsSecurityUtils { + + private WsSecurityUtils() {} public static void buildSignature(RequestData reqData, WSSecSignature sign) throws Exception { List parts = new ArrayList<>(1);