Skip to content

Commit

Permalink
Merge pull request #926 from vil02/4926_make_some_java_classes_proper…
Browse files Browse the repository at this point in the history
…_utilities

Make some of the Java classes proper utilities
  • Loading branch information
MohamedSabthar authored Oct 23, 2023
2 parents 34a3742 + 441b8da commit e765ed3
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 15 deletions.
8 changes: 4 additions & 4 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
org = "ballerina"
name = "udp"
version = "1.9.1"
version = "1.9.2"
authors = ["Ballerina"]
keywords = ["UDP", "datagram", "transport"]
repository = "https://github.com/ballerina-platform/module-ballerina-udp"
Expand All @@ -15,11 +15,11 @@ graalvmCompatible = true
[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "udp-native"
version = "1.9.1"
path = "../native/build/libs/udp-native-1.9.1.jar"
version = "1.9.2"
path = "../native/build/libs/udp-native-1.9.2-SNAPSHOT.jar"

[[platform.java17.dependency]]
path = "../test-utils/build/libs/udp-test-utils-1.9.1.jar"
path = "../test-utils/build/libs/udp-test-utils-1.9.2-SNAPSHOT.jar"
scope = "testOnly"

[[platform.java17.dependency]]
Expand Down
2 changes: 1 addition & 1 deletion ballerina/CompilerPlugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ id = "udp-plugin"
class = "io.ballerina.stdlib.udp.compiler.UdpCompilerPlugin"

[[dependency]]
path = "../compiler-plugin/build/libs/udp-compiler-plugin-1.9.1.jar"
path = "../compiler-plugin/build/libs/udp-compiler-plugin-1.9.2-SNAPSHOT.jar"
2 changes: 1 addition & 1 deletion ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ modules = [
[[package]]
org = "ballerina"
name = "udp"
version = "1.9.1"
version = "1.9.2"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

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

## [1.9.1] - 2023-10-12

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
/**
* Compiler-plugin utility class.
*/
public class Utils {
public final class Utils {

private Utils() {}

public static final String NODE_LOCATION = "node.location";
public static final String LS = System.lineSeparator();
Expand Down
4 changes: 3 additions & 1 deletion native/src/main/java/io/ballerina/stdlib/udp/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
/**
* Constant variable for udp related operations.
*/
public class Constants {
public final class Constants {

private Constants() {}

// Constant related to ballerina Datagram record
public static final String DATAGRAM_RECORD = "Datagram";
Expand Down
4 changes: 3 additions & 1 deletion native/src/main/java/io/ballerina/stdlib/udp/Dispatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
/**
* Dispatch async methods.
*/
public class Dispatcher {
public final class Dispatcher {

private Dispatcher() {}

private static final Logger log = LoggerFactory.getLogger(Dispatcher.class);

Expand Down
4 changes: 3 additions & 1 deletion native/src/main/java/io/ballerina/stdlib/udp/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
*
* @since 0.985.0
*/
public class Utils {
public final class Utils {

private Utils() {}

/**
* udp standard library package ID.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
*
* @since 1.1.0
*/
public class Client {
public final class Client {

private Client() {}

public static Object init(Environment env, BObject client, BMap<BString, Object> config) {
final Future balFuture = env.markAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
*
* @since 1.1.0
*/
public class ConnectClient {
public final class ConnectClient {

private ConnectClient() {}

public static Object init(Environment env, BObject client, BString remoteHost,
int remotePort, BMap<BString, Object> config) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
/**
* Native function implementations of the UDP Caller.
*/
public class Caller {
public final class Caller {

private Caller() {}

public static Object sendBytes(Environment env, BObject caller, BArray data) {
final Future callback = env.markAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
/**
* Native function implementations of the UDP Listener.
*/
public class Listener {
public final class Listener {

private Listener() {}

private static final Logger log = LoggerFactory.getLogger(Client.class);

public static Object init(BObject listener, int localPort, BMap<BString, Object> config) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
/**
* This UDP server udp will use to mock the backend server.
*/
public class MockServerUtils {
public final class MockServerUtils {

private MockServerUtils() {}

private static MockUdpServer mockUdpServer;

Expand Down

0 comments on commit e765ed3

Please sign in to comment.