Skip to content

Commit

Permalink
Remove @nullable annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadeeshan96 committed Sep 8, 2022
1 parent aed6930 commit 66d1617
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
1 change: 0 additions & 1 deletion bvm/ballerina-runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
apply from: "$rootDir/gradle/javaProject.gradle"

dependencies {
implementation 'org.jetbrains:annotations:20.1.0'
implementation ('org.apache.ws.commons.axiom:axiom-impl') {
exclude group: 'org.apache.ws.commons.axiom', module: 'axiom-api'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
import io.ballerina.runtime.internal.values.XmlSequence;
import io.ballerina.runtime.internal.values.XmlText;
import io.ballerina.runtime.internal.values.XmlValue;
import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -283,8 +282,7 @@ public static boolean checkIsType(Object sourceVal, Type targetType) {
* @param targetType type to be test against
* @return true if the value belongs to the given type, false otherwise
*/
public static boolean checkIsType(@Nullable List<String> errors, Object sourceVal, Type sourceType,
Type targetType) {
public static boolean checkIsType(List<String> errors, Object sourceVal, Type sourceType, Type targetType) {
if (checkIsType(sourceVal, sourceType, targetType, null)) {
return true;
}
Expand Down Expand Up @@ -716,7 +714,7 @@ public static boolean checkIsType(Type sourceType, Type targetType, List<TypePai
}

private static boolean checkIsType(Object sourceVal, Type sourceType, Type targetType,
@Nullable List<TypePair> unresolvedTypes) {
List<TypePair> unresolvedTypes) {
int sourceTypeTag = sourceType.getTag();
int targetTypeTag = targetType.getTag();

Expand Down Expand Up @@ -2193,9 +2191,9 @@ private static boolean checkIsLikeType(List<String> errors, Object sourceValue,
* @param varName variable name to identify the parent of a record field
* @return True if the value confirms to the provided type. False, otherwise.
*/
private static boolean checkIsLikeOnValue(@Nullable List<String> errors, Object sourceValue, Type sourceType,
Type targetType, List<TypeValuePair> unresolvedValues,
boolean allowNumericConversion, @Nullable String varName) {
private static boolean checkIsLikeOnValue(List<String> errors, Object sourceValue, Type sourceType, Type targetType,
List<TypeValuePair> unresolvedValues, boolean allowNumericConversion,
String varName) {
int sourceTypeTag = sourceType.getTag();
int targetTypeTag = targetType.getTag();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
import io.ballerina.runtime.internal.values.MapValue;
import io.ballerina.runtime.internal.values.MapValueImpl;
import io.ballerina.runtime.internal.values.TableValueImpl;
import org.jetbrains.annotations.Nullable;

import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -261,10 +260,9 @@ static boolean isConvertibleToFloatingPointTypes(Object value) {
}
}

@Nullable
public static Type getConvertibleType(Object inputValue, Type targetType, @Nullable String varName,
boolean isFromJson, List<TypeValuePair> unresolvedValues,
List<String> errors, boolean allowNumericConversion) {
public static Type getConvertibleType(Object inputValue, Type targetType, String varName, boolean isFromJson,
List<TypeValuePair> unresolvedValues, List<String> errors,
boolean allowNumericConversion) {

int targetTypeTag = targetType.getTag();
switch (targetTypeTag) {
Expand Down Expand Up @@ -324,7 +322,6 @@ public static Type getConvertibleType(Object inputValue, Type targetType, @Nulla
return null;
}

@Nullable
public static Type getConvertibleTypeInTargetUnionType(Object inputValue, BUnionType targetUnionType,
String varName, boolean isFromJson, List<String> errors,
List<TypeValuePair> unresolvedValues,
Expand All @@ -348,7 +345,6 @@ public static Type getConvertibleTypeInTargetUnionType(Object inputValue, BUnion
return null;
}

@Nullable
public static Type getConvertibleFiniteType(Object inputValue, BFiniteType targetFiniteType,
String varName, boolean isFromJson, List<String> errors,
List<TypeValuePair> unresolvedValues, boolean allowNumericConversion) {
Expand Down Expand Up @@ -385,7 +381,6 @@ public static Type getConvertibleFiniteType(Object inputValue, BFiniteType targe
return null;
}

@Nullable
public static Type getConvertibleTypeFromJson(Object value, Type targetType, String varName,
List<TypeValuePair> unresolvedValues, List<String> errors,
boolean allowNumericConversion) {
Expand Down
1 change: 0 additions & 1 deletion bvm/ballerina-runtime/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
requires org.apache.commons.lang3;
requires io.ballerina.identifier;
requires jdk.unsupported;
requires org.jetbrains.annotations;

// API exports
exports io.ballerina.runtime.api;
Expand Down

0 comments on commit 66d1617

Please sign in to comment.