Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Java classes proper utilities #484

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
org = "ballerina"
name = "url"
version = "2.4.0"
version = "2.4.1"
authors = ["Ballerina"]
keywords = ["url encoding", "url decoding"]
repository = "https://github.com/ballerina-platform/module-ballerina-url"
Expand All @@ -15,5 +15,5 @@ graalvmCompatible = true
[[platform.java17.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "url-native"
version = "2.4.0"
path = "../native/build/libs/url-native-2.4.0.jar"
version = "2.4.1"
path = "../native/build/libs/url-native-2.4.1-SNAPSHOT.jar"
2 changes: 1 addition & 1 deletion ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ modules = [
[[package]]
org = "ballerina"
name = "url"
version = "2.4.0"
version = "2.4.1"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "test"}
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ This file contains all the notable changes done to the Ballerina URL package thr

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed
- [Java classes changed to proper utilities](https://github.com/ballerina-platform/ballerina-standard-library/issues/4894)

## [2.2.3] - 2022-11-29

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
/**
* Constants related to URL module.
*/
public class Constants {
public final class Constants {

private Constants() {}

static final String URL_ERROR = "Error";
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
*
* @since 0.990.3
*/
public class UrlUtils {
public final class UrlUtils {

private UrlUtils() {}

public static BError createError(String errMsg) {
return ErrorCreator.createDistinctError(URL_ERROR, ModuleUtils.getModule(), StringUtils.fromString(errMsg));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
*
* @since 0.991.0
*/
public class Decode {
public final class Decode {

private Decode() {}

public static Object decode(BString str, BString charset) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
*
* @since 0.991.0
*/
public class Encode {
public final class Encode {

private Encode() {}

public static Object encode(BString str, BString charset) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
*
* @since 2.0.0
*/
public class ModuleUtils {

private static Module urlModule;
public final class ModuleUtils {

private ModuleUtils() {}

private static Module urlModule;

public static void setModule(Environment env) {
urlModule = env.getCurrentModule();
}
Expand Down