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 excitability declaring their default constructors as `private`.
This change makes the code coverage reports more accurate.
Fixes #4902.
  • Loading branch information
vil02 committed Oct 10, 2023
1 parent 679fc2f commit 1fef543
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
[Fix the mismatch error by `fromXml` API while the field has the name annotation](https://github.com/ballerina-platform/ballerina-standard-library/issues/3802)
[Make some of the Java classes proper utility classes](https://github.com/ballerina-platform/ballerina-standard-library/issues/4902)

## [2.4.3] - 2023-05-12

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
*
* @since 2.3.0
*/
public class MapFromXml {
public final class MapFromXml {

private MapFromXml() {}

@SuppressWarnings("unchecked")
public static Object fromXml(BXml xml, BTypedesc type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
*
* @since 2.0.2
*/
public class XmlToRecord {
public final class XmlToRecord {

private XmlToRecord() {}

public static Object toRecord(BXml xml, boolean preserveNamespaces, BTypedesc type) {
return toRecord(xml, preserveNamespaces, Constants.UNDERSCORE, type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
*
* @since 1.1.0
*/
public class XmlDataUtils {
public final class XmlDataUtils {

private XmlDataUtils() {}

private static final String ERROR = "Error";
private static final String ATTRIBUTE_PREFIX = "attribute_";
Expand Down

0 comments on commit 1fef543

Please sign in to comment.