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.
Fixes #4911.
  • Loading branch information
vil02 committed Oct 11, 2023
1 parent b43d2ea commit 2d5526e
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 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

### Changed
- [[#4634] Use Aliases in GraphQL Error Path](https://github.com/ballerina-platform/ballerina-standard-library/issues/4634)
- [[#4911] Make some of the Java classes proper utility classes](https://github.com/ballerina-platform/ballerina-standard-library/issues/4911)

## [1.10.0] - 2023-09-18

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
/**
* Utility class for Ballerina GraphQL schema types.
*/
public class TypeUtils {
public final class TypeUtils {

private TypeUtils() {}

private static final String UNICODE_REGEX = "\\\\(\\\\*)u\\{([a-fA-F0-9]+)\\}";
private static final Pattern UNICODE_PATTERN = Pattern.compile(UNICODE_REGEX);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
/**
* Utility class to validate GraphQL package services and symbols.
*/
public class Utils {
public final class Utils {

private Utils () {}

public static final String PACKAGE_NAME = "graphql";
public static final String SUBGRAPH_SUB_MODULE_NAME = "graphql.subgraph";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
/**
* This class is used to execute a GraphQL document using the Ballerina GraphQL client.
*/
public class QueryExecutor {
public final class QueryExecutor {

private QueryExecutor () {}

/**
* Executes the GraphQL document when the corresponding Ballerina remote operation is invoked.
Expand Down

0 comments on commit 2d5526e

Please sign in to comment.