Skip to content

Commit

Permalink
Merge pull request #40 from vil02/4919_make_some_java_classes_proper_…
Browse files Browse the repository at this point in the history
…utilities

Make some Java classes proper utilities
  • Loading branch information
ThisaruGuruge committed Oct 13, 2023
2 parents 295f090 + 1381636 commit 65dd908
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 8 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- [Added support for native image builds](https://github.com/ballerina-platform/ballerina-standard-library/issues/4686)
- [Added support for request/response pattern](https://github.com/ballerina-platform/ballerina-standard-library/issues/4668)

### Changed
- [Make some of the Java classes proper utility classes](https://github.com/ballerina-platform/ballerina-standard-library/issues/4919)

## [0.0.1] - 2023-07-24
### Added
- [Introduce ballerina `mqtt` package](https://github.com/ballerina-platform/ballerina-standard-library/issues/4640)
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
/**
* A class containing the utilities related for compiler plugin tests.
*/
public class CompilerPluginTestUtils {
public final class CompilerPluginTestUtils {

private CompilerPluginTestUtils() {}

public static final Path RESOURCE_DIRECTORY = Paths.get("src", "test", "resources").toAbsolutePath();
public static final Path DISTRIBUTION_PATH = Paths.get("../", "target", "ballerina-runtime")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
/**
* Util class for the compiler plugin.
*/
public class PluginUtils {
public final class PluginUtils {

private PluginUtils() {}

public static Diagnostic getDiagnostic(PluginConstants.CompilationErrors error, DiagnosticSeverity severity,
Location location) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
/**
* Class containing the external methods of the caller.
*/
public class CallerActions {
public final class CallerActions {

private CallerActions() {}

private static final ExecutorService executorService = Executors.newCachedThreadPool(new CallerThreadFactory());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@
/**
* Class containing the external methods of the publisher.
*/
public class ClientActions {
public final class ClientActions {

private ClientActions() {}

private static final ExecutorService publishExecutorService =
Executors.newCachedThreadPool(new ClientThreadFactory());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
/**
* Class containing the external methods of the listener.
*/
public class ListenerActions {
public final class ListenerActions {

private ListenerActions() {}

public static Object externInit(BObject clientObject, BString serverUri, BString clientId,
BMap<BString, Object> listenerConfiguration) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/**
* Class holding module related utility functions.
*/
public class ModuleUtils {
public final class ModuleUtils {

private static Module mqttModule = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
/**
* Contains the constant values related in the runtime.
*/
public class MqttConstants {
public final class MqttConstants {

private MqttConstants() {}

public static final BString CONNECTION_CONFIGURATION = StringUtils.fromString("connectionConfig");
public static final BString USERNAME = StringUtils.fromString("username");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@
/**
* Class containing the utility functions related to the clients.
*/
public class MqttUtils {
public final class MqttUtils {

private MqttUtils() {}

public static BMap<BString, Object> getBMqttMessage(MqttMessage message, String topic) {
BMap<BString, Object> bMessage = ValueCreator.createRecordValue(ModuleUtils.getModule(),
Expand Down

0 comments on commit 65dd908

Please sign in to comment.