Skip to content

Commit

Permalink
Make some Java classes proper utilities
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vil02 committed Oct 23, 2023
1 parent bd592fe commit 08723e8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion native/src/main/java/org/wssec/WsSecurity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 3 additions & 1 deletion native/src/main/java/org/wssec/WsSecurityUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<WSEncryptionPart> parts = new ArrayList<>(1);
Expand Down

0 comments on commit 08723e8

Please sign in to comment.