diff --git a/.github/workflows/google-java-format.yml b/.github/workflows/google-java-format.yml
index bdef518a8..a72521983 100644
--- a/.github/workflows/google-java-format.yml
+++ b/.github/workflows/google-java-format.yml
@@ -13,6 +13,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
+ - name: Set up Java
+ uses: actions/setup-java@v4.6.0
+ with:
+ distribution: "temurin"
+ java-version: 17
- uses: axel-op/googlejavaformat-action@v3.6.0
with:
args: "--set-exit-if-changed"
diff --git a/milo-examples/client-examples/pom.xml b/milo-examples/client-examples/pom.xml
index 09a129de8..f42677263 100644
--- a/milo-examples/client-examples/pom.xml
+++ b/milo-examples/client-examples/pom.xml
@@ -52,12 +52,6 @@
slf4j-simple
${slf4j.version}
-
- org.jetbrains
- annotations
- ${jetbrains-annotations.version}
- provided
-
diff --git a/milo-examples/server-examples/pom.xml b/milo-examples/server-examples/pom.xml
index d92f92566..688c36f3e 100644
--- a/milo-examples/server-examples/pom.xml
+++ b/milo-examples/server-examples/pom.xml
@@ -47,12 +47,6 @@
slf4j-simple
${slf4j.version}
-
- org.jetbrains
- annotations
- ${jetbrains-annotations.version}
- provided
-
diff --git a/milo-examples/server-examples/src/main/java/org/eclipse/milo/examples/server/types/CustomEnumType.java b/milo-examples/server-examples/src/main/java/org/eclipse/milo/examples/server/types/CustomEnumType.java
index 97207a8e7..eb83cbdac 100644
--- a/milo-examples/server-examples/src/main/java/org/eclipse/milo/examples/server/types/CustomEnumType.java
+++ b/milo-examples/server-examples/src/main/java/org/eclipse/milo/examples/server/types/CustomEnumType.java
@@ -17,7 +17,7 @@
import org.eclipse.milo.opcua.stack.core.encoding.UaEncoder;
import org.eclipse.milo.opcua.stack.core.types.UaEnumeratedType;
import org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public enum CustomEnumType implements UaEnumeratedType {
Field0(0),
diff --git a/opc-ua-sdk/codec-json/pom.xml b/opc-ua-sdk/codec-json/pom.xml
index e1940e9ca..2e29ac8c3 100644
--- a/opc-ua-sdk/codec-json/pom.xml
+++ b/opc-ua-sdk/codec-json/pom.xml
@@ -37,11 +37,6 @@
milo-encoding-json
${project.version}
-
- org.jetbrains
- annotations
- ${jetbrains-annotations.version}
-
org.junit.jupiter
diff --git a/opc-ua-sdk/codec-json/src/main/java/org/eclipse/milo/sdk/core/types/json/JsonCodecFactory.java b/opc-ua-sdk/codec-json/src/main/java/org/eclipse/milo/sdk/core/types/json/JsonCodecFactory.java
index 628a50c42..dc79388d4 100644
--- a/opc-ua-sdk/codec-json/src/main/java/org/eclipse/milo/sdk/core/types/json/JsonCodecFactory.java
+++ b/opc-ua-sdk/codec-json/src/main/java/org/eclipse/milo/sdk/core/types/json/JsonCodecFactory.java
@@ -16,16 +16,19 @@
import org.eclipse.milo.opcua.stack.core.types.structured.DataTypeDefinition;
import org.eclipse.milo.opcua.stack.core.types.structured.EnumDefinition;
import org.eclipse.milo.opcua.stack.core.types.structured.StructureDefinition;
+import org.jspecify.annotations.NullMarked;
+@NullMarked
public class JsonCodecFactory {
public static DataTypeCodec create(DataType dataType, DataTypeTree dataTypeTree) {
DataTypeDefinition definition = dataType.getDataTypeDefinition();
if (definition instanceof EnumDefinition) {
- // If we're asked to create a DataTypeCodec and the definition is an EnumDefinition,
- // that means it's an OptionSet subclass. True enumerations are encoded/decoded as
- // integers, so they don't have a corresponding codec.
+ /* If we're asked to create a DataTypeCodec and the definition is an EnumDefinition,
+ * that means it's an OptionSet subclass. True enumerations are encoded/decoded as
+ * integers, so they don't have a corresponding codec.
+ */
return new JsonOptionSetCodec(dataType);
} else if (definition instanceof StructureDefinition) {
return new JsonStructCodec(dataType, dataTypeTree);
diff --git a/opc-ua-sdk/codec-json/src/main/java/org/eclipse/milo/sdk/core/types/json/JsonConversions.java b/opc-ua-sdk/codec-json/src/main/java/org/eclipse/milo/sdk/core/types/json/JsonConversions.java
index 34c6cbf40..93f14851d 100644
--- a/opc-ua-sdk/codec-json/src/main/java/org/eclipse/milo/sdk/core/types/json/JsonConversions.java
+++ b/opc-ua-sdk/codec-json/src/main/java/org/eclipse/milo/sdk/core/types/json/JsonConversions.java
@@ -38,8 +38,10 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
import org.eclipse.milo.opcua.stack.core.util.ArrayUtil;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+@NullMarked
public class JsonConversions {
// region OPC UA to JSON Conversions
diff --git a/opc-ua-sdk/codec-json/src/main/java/org/eclipse/milo/sdk/core/types/json/JsonStructCodec.java b/opc-ua-sdk/codec-json/src/main/java/org/eclipse/milo/sdk/core/types/json/JsonStructCodec.java
index bd131a583..179050978 100644
--- a/opc-ua-sdk/codec-json/src/main/java/org/eclipse/milo/sdk/core/types/json/JsonStructCodec.java
+++ b/opc-ua-sdk/codec-json/src/main/java/org/eclipse/milo/sdk/core/types/json/JsonStructCodec.java
@@ -58,8 +58,10 @@
import org.eclipse.milo.opcua.stack.core.types.structured.StructureDefinition;
import org.eclipse.milo.opcua.stack.core.types.structured.StructureField;
import org.eclipse.milo.opcua.stack.core.util.Lazy;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+@NullMarked
public class JsonStructCodec extends GenericDataTypeCodec {
private final Lazy
-
- org.jetbrains
- annotations
- ${jetbrains-annotations.version}
- provided
-
-
org.junit.jupiter
junit-jupiter-engine
${junit.version}
test
+
+ org.jspecify
+ jspecify
+ 1.0.0
+
diff --git a/opc-ua-sdk/dtd-core/src/main/java/org/eclipse/milo/opcua/sdk/core/dtd/AbstractBsdCodec.java b/opc-ua-sdk/dtd-core/src/main/java/org/eclipse/milo/opcua/sdk/core/dtd/AbstractBsdCodec.java
index 8e938b148..35f0be0b6 100644
--- a/opc-ua-sdk/dtd-core/src/main/java/org/eclipse/milo/opcua/sdk/core/dtd/AbstractBsdCodec.java
+++ b/opc-ua-sdk/dtd-core/src/main/java/org/eclipse/milo/opcua/sdk/core/dtd/AbstractBsdCodec.java
@@ -44,7 +44,7 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
import org.eclipse.milo.opcua.stack.core.util.Namespaces;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
import org.opcfoundation.opcua.binaryschema.EnumeratedType;
import org.opcfoundation.opcua.binaryschema.FieldType;
import org.opcfoundation.opcua.binaryschema.StructuredType;
@@ -435,23 +435,17 @@ private boolean fieldIsAbsent(FieldType field, Map members) {
private static boolean compareToSwitchValue(
long controlValue, SwitchOperand switchOperand, long switchValue) {
- switch (switchOperand) {
- case EQUALS:
- return controlValue == switchValue;
- case NOT_EQUAL:
- return controlValue != switchValue;
- case GREATER_THAN:
- return controlValue > switchValue;
- case GREATER_THAN_OR_EQUAL:
- return controlValue >= switchValue;
- case LESS_THAN:
- return controlValue < switchValue;
- case LESS_THAN_OR_EQUAL:
- return controlValue <= switchValue;
- default:
- throw new UaSerializationException(
- StatusCodes.Bad_InternalError, "unknown SwitchOperand: " + switchOperand);
- }
+ return switch (switchOperand) {
+ case EQUALS -> controlValue == switchValue;
+ case NOT_EQUAL -> controlValue != switchValue;
+ case GREATER_THAN -> controlValue > switchValue;
+ case GREATER_THAN_OR_EQUAL -> controlValue >= switchValue;
+ case LESS_THAN -> controlValue < switchValue;
+ case LESS_THAN_OR_EQUAL -> controlValue <= switchValue;
+ default ->
+ throw new UaSerializationException(
+ StatusCodes.Bad_InternalError, "unknown SwitchOperand: " + switchOperand);
+ };
}
private static boolean fieldIsScalar(FieldType field) {
diff --git a/opc-ua-sdk/dtd-core/src/main/java/org/eclipse/milo/opcua/sdk/core/dtd/BinaryDataTypeDictionary.java b/opc-ua-sdk/dtd-core/src/main/java/org/eclipse/milo/opcua/sdk/core/dtd/BinaryDataTypeDictionary.java
index eab8f20be..8802bd51e 100644
--- a/opc-ua-sdk/dtd-core/src/main/java/org/eclipse/milo/opcua/sdk/core/dtd/BinaryDataTypeDictionary.java
+++ b/opc-ua-sdk/dtd-core/src/main/java/org/eclipse/milo/opcua/sdk/core/dtd/BinaryDataTypeDictionary.java
@@ -10,13 +10,13 @@
package org.eclipse.milo.opcua.sdk.core.dtd;
-import com.sun.istack.Nullable;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.eclipse.milo.opcua.stack.core.encoding.DataTypeCodec;
import org.eclipse.milo.opcua.stack.core.types.DataTypeDictionary;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
+import org.jspecify.annotations.Nullable;
import org.opcfoundation.opcua.binaryschema.TypeDescription;
import org.opcfoundation.opcua.binaryschema.TypeDictionary;
diff --git a/opc-ua-sdk/dtd-core/src/main/java/org/eclipse/milo/opcua/sdk/core/dtd/generic/Struct.java b/opc-ua-sdk/dtd-core/src/main/java/org/eclipse/milo/opcua/sdk/core/dtd/generic/Struct.java
index 80c8c4911..a787fff92 100644
--- a/opc-ua-sdk/dtd-core/src/main/java/org/eclipse/milo/opcua/sdk/core/dtd/generic/Struct.java
+++ b/opc-ua-sdk/dtd-core/src/main/java/org/eclipse/milo/opcua/sdk/core/dtd/generic/Struct.java
@@ -18,15 +18,15 @@
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
public class Struct {
private final String name;
private final Map members;
- public Struct(@NotNull String name, @NotNull Map members) {
+ public Struct(@NonNull String name, @NonNull Map members) {
Preconditions.checkNotNull(name);
Preconditions.checkNotNull(members);
@@ -34,12 +34,12 @@ public Struct(@NotNull String name, @NotNull Map members) {
this.members = Map.copyOf(members);
}
- @NotNull
+ @NonNull
public String getName() {
return name;
}
- @NotNull
+ @NonNull
public Map getMembers() {
return members;
}
@@ -49,7 +49,7 @@ public Member getMember(String name) {
return members.get(name);
}
- @NotNull
+ @NonNull
public Optional getMemberSafe(String name) {
return Optional.ofNullable(members.get(name));
}
diff --git a/opc-ua-sdk/dtd-reader/pom.xml b/opc-ua-sdk/dtd-reader/pom.xml
index 85fe64f45..64b6cbdd6 100644
--- a/opc-ua-sdk/dtd-reader/pom.xml
+++ b/opc-ua-sdk/dtd-reader/pom.xml
@@ -38,10 +38,9 @@
${project.version}
- org.jetbrains
- annotations
- ${jetbrains-annotations.version}
- provided
+ org.jspecify
+ jspecify
+ 1.0.0
diff --git a/opc-ua-sdk/dtd-reader/src/main/java/org/eclipse/milo/opcua/sdk/client/dtd/BuiltinDataTypeInfo.java b/opc-ua-sdk/dtd-reader/src/main/java/org/eclipse/milo/opcua/sdk/client/dtd/BuiltinDataTypeInfo.java
index 89efb0017..86a663bdb 100644
--- a/opc-ua-sdk/dtd-reader/src/main/java/org/eclipse/milo/opcua/sdk/client/dtd/BuiltinDataTypeInfo.java
+++ b/opc-ua-sdk/dtd-reader/src/main/java/org/eclipse/milo/opcua/sdk/client/dtd/BuiltinDataTypeInfo.java
@@ -13,7 +13,7 @@
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
abstract class BuiltinDataTypeInfo {
private static final Map DATA_TYPE_INFO_MAP;
diff --git a/opc-ua-sdk/pom.xml b/opc-ua-sdk/pom.xml
index d69ee569c..13d1a34e3 100644
--- a/opc-ua-sdk/pom.xml
+++ b/opc-ua-sdk/pom.xml
@@ -35,6 +35,14 @@
integration-tests
+
+
+ org.jspecify
+ jspecify
+ ${jspecify.version}
+
+
+
diff --git a/opc-ua-sdk/sdk-client/pom.xml b/opc-ua-sdk/sdk-client/pom.xml
index e0a8e4193..81011f645 100644
--- a/opc-ua-sdk/sdk-client/pom.xml
+++ b/opc-ua-sdk/sdk-client/pom.xml
@@ -38,10 +38,9 @@
${project.version}
- org.jetbrains
- annotations
- ${jetbrains-annotations.version}
- provided
+ org.jspecify
+ jspecify
+ 1.0.0
diff --git a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/AddressSpace.java b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/AddressSpace.java
index 92eff3810..f710774f5 100644
--- a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/AddressSpace.java
+++ b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/AddressSpace.java
@@ -71,7 +71,7 @@
import org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId;
import org.eclipse.milo.opcua.stack.core.types.structured.ReferenceDescription;
import org.eclipse.milo.opcua.stack.core.types.structured.RolePermissionType;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/NodeCache.java b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/NodeCache.java
index 619d69f9b..67f4244f4 100644
--- a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/NodeCache.java
+++ b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/NodeCache.java
@@ -18,7 +18,7 @@
import java.util.function.Consumer;
import org.eclipse.milo.opcua.sdk.client.nodes.UaNode;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class NodeCache {
diff --git a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/OpcUaSession.java b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/OpcUaSession.java
index 1cc38bcdb..b3b7fefea 100644
--- a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/OpcUaSession.java
+++ b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/OpcUaSession.java
@@ -16,8 +16,8 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.structured.SignedSoftwareCertificate;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
public class OpcUaSession extends ConcurrentHashMap implements UaSession {
@@ -95,18 +95,18 @@ public void setServerNonce(ByteString serverNonce) {
@Nullable
@Override
- public Object getAttribute(@NotNull String name) {
+ public Object getAttribute(@NonNull String name) {
return get(name);
}
@Nullable
@Override
- public Object setAttribute(@NotNull String name, @NotNull Object value) {
+ public Object setAttribute(@NonNull String name, @NonNull Object value) {
return put(name, value);
}
@Override
- public Object removeAttribute(@NotNull String name) {
+ public Object removeAttribute(@NonNull String name) {
return remove(name);
}
diff --git a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/OperationLimits.java b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/OperationLimits.java
index d908f0705..1aa054744 100644
--- a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/OperationLimits.java
+++ b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/OperationLimits.java
@@ -20,7 +20,7 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
/**
* Operation limits of the Server, obtained by reading Variables of the OperationLimits Object.
diff --git a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/UaSession.java b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/UaSession.java
index 79c8a4f5b..c0dcdcaa2 100644
--- a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/UaSession.java
+++ b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/UaSession.java
@@ -14,8 +14,8 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.structured.SignedSoftwareCertificate;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
public interface UaSession {
@@ -77,8 +77,7 @@ public interface UaSession {
* @param name the name the attribute is bound to.
* @return the attribute value.
*/
- @Nullable
- Object getAttribute(@NotNull String name);
+ @Nullable Object getAttribute(@NonNull String name);
/**
* Binds an attribute to this session, using the name specified.
@@ -89,8 +88,7 @@ public interface UaSession {
* @param value the attribute value.
* @return the previously bound value, or {@code null} if none exists.
*/
- @Nullable
- Object setAttribute(@NotNull String name, @NotNull Object value);
+ @Nullable Object setAttribute(@NonNull String name, @NonNull Object value);
/**
* Removes the attribute bound with the specified name from this session.
@@ -101,6 +99,5 @@ public interface UaSession {
* @param name the name the attribute is bound to.
* @return the previously bound value, or {@code null} if none exists.
*/
- @Nullable
- Object removeAttribute(@NotNull String name);
+ @Nullable Object removeAttribute(@NonNull String name);
}
diff --git a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/nodes/UaDataTypeNode.java b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/nodes/UaDataTypeNode.java
index e1ebd3e69..d5457e1b7 100644
--- a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/nodes/UaDataTypeNode.java
+++ b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/nodes/UaDataTypeNode.java
@@ -31,7 +31,7 @@
import org.eclipse.milo.opcua.stack.core.types.structured.DataTypeDefinition;
import org.eclipse.milo.opcua.stack.core.types.structured.EnumValueType;
import org.eclipse.milo.opcua.stack.core.types.structured.RolePermissionType;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class UaDataTypeNode extends UaNode implements DataTypeNode {
diff --git a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/nodes/UaNode.java b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/nodes/UaNode.java
index a7c386c32..21e94e7a3 100644
--- a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/nodes/UaNode.java
+++ b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/nodes/UaNode.java
@@ -70,7 +70,7 @@
import org.eclipse.milo.opcua.stack.core.types.structured.RolePermissionType;
import org.eclipse.milo.opcua.stack.core.types.structured.WriteResponse;
import org.eclipse.milo.opcua.stack.core.types.structured.WriteValue;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public abstract class UaNode implements Node {
diff --git a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/nodes/UaVariableNode.java b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/nodes/UaVariableNode.java
index c3407ae7d..369745260 100644
--- a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/nodes/UaVariableNode.java
+++ b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/nodes/UaVariableNode.java
@@ -47,7 +47,7 @@
import org.eclipse.milo.opcua.stack.core.types.structured.RolePermissionType;
import org.eclipse.milo.opcua.stack.core.types.structured.TimeZoneDataType;
import org.eclipse.milo.opcua.stack.core.util.FutureUtils;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class UaVariableNode extends UaNode implements VariableNode {
diff --git a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/nodes/UaVariableTypeNode.java b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/nodes/UaVariableTypeNode.java
index b3f8cb947..50f8311d9 100644
--- a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/nodes/UaVariableTypeNode.java
+++ b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/nodes/UaVariableTypeNode.java
@@ -27,7 +27,7 @@
import org.eclipse.milo.opcua.stack.core.types.enumerated.NodeClass;
import org.eclipse.milo.opcua.stack.core.types.structured.AccessRestrictionType;
import org.eclipse.milo.opcua.stack.core.types.structured.RolePermissionType;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class UaVariableTypeNode extends UaNode implements VariableTypeNode {
diff --git a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/subscriptions/MonitoredItemServiceOperationResult.java b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/subscriptions/MonitoredItemServiceOperationResult.java
index 2622c8546..342f6b5bb 100644
--- a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/subscriptions/MonitoredItemServiceOperationResult.java
+++ b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/subscriptions/MonitoredItemServiceOperationResult.java
@@ -12,7 +12,7 @@
import java.util.Optional;
import org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class MonitoredItemServiceOperationResult implements ServiceOperationResult {
diff --git a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/subscriptions/OpcUaMonitoredItem.java b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/subscriptions/OpcUaMonitoredItem.java
index c99ba44e0..bc6f6c40b 100644
--- a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/subscriptions/OpcUaMonitoredItem.java
+++ b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/subscriptions/OpcUaMonitoredItem.java
@@ -31,7 +31,7 @@
import org.eclipse.milo.opcua.stack.core.types.structured.MonitoringFilter;
import org.eclipse.milo.opcua.stack.core.types.structured.MonitoringParameters;
import org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class OpcUaMonitoredItem {
diff --git a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/subscriptions/OpcUaSubscription.java b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/subscriptions/OpcUaSubscription.java
index 55fdce94c..244da882b 100644
--- a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/subscriptions/OpcUaSubscription.java
+++ b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/subscriptions/OpcUaSubscription.java
@@ -59,7 +59,7 @@
import org.eclipse.milo.opcua.stack.core.util.Lists;
import org.eclipse.milo.opcua.stack.core.util.TaskQueue;
import org.eclipse.milo.opcua.stack.core.util.Unit;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/typetree/ClientDataType.java b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/typetree/ClientDataType.java
index 7e36f916b..941f36779 100644
--- a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/typetree/ClientDataType.java
+++ b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/typetree/ClientDataType.java
@@ -16,7 +16,7 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
import org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName;
import org.eclipse.milo.opcua.stack.core.types.structured.DataTypeDefinition;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
/**
* Data object that holds details of a DataType:
diff --git a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/typetree/DataTypeTreeBuilder.java b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/typetree/DataTypeTreeBuilder.java
index c6c993f72..1cdaad8ce 100644
--- a/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/typetree/DataTypeTreeBuilder.java
+++ b/opc-ua-sdk/sdk-client/src/main/java/org/eclipse/milo/opcua/sdk/client/typetree/DataTypeTreeBuilder.java
@@ -45,7 +45,7 @@
import org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId;
import org.eclipse.milo.opcua.stack.core.types.structured.ReferenceDescription;
import org.eclipse.milo.opcua.stack.core.util.Tree;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/opc-ua-sdk/sdk-core/pom.xml b/opc-ua-sdk/sdk-core/pom.xml
index 366044ee5..146a589ed 100644
--- a/opc-ua-sdk/sdk-core/pom.xml
+++ b/opc-ua-sdk/sdk-core/pom.xml
@@ -32,12 +32,6 @@
milo-stack-core
${project.version}
-
- org.jetbrains
- annotations
- ${jetbrains-annotations.version}
- provided
-
org.slf4j
diff --git a/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/QualifiedProperty.java b/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/QualifiedProperty.java
index 7c662e3a1..fec356f52 100644
--- a/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/QualifiedProperty.java
+++ b/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/QualifiedProperty.java
@@ -20,7 +20,7 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class QualifiedProperty {
diff --git a/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/types/DynamicEnum.java b/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/types/DynamicEnum.java
index 33bdcbda3..03d4e9fe1 100644
--- a/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/types/DynamicEnum.java
+++ b/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/types/DynamicEnum.java
@@ -19,7 +19,7 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText;
import org.eclipse.milo.opcua.stack.core.types.structured.EnumDefinition;
import org.eclipse.milo.opcua.stack.core.types.structured.EnumField;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class DynamicEnum implements UaEnumeratedType {
diff --git a/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/types/DynamicOptionSet.java b/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/types/DynamicOptionSet.java
index 32d9362cc..092c23a9d 100644
--- a/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/types/DynamicOptionSet.java
+++ b/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/types/DynamicOptionSet.java
@@ -23,7 +23,7 @@
import org.eclipse.milo.opcua.stack.core.types.structured.EnumDefinition;
import org.eclipse.milo.opcua.stack.core.types.structured.EnumField;
import org.eclipse.milo.opcua.stack.core.util.Lazy;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class DynamicOptionSet extends DynamicStruct {
diff --git a/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/types/DynamicStructCodec.java b/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/types/DynamicStructCodec.java
index 8caaff015..5ac5c56cf 100644
--- a/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/types/DynamicStructCodec.java
+++ b/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/types/DynamicStructCodec.java
@@ -48,7 +48,7 @@
import org.eclipse.milo.opcua.stack.core.types.enumerated.StructureType;
import org.eclipse.milo.opcua.stack.core.types.structured.StructureDefinition;
import org.eclipse.milo.opcua.stack.core.types.structured.StructureField;
-import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
public class DynamicStructCodec extends GenericDataTypeCodec {
@@ -130,7 +130,7 @@ public void encodeType(EncodingContext context, UaEncoder encoder, DynamicStruct
}
}
- private @NotNull DynamicStruct decodeStruct(UaDecoder decoder) {
+ private @NonNull DynamicStruct decodeStruct(UaDecoder decoder) {
StructureField[] fields = requireNonNullElse(definition.getFields(), new StructureField[0]);
LinkedHashMap members = new LinkedHashMap<>();
@@ -153,7 +153,7 @@ public void encodeType(EncodingContext context, UaEncoder encoder, DynamicStruct
return new DynamicStruct(dataType, members);
}
- private @NotNull DynamicUnion decodeUnion(UaDecoder decoder) {
+ private @NonNull DynamicUnion decodeUnion(UaDecoder decoder) {
int switchField = decoder.decodeUInt32("SwitchField").intValue();
StructureField[] fields = requireNonNullElse(definition.getFields(), new StructureField[0]);
diff --git a/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/types/DynamicUnion.java b/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/types/DynamicUnion.java
index ae02eca54..15f05f6bb 100644
--- a/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/types/DynamicUnion.java
+++ b/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/types/DynamicUnion.java
@@ -13,7 +13,7 @@
import java.util.Arrays;
import java.util.LinkedHashMap;
import org.eclipse.milo.opcua.sdk.core.typetree.DataType;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class DynamicUnion extends DynamicStruct {
diff --git a/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/typetree/DataType.java b/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/typetree/DataType.java
index ee8575562..4387ca83d 100644
--- a/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/typetree/DataType.java
+++ b/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/typetree/DataType.java
@@ -13,7 +13,7 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
import org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName;
import org.eclipse.milo.opcua.stack.core.types.structured.DataTypeDefinition;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public interface DataType extends TypeTree.Type {
@@ -38,8 +38,7 @@ public interface DataType extends TypeTree.Type {
*
* @return the NodeId of the Binary Encoding Node for this DataType, if it exists.
*/
- @Nullable
- NodeId getBinaryEncodingId();
+ @Nullable NodeId getBinaryEncodingId();
/**
* Get the {@link NodeId} of the XML Encoding Node for this DataType, if it exists.
@@ -48,8 +47,7 @@ public interface DataType extends TypeTree.Type {
*
* @return the NodeId of the XML Encoding Node for this DataType, if it exists.
*/
- @Nullable
- NodeId getXmlEncodingId();
+ @Nullable NodeId getXmlEncodingId();
/**
* Get the {@link NodeId} of the JSON Encoding Node for this DataType, if it exists.
@@ -58,8 +56,7 @@ public interface DataType extends TypeTree.Type {
*
* @return the {@link NodeId} of the JSON Encoding Node for this DataType, if it exists.
*/
- @Nullable
- NodeId getJsonEncodingId();
+ @Nullable NodeId getJsonEncodingId();
/**
* Get the {@link DataTypeDefinition} of this DataType.
@@ -68,8 +65,7 @@ public interface DataType extends TypeTree.Type {
*
* @return the {@link DataTypeDefinition} of this DataType.
*/
- @Nullable
- DataTypeDefinition getDataTypeDefinition();
+ @Nullable DataTypeDefinition getDataTypeDefinition();
/**
* Get whether this DataType is abstract.
diff --git a/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/typetree/DataTypeTree.java b/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/typetree/DataTypeTree.java
index cf2d93ee6..edf7974de 100644
--- a/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/typetree/DataTypeTree.java
+++ b/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/typetree/DataTypeTree.java
@@ -18,7 +18,7 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UNumber;
import org.eclipse.milo.opcua.stack.core.types.structured.DataTypeDefinition;
import org.eclipse.milo.opcua.stack.core.util.Tree;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
/**
* A tree-based representation of a DataType hierarchy.
diff --git a/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/typetree/TypeTree.java b/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/typetree/TypeTree.java
index a9ea68f2b..5434a03b5 100644
--- a/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/typetree/TypeTree.java
+++ b/opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/core/typetree/TypeTree.java
@@ -14,7 +14,7 @@
import java.util.Map;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
import org.eclipse.milo.opcua.stack.core.util.Tree;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public abstract class TypeTree {
diff --git a/opc-ua-sdk/sdk-server/pom.xml b/opc-ua-sdk/sdk-server/pom.xml
index ac87dc09a..9b59164e7 100644
--- a/opc-ua-sdk/sdk-server/pom.xml
+++ b/opc-ua-sdk/sdk-server/pom.xml
@@ -42,12 +42,6 @@
milo-sdk-core
${project.version}
-
- org.jetbrains
- annotations
- ${jetbrains-annotations.version}
- provided
-
org.junit.jupiter
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/AbstractServiceHandler.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/AbstractServiceHandler.java
index 02b94e9c7..a44c62025 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/AbstractServiceHandler.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/AbstractServiceHandler.java
@@ -65,7 +65,7 @@
import org.eclipse.milo.opcua.stack.core.types.structured.UnregisterNodesRequest;
import org.eclipse.milo.opcua.stack.core.types.structured.WriteRequest;
import org.eclipse.milo.opcua.stack.transport.server.ServiceRequestContext;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public abstract class AbstractServiceHandler {
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/AddressSpace.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/AddressSpace.java
index b625a39e5..62c7cdb9d 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/AddressSpace.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/AddressSpace.java
@@ -43,7 +43,7 @@
import org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId;
import org.eclipse.milo.opcua.stack.core.types.structured.ViewDescription;
import org.eclipse.milo.opcua.stack.core.types.structured.WriteValue;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public interface AddressSpace {
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/AttributeReader.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/AttributeReader.java
index 473c842e5..ac187c920 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/AttributeReader.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/AttributeReader.java
@@ -31,7 +31,7 @@
import org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn;
import org.eclipse.milo.opcua.stack.core.types.structured.StructureDefinition;
import org.eclipse.milo.opcua.stack.core.util.ArrayUtil;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class AttributeReader {
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/AttributeWriter.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/AttributeWriter.java
index 26329a102..72a10eab2 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/AttributeWriter.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/AttributeWriter.java
@@ -39,7 +39,7 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.util.ArrayUtil;
import org.eclipse.milo.opcua.stack.core.util.TypeUtil;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/EndpointConfig.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/EndpointConfig.java
index f6cfadb2c..d4495df77 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/EndpointConfig.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/EndpointConfig.java
@@ -23,7 +23,7 @@
import org.eclipse.milo.opcua.stack.core.types.enumerated.MessageSecurityMode;
import org.eclipse.milo.opcua.stack.core.types.enumerated.UserTokenType;
import org.eclipse.milo.opcua.stack.core.types.structured.UserTokenPolicy;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class EndpointConfig {
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/NodeManager.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/NodeManager.java
index 20cf98711..fe8df63eb 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/NodeManager.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/NodeManager.java
@@ -18,7 +18,7 @@
import org.eclipse.milo.opcua.stack.core.NamespaceTable;
import org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public interface NodeManager {
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/OpcUaServer.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/OpcUaServer.java
index a5ca39888..c5f0cb605 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/OpcUaServer.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/OpcUaServer.java
@@ -92,7 +92,7 @@
import org.eclipse.milo.opcua.stack.transport.server.OpcServerTransportFactory;
import org.eclipse.milo.opcua.stack.transport.server.ServerApplicationContext;
import org.eclipse.milo.opcua.stack.transport.server.ServiceRequestContext;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/SecurityConfiguration.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/SecurityConfiguration.java
index d56d0a606..fe6094b15 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/SecurityConfiguration.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/SecurityConfiguration.java
@@ -21,7 +21,7 @@
import org.eclipse.milo.opcua.stack.core.security.SecurityPolicy;
import org.eclipse.milo.opcua.stack.core.types.builtin.ByteString;
import org.eclipse.milo.opcua.stack.core.types.enumerated.MessageSecurityMode;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public final class SecurityConfiguration {
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/ServiceOperationContext.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/ServiceOperationContext.java
index e6158bdc9..e6d79de0a 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/ServiceOperationContext.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/ServiceOperationContext.java
@@ -15,7 +15,7 @@
import java.util.Optional;
import org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class ServiceOperationContext implements AccessContext {
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/Session.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/Session.java
index 30836354c..305db34c6 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/Session.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/Session.java
@@ -40,7 +40,7 @@
import org.eclipse.milo.opcua.stack.core.types.structured.UserNameIdentityToken;
import org.eclipse.milo.opcua.stack.core.types.structured.X509IdentityToken;
import org.eclipse.milo.opcua.stack.core.util.CertificateUtil;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/SessionManager.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/SessionManager.java
index 2618ac571..faa84d9b2 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/SessionManager.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/SessionManager.java
@@ -69,8 +69,8 @@
import org.eclipse.milo.opcua.stack.core.util.NonceUtil;
import org.eclipse.milo.opcua.stack.core.util.SignatureUtil;
import org.eclipse.milo.opcua.stack.transport.server.ServiceRequestContext;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -682,7 +682,7 @@ private static void verifyClientSignature(Session session, ActivateSessionReques
* @param tokenPolicies the {@link UserTokenPolicy}s from the Session's Endpoint.
* @return a {@link UserIdentityToken} object.
*/
- @NotNull
+ @NonNull
private UserIdentityToken decodeIdentityToken(
@Nullable ExtensionObject identityTokenXo, @Nullable UserTokenPolicy[] tokenPolicies) {
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/EventContentFilter.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/EventContentFilter.java
index 60a990248..8ec457051 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/EventContentFilter.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/EventContentFilter.java
@@ -59,8 +59,8 @@
import org.eclipse.milo.opcua.stack.core.types.structured.FilterOperand;
import org.eclipse.milo.opcua.stack.core.types.structured.LiteralOperand;
import org.eclipse.milo.opcua.stack.core.types.structured.SimpleAttributeOperand;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -165,7 +165,7 @@ private static void validateSimpleOperand(FilterContext context, SimpleAttribute
@Nullable
private static Node getRelativeNode(
- FilterContext context, @NotNull UaNode startingNode, @NotNull QualifiedName[] browsePath) {
+ FilterContext context, @NonNull UaNode startingNode, @NonNull QualifiedName[] browsePath) {
UaNode relativeNode = startingNode;
@@ -210,7 +210,7 @@ private static ContentFilterResult validateWhereClause(
}
private static ContentFilterElementResult validateFilterElement(
- @NotNull FilterContext context, @NotNull ContentFilterElement filterElement) {
+ @NonNull FilterContext context, @NonNull ContentFilterElement filterElement) {
FilterOperator filterOperator = filterElement.getFilterOperator();
@@ -274,9 +274,9 @@ private static ContentFilterElementResult validateFilterElement(
}
public static Variant[] select(
- @NotNull FilterContext context,
- @NotNull SimpleAttributeOperand[] selectClauses,
- @NotNull BaseEventTypeNode eventNode) {
+ @NonNull FilterContext context,
+ @NonNull SimpleAttributeOperand[] selectClauses,
+ @NonNull BaseEventTypeNode eventNode) {
return Arrays.stream(selectClauses)
.map(
@@ -291,9 +291,9 @@ public static Variant[] select(
}
public static boolean evaluate(
- @NotNull FilterContext context,
- @NotNull ContentFilter whereClause,
- @NotNull BaseEventTypeNode eventNode)
+ @NonNull FilterContext context,
+ @NonNull ContentFilter whereClause,
+ @NonNull BaseEventTypeNode eventNode)
throws UaException {
if (whereClause.getElements() == null || whereClause.getElements().length == 0) {
@@ -317,9 +317,9 @@ public static boolean evaluate(
@Nullable
private static Object evaluate(
- @NotNull OperatorContext context,
- @NotNull BaseEventTypeNode eventNode,
- @NotNull ContentFilterElement element)
+ @NonNull OperatorContext context,
+ @NonNull BaseEventTypeNode eventNode,
+ @NonNull ContentFilterElement element)
throws UaException {
FilterOperator filterOperator = element.getFilterOperator();
@@ -335,7 +335,7 @@ private static Object evaluate(
return operator.apply(context, eventNode, filterOperands);
}
- @NotNull
+ @NonNull
private static FilterOperand[] decodeOperands(
EncodingContext context, ExtensionObject @Nullable [] operandXos) {
@@ -348,8 +348,8 @@ private static FilterOperand[] decodeOperands(
}
}
- @NotNull
- private static Operator> getOperator(@NotNull FilterOperator filterOperator) {
+ @NonNull
+ private static Operator> getOperator(@NonNull FilterOperator filterOperator) {
// @formatter:off
switch (filterOperator) {
// Basic FilterOperators
@@ -399,9 +399,9 @@ private static Operator> getOperator(@NotNull FilterOperator filterOperator) {
@SuppressWarnings("unused")
private static Object getAttribute(
- @NotNull FilterContext context,
- @NotNull AttributeOperand operand,
- @NotNull BaseEventTypeNode eventNode)
+ @NonNull FilterContext context,
+ @NonNull AttributeOperand operand,
+ @NonNull BaseEventTypeNode eventNode)
throws UaException {
// AttributeOperand is not allowed to be used in EventFilters... it's for the Query services.
@@ -411,9 +411,9 @@ private static Object getAttribute(
}
private static Object getSimpleAttribute(
- @NotNull FilterContext context,
- @NotNull SimpleAttributeOperand operand,
- @NotNull BaseEventTypeNode eventNode)
+ @NonNull FilterContext context,
+ @NonNull SimpleAttributeOperand operand,
+ @NonNull BaseEventTypeNode eventNode)
throws UaException {
NodeId typeDefinitionId = operand.getTypeDefinitionId();
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversions.java
index ea7aa025c..bde55e640 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversions.java
@@ -20,70 +20,70 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class BooleanConversions {
private BooleanConversions() {}
- @NotNull
- static UByte booleanToByte(@NotNull Boolean b) {
+ @NonNull
+ static UByte booleanToByte(@NonNull Boolean b) {
return ubyte(b ? 1 : 0);
}
- @NotNull
- static Double booleanToDouble(@NotNull Boolean b) {
+ @NonNull
+ static Double booleanToDouble(@NonNull Boolean b) {
return b ? 1.0 : 0.0;
}
- @NotNull
- static Float booleanToFloat(@NotNull Boolean b) {
+ @NonNull
+ static Float booleanToFloat(@NonNull Boolean b) {
return b ? 1.0f : 0.0f;
}
- @NotNull
- static Short booleanToInt16(@NotNull Boolean b) {
+ @NonNull
+ static Short booleanToInt16(@NonNull Boolean b) {
return b ? (short) 1 : (short) 0;
}
- @NotNull
- static Integer booleanToInt32(@NotNull Boolean b) {
+ @NonNull
+ static Integer booleanToInt32(@NonNull Boolean b) {
return b ? 1 : 0;
}
- @NotNull
- static Long booleanToInt64(@NotNull Boolean b) {
+ @NonNull
+ static Long booleanToInt64(@NonNull Boolean b) {
return b ? 1L : 0L;
}
- @NotNull
- static Byte booleanToSByte(@NotNull Boolean b) {
+ @NonNull
+ static Byte booleanToSByte(@NonNull Boolean b) {
return b ? (byte) 1 : (byte) 0;
}
- @NotNull
- static String booleanToString(@NotNull Boolean b) {
+ @NonNull
+ static String booleanToString(@NonNull Boolean b) {
return b ? "1" : "0";
}
- @NotNull
- static UShort booleanToUInt16(@NotNull Boolean b) {
+ @NonNull
+ static UShort booleanToUInt16(@NonNull Boolean b) {
return b ? ushort(1) : ushort(0);
}
- @NotNull
- static UInteger booleanToUInt32(@NotNull Boolean b) {
+ @NonNull
+ static UInteger booleanToUInt32(@NonNull Boolean b) {
return b ? uint(1) : uint(0);
}
- @NotNull
- static ULong booleanToUInt64(@NotNull Boolean b) {
+ @NonNull
+ static ULong booleanToUInt64(@NonNull Boolean b) {
return b ? ulong(1) : ulong(0);
}
@Nullable
- static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean implicit) {
+ static Object convert(@NonNull Object o, BuiltinDataType targetType, boolean implicit) {
if (o instanceof Boolean) {
Boolean b = (Boolean) o;
@@ -94,7 +94,7 @@ static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean imp
}
@Nullable
- static Object explicitConversion(@NotNull Boolean b, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull Boolean b, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case String:
@@ -106,7 +106,7 @@ static Object explicitConversion(@NotNull Boolean b, BuiltinDataType targetType)
}
@Nullable
- static Object implicitConversion(@NotNull Boolean b, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull Boolean b, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Byte:
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteConversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteConversions.java
index 834a5dc6f..0d98f8b74 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteConversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteConversions.java
@@ -19,70 +19,70 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class ByteConversions {
private ByteConversions() {}
- @NotNull
- static Boolean byteToBoolean(@NotNull UByte ub) {
+ @NonNull
+ static Boolean byteToBoolean(@NonNull UByte ub) {
return ub.intValue() != 0;
}
- @NotNull
- static Double byteToDouble(@NotNull UByte ub) {
+ @NonNull
+ static Double byteToDouble(@NonNull UByte ub) {
return ub.doubleValue();
}
- @NotNull
- static Float byteToFloat(@NotNull UByte ub) {
+ @NonNull
+ static Float byteToFloat(@NonNull UByte ub) {
return ub.floatValue();
}
- @NotNull
- static Short byteToInt16(@NotNull UByte ub) {
+ @NonNull
+ static Short byteToInt16(@NonNull UByte ub) {
return ub.shortValue();
}
- @NotNull
- static Integer byteToInt32(@NotNull UByte ub) {
+ @NonNull
+ static Integer byteToInt32(@NonNull UByte ub) {
return ub.intValue();
}
- @NotNull
- static Long byteToInt64(@NotNull UByte ub) {
+ @NonNull
+ static Long byteToInt64(@NonNull UByte ub) {
return ub.longValue();
}
@Nullable
- static Byte byteToSByte(@NotNull UByte ub) {
+ static Byte byteToSByte(@NonNull UByte ub) {
return ub.intValue() > Byte.MAX_VALUE ? null : ub.byteValue();
}
- @NotNull
- static String byteToString(@NotNull UByte ub) {
+ @NonNull
+ static String byteToString(@NonNull UByte ub) {
return ub.toString();
}
- @NotNull
- static UShort byteToUInt16(@NotNull UByte ub) {
+ @NonNull
+ static UShort byteToUInt16(@NonNull UByte ub) {
return ushort(ub.intValue());
}
- @NotNull
- static UInteger byteToUInt32(@NotNull UByte ub) {
+ @NonNull
+ static UInteger byteToUInt32(@NonNull UByte ub) {
return uint(ub.intValue());
}
- @NotNull
- static ULong byteToUInt64(@NotNull UByte ub) {
+ @NonNull
+ static ULong byteToUInt64(@NonNull UByte ub) {
return ulong(ub.longValue());
}
@Nullable
- static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean implicit) {
+ static Object convert(@NonNull Object o, BuiltinDataType targetType, boolean implicit) {
if (o instanceof UByte) {
UByte b = (UByte) o;
@@ -93,7 +93,7 @@ static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean imp
}
@Nullable
- static Object explicitConversion(@NotNull UByte b, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull UByte b, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Boolean:
@@ -107,7 +107,7 @@ static Object explicitConversion(@NotNull UByte b, BuiltinDataType targetType) {
}
@Nullable
- static Object implicitConversion(@NotNull UByte b, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull UByte b, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Double:
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteStringConversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteStringConversions.java
index 636d89c89..c4247bdd8 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteStringConversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteStringConversions.java
@@ -15,15 +15,15 @@
import java.util.UUID;
import org.eclipse.milo.opcua.stack.core.BuiltinDataType;
import org.eclipse.milo.opcua.stack.core.types.builtin.ByteString;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class ByteStringConversions {
private ByteStringConversions() {}
@Nullable
- static UUID byteStringToGuid(@NotNull ByteString bs) {
+ static UUID byteStringToGuid(@NonNull ByteString bs) {
if (bs.length() != 16) {
return null;
} else {
@@ -34,13 +34,13 @@ static UUID byteStringToGuid(@NotNull ByteString bs) {
}
}
- @NotNull
- static String byteStringToString(@NotNull ByteString bs) {
+ @NonNull
+ static String byteStringToString(@NonNull ByteString bs) {
return ByteBufUtil.hexDump(bs.bytesOrEmpty());
}
@Nullable
- static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean implicit) {
+ static Object convert(@NonNull Object o, BuiltinDataType targetType, boolean implicit) {
if (o instanceof ByteString) {
ByteString bs = (ByteString) o;
@@ -51,7 +51,7 @@ static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean imp
}
@Nullable
- static Object explicitConversion(@NotNull ByteString bs, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull ByteString bs, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Guid:
@@ -65,7 +65,7 @@ static Object explicitConversion(@NotNull ByteString bs, BuiltinDataType targetT
}
@Nullable
- static Object implicitConversion(@NotNull ByteString bs, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull ByteString bs, BuiltinDataType targetType) {
// no implicit conversions exist
return null;
}
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/DateTimeConversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/DateTimeConversions.java
index 02fe51fdb..9742cf457 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/DateTimeConversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/DateTimeConversions.java
@@ -16,15 +16,15 @@
import java.util.TimeZone;
import org.eclipse.milo.opcua.stack.core.BuiltinDataType;
import org.eclipse.milo.opcua.stack.core.types.builtin.DateTime;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class DateTimeConversions {
private DateTimeConversions() {}
- @NotNull
- static String dateTimeToString(@NotNull DateTime dt) {
+ @NonNull
+ static String dateTimeToString(@NonNull DateTime dt) {
return dateToIso8601UtcString(dt.getJavaDate());
}
@@ -42,7 +42,7 @@ private static String dateToIso8601UtcString(Date date) {
}
@Nullable
- static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean implicit) {
+ static Object convert(@NonNull Object o, BuiltinDataType targetType, boolean implicit) {
if (o instanceof DateTime) {
DateTime d = (DateTime) o;
@@ -53,7 +53,7 @@ static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean imp
}
@Nullable
- static Object explicitConversion(@NotNull DateTime d, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull DateTime d, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case String:
@@ -65,7 +65,7 @@ static Object explicitConversion(@NotNull DateTime d, BuiltinDataType targetType
}
@Nullable
- static Object implicitConversion(@NotNull DateTime d, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull DateTime d, BuiltinDataType targetType) {
// no implicit conversions exist
return null;
}
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/DoubleConversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/DoubleConversions.java
index dd1c0a95e..24e0e8c41 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/DoubleConversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/DoubleConversions.java
@@ -20,20 +20,20 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class DoubleConversions {
private DoubleConversions() {}
- @NotNull
- static Boolean doubleToBoolean(@NotNull Double d) {
+ @NonNull
+ static Boolean doubleToBoolean(@NonNull Double d) {
return d != 0.0d;
}
@Nullable
- static UByte doubleToByte(@NotNull Double d) {
+ static UByte doubleToByte(@NonNull Double d) {
long rounded = Math.round(d);
if (rounded >= 0 && rounded <= UByte.MAX_VALUE) {
@@ -44,7 +44,7 @@ static UByte doubleToByte(@NotNull Double d) {
}
@Nullable
- static Float doubleToFloat(@NotNull Double d) {
+ static Float doubleToFloat(@NonNull Double d) {
if (d >= -Float.MAX_VALUE && d <= Float.MAX_VALUE) {
return d.floatValue();
} else {
@@ -53,7 +53,7 @@ static Float doubleToFloat(@NotNull Double d) {
}
@Nullable
- static Short doubleToInt16(@NotNull Double d) {
+ static Short doubleToInt16(@NonNull Double d) {
long rounded = Math.round(d);
if (rounded >= Short.MIN_VALUE && rounded <= Short.MAX_VALUE) {
@@ -64,7 +64,7 @@ static Short doubleToInt16(@NotNull Double d) {
}
@Nullable
- static Integer doubleToInt32(@NotNull Double d) {
+ static Integer doubleToInt32(@NonNull Double d) {
long rounded = Math.round(d);
if (rounded >= Integer.MIN_VALUE && rounded <= Integer.MAX_VALUE) {
@@ -75,7 +75,7 @@ static Integer doubleToInt32(@NotNull Double d) {
}
@Nullable
- static Long doubleToInt64(@NotNull Double d) {
+ static Long doubleToInt64(@NonNull Double d) {
if (d >= Long.MIN_VALUE && d <= Long.MAX_VALUE) {
return Math.round(d);
} else {
@@ -84,7 +84,7 @@ static Long doubleToInt64(@NotNull Double d) {
}
@Nullable
- static Byte doubleToSByte(@NotNull Double d) {
+ static Byte doubleToSByte(@NonNull Double d) {
long rounded = Math.round(d);
if (rounded >= Byte.MIN_VALUE && rounded <= Byte.MAX_VALUE) {
@@ -94,13 +94,13 @@ static Byte doubleToSByte(@NotNull Double d) {
}
}
- @NotNull
- static String doubleToString(@NotNull Double d) {
+ @NonNull
+ static String doubleToString(@NonNull Double d) {
return d.toString();
}
@Nullable
- static UShort doubleToUInt16(@NotNull Double d) {
+ static UShort doubleToUInt16(@NonNull Double d) {
long rounded = Math.round(d);
if (rounded >= UShort.MIN_VALUE && rounded <= UShort.MAX_VALUE) {
@@ -111,7 +111,7 @@ static UShort doubleToUInt16(@NotNull Double d) {
}
@Nullable
- static UInteger doubleToUInt32(@NotNull Double d) {
+ static UInteger doubleToUInt32(@NonNull Double d) {
long rounded = Math.round(d);
if (rounded >= UInteger.MIN_VALUE && rounded <= UInteger.MAX_VALUE) {
@@ -122,7 +122,7 @@ static UInteger doubleToUInt32(@NotNull Double d) {
}
@Nullable
- static ULong doubleToUInt64(@NotNull Double d) {
+ static ULong doubleToUInt64(@NonNull Double d) {
long rounded = Math.round(d);
if (rounded >= 0) {
@@ -144,7 +144,7 @@ static Object convert(@Nullable Object o, BuiltinDataType targetType, boolean im
}
@Nullable
- static Object explicitConversion(@NotNull Double d, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull Double d, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Boolean:
@@ -176,7 +176,7 @@ static Object explicitConversion(@NotNull Double d, BuiltinDataType targetType)
}
@Nullable
- static Object implicitConversion(@NotNull Double d, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull Double d, BuiltinDataType targetType) {
// no implicit conversions exist
return null;
}
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ExpandedNodeIdConversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ExpandedNodeIdConversions.java
index d184b802a..f72be7ed6 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ExpandedNodeIdConversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ExpandedNodeIdConversions.java
@@ -14,26 +14,26 @@
import org.eclipse.milo.opcua.stack.core.NamespaceTable;
import org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class ExpandedNodeIdConversions {
private ExpandedNodeIdConversions() {}
@Nullable
- static NodeId expandedNodeIdToNodeId(@NotNull ExpandedNodeId e) {
+ static NodeId expandedNodeIdToNodeId(@NonNull ExpandedNodeId e) {
// TODO need a real NamespaceTable here
return e.toNodeId(new NamespaceTable()).orElse(null);
}
- @NotNull
- static String expandedNodeIdToString(@NotNull ExpandedNodeId e) {
+ @NonNull
+ static String expandedNodeIdToString(@NonNull ExpandedNodeId e) {
return e.toParseableString();
}
@Nullable
- static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean implicit) {
+ static Object convert(@NonNull Object o, BuiltinDataType targetType, boolean implicit) {
if (o instanceof ExpandedNodeId) {
ExpandedNodeId eni = (ExpandedNodeId) o;
@@ -44,7 +44,7 @@ static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean imp
}
@Nullable
- static Object explicitConversion(@NotNull ExpandedNodeId eni, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull ExpandedNodeId eni, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case NodeId:
@@ -56,7 +56,7 @@ static Object explicitConversion(@NotNull ExpandedNodeId eni, BuiltinDataType ta
}
@Nullable
- static Object implicitConversion(@NotNull ExpandedNodeId eni, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull ExpandedNodeId eni, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case String:
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/FloatConversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/FloatConversions.java
index d3e747daf..ef0eca8e2 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/FloatConversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/FloatConversions.java
@@ -20,20 +20,20 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class FloatConversions {
private FloatConversions() {}
- @NotNull
- static Boolean floatToBoolean(@NotNull Float f) {
+ @NonNull
+ static Boolean floatToBoolean(@NonNull Float f) {
return f != 0.0f;
}
@Nullable
- static UByte floatToByte(@NotNull Float f) {
+ static UByte floatToByte(@NonNull Float f) {
long rounded = Math.round(f);
if (rounded >= 0 && rounded <= UByte.MAX_VALUE) {
@@ -43,13 +43,13 @@ static UByte floatToByte(@NotNull Float f) {
}
}
- @NotNull
- static Double floatToDouble(@NotNull Float f) {
+ @NonNull
+ static Double floatToDouble(@NonNull Float f) {
return f.doubleValue();
}
@Nullable
- static Short floatToInt16(@NotNull Float f) {
+ static Short floatToInt16(@NonNull Float f) {
long rounded = Math.round(f);
if (rounded >= Short.MIN_VALUE && rounded <= Short.MAX_VALUE) {
@@ -59,18 +59,18 @@ static Short floatToInt16(@NotNull Float f) {
}
}
- @NotNull
- static Integer floatToInt32(@NotNull Float f) {
+ @NonNull
+ static Integer floatToInt32(@NonNull Float f) {
return Math.round(f);
}
- @NotNull
- static Long floatToInt64(@NotNull Float f) {
+ @NonNull
+ static Long floatToInt64(@NonNull Float f) {
return (long) Math.round(f);
}
@Nullable
- static Byte floatToSByte(@NotNull Float f) {
+ static Byte floatToSByte(@NonNull Float f) {
long rounded = Math.round(f);
if (rounded >= Byte.MIN_VALUE && rounded <= Byte.MAX_VALUE) {
@@ -80,13 +80,13 @@ static Byte floatToSByte(@NotNull Float f) {
}
}
- @NotNull
- static String floatToString(@NotNull Float f) {
+ @NonNull
+ static String floatToString(@NonNull Float f) {
return f.toString();
}
@Nullable
- static UShort floatToUInt16(@NotNull Float f) {
+ static UShort floatToUInt16(@NonNull Float f) {
long rounded = Math.round(f);
if (rounded >= UShort.MIN_VALUE && rounded <= UShort.MAX_VALUE) {
@@ -97,7 +97,7 @@ static UShort floatToUInt16(@NotNull Float f) {
}
@Nullable
- static UInteger floatToUInt32(@NotNull Float f) {
+ static UInteger floatToUInt32(@NonNull Float f) {
int rounded = Math.round(f);
if (rounded >= 0) {
@@ -108,7 +108,7 @@ static UInteger floatToUInt32(@NotNull Float f) {
}
@Nullable
- static ULong floatToUInt64(@NotNull Float f) {
+ static ULong floatToUInt64(@NonNull Float f) {
long rounded = Math.round(f);
if (rounded >= 0) {
@@ -130,7 +130,7 @@ static Object convert(@Nullable Object o, BuiltinDataType targetType, boolean im
}
@Nullable
- static Object explicitConversion(@NotNull Float f, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull Float f, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Boolean:
@@ -160,7 +160,7 @@ static Object explicitConversion(@NotNull Float f, BuiltinDataType targetType) {
}
@Nullable
- static Object implicitConversion(@NotNull Float f, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull Float f, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Double:
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/GuidConversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/GuidConversions.java
index 69fad5682..519f9baac 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/GuidConversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/GuidConversions.java
@@ -14,15 +14,15 @@
import java.util.UUID;
import org.eclipse.milo.opcua.stack.core.BuiltinDataType;
import org.eclipse.milo.opcua.stack.core.types.builtin.ByteString;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class GuidConversions {
private GuidConversions() {}
- @NotNull
- static ByteString guidToByteString(@NotNull UUID uuid) {
+ @NonNull
+ static ByteString guidToByteString(@NonNull UUID uuid) {
ByteBuffer bb = ByteBuffer.wrap(new byte[16]);
bb.putLong(uuid.getMostSignificantBits());
bb.putLong(uuid.getLeastSignificantBits());
@@ -30,13 +30,13 @@ static ByteString guidToByteString(@NotNull UUID uuid) {
return ByteString.of(bb.array());
}
- @NotNull
- static String guidToString(@NotNull UUID uuid) {
+ @NonNull
+ static String guidToString(@NonNull UUID uuid) {
return uuid.toString();
}
@Nullable
- static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean implicit) {
+ static Object convert(@NonNull Object o, BuiltinDataType targetType, boolean implicit) {
if (o instanceof UUID) {
UUID uuid = (UUID) o;
@@ -47,7 +47,7 @@ static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean imp
}
@Nullable
- static Object explicitConversion(@NotNull UUID uuid, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull UUID uuid, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case ByteString:
@@ -61,7 +61,7 @@ static Object explicitConversion(@NotNull UUID uuid, BuiltinDataType targetType)
}
@Nullable
- static Object implicitConversion(@NotNull UUID uuid, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull UUID uuid, BuiltinDataType targetType) {
// no implicit conversions exist
return null;
}
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ImplicitConversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ImplicitConversions.java
index fd021f79b..b5db0c7fb 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ImplicitConversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ImplicitConversions.java
@@ -11,13 +11,13 @@
package org.eclipse.milo.opcua.sdk.server.events.conversions;
import org.eclipse.milo.opcua.stack.core.BuiltinDataType;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
public class ImplicitConversions {
@Nullable
- public static Object convert(@NotNull Object sourceValue, @NotNull BuiltinDataType targetType) {
+ public static Object convert(@NonNull Object sourceValue, @NonNull BuiltinDataType targetType) {
BuiltinDataType sourceType = BuiltinDataType.fromBackingClass(sourceValue.getClass());
if (sourceType == null) {
@@ -32,7 +32,7 @@ public static Object convert(@NotNull Object sourceValue, @NotNull BuiltinDataTy
}
private static Object convert(
- @NotNull Object sourceValue, BuiltinDataType sourceType, BuiltinDataType targetType) {
+ @NonNull Object sourceValue, BuiltinDataType sourceType, BuiltinDataType targetType) {
switch (sourceType) {
case Boolean:
@@ -98,7 +98,7 @@ private static Object convert(
}
}
- public static int getPrecedence(@NotNull BuiltinDataType dataType) {
+ public static int getPrecedence(@NonNull BuiltinDataType dataType) {
// @formatter:off
switch (dataType) {
case Double:
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/Int16Conversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/Int16Conversions.java
index 831b6af0a..9b4f0a4aa 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/Int16Conversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/Int16Conversions.java
@@ -20,20 +20,20 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class Int16Conversions {
private Int16Conversions() {}
- @NotNull
- static Boolean int16ToBoolean(@NotNull Short s) {
+ @NonNull
+ static Boolean int16ToBoolean(@NonNull Short s) {
return s != 0;
}
@Nullable
- static UByte int16ToByte(@NotNull Short s) {
+ static UByte int16ToByte(@NonNull Short s) {
if (s >= 0 && s <= UByte.MAX_VALUE) {
return ubyte(s);
} else {
@@ -41,28 +41,28 @@ static UByte int16ToByte(@NotNull Short s) {
}
}
- @NotNull
- static Double int16ToDouble(@NotNull Short s) {
+ @NonNull
+ static Double int16ToDouble(@NonNull Short s) {
return (double) s;
}
- @NotNull
- static Float int16ToFloat(@NotNull Short s) {
+ @NonNull
+ static Float int16ToFloat(@NonNull Short s) {
return (float) s;
}
- @NotNull
- static Integer int16ToInt32(@NotNull Short s) {
+ @NonNull
+ static Integer int16ToInt32(@NonNull Short s) {
return (int) s;
}
- @NotNull
- static Long int16ToInt64(@NotNull Short s) {
+ @NonNull
+ static Long int16ToInt64(@NonNull Short s) {
return (long) s;
}
@Nullable
- static Byte int16ToSByte(@NotNull Short s) {
+ static Byte int16ToSByte(@NonNull Short s) {
if (s >= Byte.MIN_VALUE && s <= Byte.MAX_VALUE) {
return s.byteValue();
} else {
@@ -70,13 +70,13 @@ static Byte int16ToSByte(@NotNull Short s) {
}
}
- @NotNull
- static String int16ToString(@NotNull Short s) {
+ @NonNull
+ static String int16ToString(@NonNull Short s) {
return s.toString();
}
@Nullable
- static UShort int16ToUInt16(@NotNull Short s) {
+ static UShort int16ToUInt16(@NonNull Short s) {
if (s >= 0) {
return ushort(s);
} else {
@@ -85,7 +85,7 @@ static UShort int16ToUInt16(@NotNull Short s) {
}
@Nullable
- static UInteger int16ToUInt32(@NotNull Short s) {
+ static UInteger int16ToUInt32(@NonNull Short s) {
if (s >= 0) {
return uint(s);
} else {
@@ -94,7 +94,7 @@ static UInteger int16ToUInt32(@NotNull Short s) {
}
@Nullable
- static ULong int16ToUInt64(@NotNull Short s) {
+ static ULong int16ToUInt64(@NonNull Short s) {
if (s >= 0) {
return ulong(s);
} else {
@@ -114,7 +114,7 @@ static Object convert(@Nullable Object o, BuiltinDataType targetType, boolean im
}
@Nullable
- static Object explicitConversion(@NotNull Short s, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull Short s, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Boolean:
@@ -134,7 +134,7 @@ static Object explicitConversion(@NotNull Short s, BuiltinDataType targetType) {
}
@Nullable
- static Object implicitConversion(@NotNull Short s, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull Short s, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Double:
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/Int32Conversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/Int32Conversions.java
index e8933c23d..a51723b24 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/Int32Conversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/Int32Conversions.java
@@ -21,20 +21,20 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class Int32Conversions {
private Int32Conversions() {}
- @NotNull
- static Boolean int32ToBoolean(@NotNull Integer i) {
+ @NonNull
+ static Boolean int32ToBoolean(@NonNull Integer i) {
return i != 0;
}
@Nullable
- static UByte int32ToByte(@NotNull Integer i) {
+ static UByte int32ToByte(@NonNull Integer i) {
if (i >= 0 && i <= UByte.MAX_VALUE) {
return ubyte(i);
} else {
@@ -42,18 +42,18 @@ static UByte int32ToByte(@NotNull Integer i) {
}
}
- @NotNull
- static Double int32ToDouble(@NotNull Integer i) {
+ @NonNull
+ static Double int32ToDouble(@NonNull Integer i) {
return i.doubleValue();
}
- @NotNull
- static Float int32ToFloat(@NotNull Integer i) {
+ @NonNull
+ static Float int32ToFloat(@NonNull Integer i) {
return i.floatValue();
}
@Nullable
- static Short int32ToInt16(@NotNull Integer i) {
+ static Short int32ToInt16(@NonNull Integer i) {
if (i >= Short.MIN_VALUE && i <= Short.MAX_VALUE) {
return i.shortValue();
} else {
@@ -61,13 +61,13 @@ static Short int32ToInt16(@NotNull Integer i) {
}
}
- @NotNull
- static Long int32ToInt64(@NotNull Integer i) {
+ @NonNull
+ static Long int32ToInt64(@NonNull Integer i) {
return i.longValue();
}
@Nullable
- static Byte int32ToSByte(@NotNull Integer i) {
+ static Byte int32ToSByte(@NonNull Integer i) {
if (i >= Byte.MIN_VALUE && i <= Byte.MAX_VALUE) {
return i.byteValue();
} else {
@@ -75,18 +75,18 @@ static Byte int32ToSByte(@NotNull Integer i) {
}
}
- @NotNull
- static StatusCode int32ToStatusCode(@NotNull Integer i) {
+ @NonNull
+ static StatusCode int32ToStatusCode(@NonNull Integer i) {
return new StatusCode(i);
}
- @NotNull
- static String int32ToString(@NotNull Integer i) {
+ @NonNull
+ static String int32ToString(@NonNull Integer i) {
return i.toString();
}
@Nullable
- static UShort int32ToUInt16(@NotNull Integer i) {
+ static UShort int32ToUInt16(@NonNull Integer i) {
if (i >= UShort.MIN_VALUE && i <= UShort.MAX_VALUE) {
return ushort(i);
} else {
@@ -95,7 +95,7 @@ static UShort int32ToUInt16(@NotNull Integer i) {
}
@Nullable
- static UInteger int32ToUInt32(@NotNull Integer i) {
+ static UInteger int32ToUInt32(@NonNull Integer i) {
if (i >= 0) {
return uint(i);
} else {
@@ -104,7 +104,7 @@ static UInteger int32ToUInt32(@NotNull Integer i) {
}
@Nullable
- static ULong int32ToUInt64(@NotNull Integer i) {
+ static ULong int32ToUInt64(@NonNull Integer i) {
if (i >= 0) {
return ulong(i);
} else {
@@ -124,7 +124,7 @@ static Object convert(@Nullable Object o, BuiltinDataType targetType, boolean im
}
@Nullable
- static Object explicitConversion(@NotNull Integer i, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull Integer i, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Boolean:
@@ -150,7 +150,7 @@ static Object explicitConversion(@NotNull Integer i, BuiltinDataType targetType)
}
@Nullable
- static Object implicitConversion(@NotNull Integer i, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull Integer i, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Double:
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/Int64Conversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/Int64Conversions.java
index 9208569e6..ae9daa2bd 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/Int64Conversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/Int64Conversions.java
@@ -21,20 +21,20 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class Int64Conversions {
private Int64Conversions() {}
- @NotNull
- static Boolean int64ToBoolean(@NotNull Long l) {
+ @NonNull
+ static Boolean int64ToBoolean(@NonNull Long l) {
return l != 0;
}
@Nullable
- static UByte int64ToByte(@NotNull Long l) {
+ static UByte int64ToByte(@NonNull Long l) {
if (l >= 0 && l <= UByte.MAX_VALUE) {
return ubyte(l);
} else {
@@ -42,18 +42,18 @@ static UByte int64ToByte(@NotNull Long l) {
}
}
- @NotNull
- static Double int64ToDouble(@NotNull Long l) {
+ @NonNull
+ static Double int64ToDouble(@NonNull Long l) {
return l.doubleValue();
}
- @NotNull
- static Float int64ToFloat(@NotNull Long l) {
+ @NonNull
+ static Float int64ToFloat(@NonNull Long l) {
return l.floatValue();
}
@Nullable
- static Short int64ToInt16(@NotNull Long l) {
+ static Short int64ToInt16(@NonNull Long l) {
if (l >= Short.MIN_VALUE && l <= Short.MAX_VALUE) {
return l.shortValue();
} else {
@@ -62,7 +62,7 @@ static Short int64ToInt16(@NotNull Long l) {
}
@Nullable
- static Integer int64ToInt32(@NotNull Long l) {
+ static Integer int64ToInt32(@NonNull Long l) {
if (l >= Integer.MIN_VALUE && l <= Integer.MAX_VALUE) {
return l.intValue();
} else {
@@ -71,7 +71,7 @@ static Integer int64ToInt32(@NotNull Long l) {
}
@Nullable
- static Byte int64ToSByte(@NotNull Long l) {
+ static Byte int64ToSByte(@NonNull Long l) {
if (l >= Byte.MIN_VALUE && l <= Byte.MAX_VALUE) {
return l.byteValue();
} else {
@@ -79,18 +79,18 @@ static Byte int64ToSByte(@NotNull Long l) {
}
}
- @NotNull
- static StatusCode int64ToStatusCode(@NotNull Long l) {
+ @NonNull
+ static StatusCode int64ToStatusCode(@NonNull Long l) {
return new StatusCode(l);
}
- @NotNull
- static String int64ToString(@NotNull Long l) {
+ @NonNull
+ static String int64ToString(@NonNull Long l) {
return l.toString();
}
@Nullable
- static UShort int64ToUInt16(@NotNull Long l) {
+ static UShort int64ToUInt16(@NonNull Long l) {
if (l >= 0 && l <= UShort.MAX_VALUE) {
return ushort(l.intValue());
} else {
@@ -99,7 +99,7 @@ static UShort int64ToUInt16(@NotNull Long l) {
}
@Nullable
- static UInteger int64ToUInt32(@NotNull Long l) {
+ static UInteger int64ToUInt32(@NonNull Long l) {
if (l >= 0 && l <= UInteger.MAX_VALUE) {
return uint(l);
} else {
@@ -108,7 +108,7 @@ static UInteger int64ToUInt32(@NotNull Long l) {
}
@Nullable
- static ULong int64ToUInt64(@NotNull Long l) {
+ static ULong int64ToUInt64(@NonNull Long l) {
if (l >= 0) {
return ulong(l);
} else {
@@ -128,7 +128,7 @@ static Object convert(@Nullable Object o, BuiltinDataType targetType, boolean im
}
@Nullable
- static Object explicitConversion(@NotNull Long l, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull Long l, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Boolean:
@@ -158,7 +158,7 @@ static Object explicitConversion(@NotNull Long l, BuiltinDataType targetType) {
}
@Nullable
- static Object implicitConversion(@NotNull Long l, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull Long l, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Double:
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/LocalizedTextConversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/LocalizedTextConversions.java
index f567dbdfe..e9f0041fc 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/LocalizedTextConversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/LocalizedTextConversions.java
@@ -12,20 +12,20 @@
import org.eclipse.milo.opcua.stack.core.BuiltinDataType;
import org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class LocalizedTextConversions {
private LocalizedTextConversions() {}
@Nullable
- static String localizedTextToString(@NotNull LocalizedText text) {
+ static String localizedTextToString(@NonNull LocalizedText text) {
return text.getText();
}
@Nullable
- static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean implicit) {
+ static Object convert(@NonNull Object o, BuiltinDataType targetType, boolean implicit) {
if (o instanceof LocalizedText) {
LocalizedText text = (LocalizedText) o;
@@ -36,12 +36,12 @@ static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean imp
}
@Nullable
- static Object explicitConversion(@NotNull LocalizedText text, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull LocalizedText text, BuiltinDataType targetType) {
return implicitConversion(text, targetType);
}
@Nullable
- static Object implicitConversion(@NotNull LocalizedText text, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull LocalizedText text, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case String:
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/NodeIdConversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/NodeIdConversions.java
index 56ddfb2c6..a3cb938d5 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/NodeIdConversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/NodeIdConversions.java
@@ -13,25 +13,25 @@
import org.eclipse.milo.opcua.stack.core.BuiltinDataType;
import org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class NodeIdConversions {
private NodeIdConversions() {}
- @NotNull
- static ExpandedNodeId nodeIdToExpandedNodeId(@NotNull NodeId nodeId) {
+ @NonNull
+ static ExpandedNodeId nodeIdToExpandedNodeId(@NonNull NodeId nodeId) {
return nodeId.expanded();
}
- @NotNull
- static String nodeIdToString(@NotNull NodeId nodeId) {
+ @NonNull
+ static String nodeIdToString(@NonNull NodeId nodeId) {
return nodeId.toParseableString();
}
@Nullable
- static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean implicit) {
+ static Object convert(@NonNull Object o, BuiltinDataType targetType, boolean implicit) {
if (o instanceof NodeId) {
NodeId nodeId = (NodeId) o;
@@ -44,12 +44,12 @@ static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean imp
}
@Nullable
- static Object explicitConversion(@NotNull NodeId nodeId, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull NodeId nodeId, BuiltinDataType targetType) {
return implicitConversion(nodeId, targetType);
}
@Nullable
- static Object implicitConversion(@NotNull NodeId nodeId, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull NodeId nodeId, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case ExpandedNodeId:
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/QualifiedNameConversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/QualifiedNameConversions.java
index 1adcedc8c..dfc43346c 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/QualifiedNameConversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/QualifiedNameConversions.java
@@ -13,25 +13,25 @@
import org.eclipse.milo.opcua.stack.core.BuiltinDataType;
import org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText;
import org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class QualifiedNameConversions {
private QualifiedNameConversions() {}
@Nullable
- static String qualifiedNameToString(@NotNull QualifiedName name) {
+ static String qualifiedNameToString(@NonNull QualifiedName name) {
return name.getName();
}
- @NotNull
- static LocalizedText qualifiedNameToLocalizedText(@NotNull QualifiedName name) {
+ @NonNull
+ static LocalizedText qualifiedNameToLocalizedText(@NonNull QualifiedName name) {
return new LocalizedText("", name.getName());
}
@Nullable
- static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean implicit) {
+ static Object convert(@NonNull Object o, BuiltinDataType targetType, boolean implicit) {
if (o instanceof QualifiedName) {
QualifiedName name = (QualifiedName) o;
@@ -42,12 +42,12 @@ static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean imp
}
@Nullable
- static Object explicitConversion(@NotNull QualifiedName name, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull QualifiedName name, BuiltinDataType targetType) {
return implicitConversion(name, targetType);
}
@Nullable
- static Object implicitConversion(@NotNull QualifiedName name, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull QualifiedName name, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case String:
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/SByteConversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/SByteConversions.java
index d8a03cf1c..c1ba38b85 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/SByteConversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/SByteConversions.java
@@ -20,20 +20,20 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class SByteConversions {
private SByteConversions() {}
- @NotNull
- static Boolean sByteToBoolean(@NotNull Byte b) {
+ @NonNull
+ static Boolean sByteToBoolean(@NonNull Byte b) {
return b != 0;
}
@Nullable
- static UByte sByteToByte(@NotNull Byte b) {
+ static UByte sByteToByte(@NonNull Byte b) {
if (b >= 0) {
return ubyte(b);
} else {
@@ -41,38 +41,38 @@ static UByte sByteToByte(@NotNull Byte b) {
}
}
- @NotNull
- static Double sByteToDouble(@NotNull Byte b) {
+ @NonNull
+ static Double sByteToDouble(@NonNull Byte b) {
return b.doubleValue();
}
- @NotNull
- static Float sByteToFloat(@NotNull Byte b) {
+ @NonNull
+ static Float sByteToFloat(@NonNull Byte b) {
return b.floatValue();
}
- @NotNull
- static Short sByteToInt16(@NotNull Byte b) {
+ @NonNull
+ static Short sByteToInt16(@NonNull Byte b) {
return b.shortValue();
}
- @NotNull
- static Integer sByteToInt32(@NotNull Byte b) {
+ @NonNull
+ static Integer sByteToInt32(@NonNull Byte b) {
return b.intValue();
}
- @NotNull
- static Long sByteToInt64(@NotNull Byte b) {
+ @NonNull
+ static Long sByteToInt64(@NonNull Byte b) {
return b.longValue();
}
- @NotNull
- static String sByteToString(@NotNull Byte b) {
+ @NonNull
+ static String sByteToString(@NonNull Byte b) {
return b.toString();
}
@Nullable
- static UShort sByteToUInt16(@NotNull Byte b) {
+ static UShort sByteToUInt16(@NonNull Byte b) {
if (b >= 0) {
return ushort(b);
} else {
@@ -81,7 +81,7 @@ static UShort sByteToUInt16(@NotNull Byte b) {
}
@Nullable
- static UInteger sByteToUInt32(@NotNull Byte b) {
+ static UInteger sByteToUInt32(@NonNull Byte b) {
if (b >= 0) {
return uint(b);
} else {
@@ -90,7 +90,7 @@ static UInteger sByteToUInt32(@NotNull Byte b) {
}
@Nullable
- static ULong sByteToUInt64(@NotNull Byte b) {
+ static ULong sByteToUInt64(@NonNull Byte b) {
if (b >= 0) {
return ulong(b);
} else {
@@ -99,7 +99,7 @@ static ULong sByteToUInt64(@NotNull Byte b) {
}
@Nullable
- static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean implicit) {
+ static Object convert(@NonNull Object o, BuiltinDataType targetType, boolean implicit) {
if (o instanceof Byte) {
Byte b = (Byte) o;
@@ -110,7 +110,7 @@ static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean imp
}
@Nullable
- static Object explicitConversion(@NotNull Byte b, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull Byte b, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Boolean:
@@ -126,7 +126,7 @@ static Object explicitConversion(@NotNull Byte b, BuiltinDataType targetType) {
}
@Nullable
- static Object implicitConversion(@NotNull Byte b, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull Byte b, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Double:
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/StatusCodeConversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/StatusCodeConversions.java
index c973dd3a2..71fd09f75 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/StatusCodeConversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/StatusCodeConversions.java
@@ -19,45 +19,45 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class StatusCodeConversions {
private StatusCodeConversions() {}
- @NotNull
- static Short statusCodeToInt16(@NotNull StatusCode s) {
+ @NonNull
+ static Short statusCodeToInt16(@NonNull StatusCode s) {
return (short) ((s.getValue() >>> 16) & 0xFFFF);
}
- @NotNull
- static Integer statusCodeToInt32(@NotNull StatusCode s) {
+ @NonNull
+ static Integer statusCodeToInt32(@NonNull StatusCode s) {
return (int) s.getValue();
}
- @NotNull
- static Long statusCodeToInt64(@NotNull StatusCode s) {
+ @NonNull
+ static Long statusCodeToInt64(@NonNull StatusCode s) {
return s.getValue();
}
- @NotNull
- static UShort statusCodeToUInt16(@NotNull StatusCode s) {
+ @NonNull
+ static UShort statusCodeToUInt16(@NonNull StatusCode s) {
return ushort(statusCodeToInt16(s));
}
- @NotNull
- static UInteger statusCodeToUInt32(@NotNull StatusCode s) {
+ @NonNull
+ static UInteger statusCodeToUInt32(@NonNull StatusCode s) {
return uint(statusCodeToInt32(s));
}
- @NotNull
- static ULong statusCodeToUInt64(@NotNull StatusCode s) {
+ @NonNull
+ static ULong statusCodeToUInt64(@NonNull StatusCode s) {
return ulong(s.getValue());
}
@Nullable
- static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean implicit) {
+ static Object convert(@NonNull Object o, BuiltinDataType targetType, boolean implicit) {
if (o instanceof StatusCode) {
StatusCode s = (StatusCode) o;
@@ -68,7 +68,7 @@ static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean imp
}
@Nullable
- static Object explicitConversion(@NotNull StatusCode s, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull StatusCode s, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Int16:
@@ -82,7 +82,7 @@ static Object explicitConversion(@NotNull StatusCode s, BuiltinDataType targetTy
}
@Nullable
- static Object implicitConversion(@NotNull StatusCode s, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull StatusCode s, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Int32:
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/StringConversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/StringConversions.java
index 0eb6f7fd9..cacbf1c86 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/StringConversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/StringConversions.java
@@ -26,8 +26,8 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class StringConversions {
@@ -41,7 +41,7 @@ final class StringConversions {
private StringConversions() {}
@Nullable
- static Boolean stringToBoolean(@NotNull String s) {
+ static Boolean stringToBoolean(@NonNull String s) {
if (s.equalsIgnoreCase("true") || s.equals("1")) {
return true;
} else if (s.equalsIgnoreCase("false") || s.equals("0")) {
@@ -52,7 +52,7 @@ static Boolean stringToBoolean(@NotNull String s) {
}
@Nullable
- static UByte stringToByte(@NotNull String s) {
+ static UByte stringToByte(@NonNull String s) {
try {
return UByte.valueOf(s);
} catch (NumberFormatException e) {
@@ -61,7 +61,7 @@ static UByte stringToByte(@NotNull String s) {
}
@Nullable
- static DateTime stringToDateTime(@NotNull String s) {
+ static DateTime stringToDateTime(@NonNull String s) {
try {
Date date = iso8601UtcStringToDate(s);
@@ -72,7 +72,7 @@ static DateTime stringToDateTime(@NotNull String s) {
}
@Nullable
- static Double stringToDouble(@NotNull String s) {
+ static Double stringToDouble(@NonNull String s) {
try {
return Double.valueOf(s);
} catch (NumberFormatException e) {
@@ -81,7 +81,7 @@ static Double stringToDouble(@NotNull String s) {
}
@Nullable
- static ExpandedNodeId stringToExpandedNodeId(@NotNull String s) {
+ static ExpandedNodeId stringToExpandedNodeId(@NonNull String s) {
try {
return ExpandedNodeId.parse(s);
} catch (Throwable t) {
@@ -90,7 +90,7 @@ static ExpandedNodeId stringToExpandedNodeId(@NotNull String s) {
}
@Nullable
- static Float stringToFloat(@NotNull String s) {
+ static Float stringToFloat(@NonNull String s) {
try {
return Float.valueOf(s);
} catch (NumberFormatException e) {
@@ -99,7 +99,7 @@ static Float stringToFloat(@NotNull String s) {
}
@Nullable
- static UUID stringToGuid(@NotNull String s) {
+ static UUID stringToGuid(@NonNull String s) {
try {
return UUID.fromString(s);
} catch (IllegalArgumentException e) {
@@ -108,7 +108,7 @@ static UUID stringToGuid(@NotNull String s) {
}
@Nullable
- static Short stringToInt16(@NotNull String s) {
+ static Short stringToInt16(@NonNull String s) {
try {
return Short.valueOf(s);
} catch (NumberFormatException e) {
@@ -117,7 +117,7 @@ static Short stringToInt16(@NotNull String s) {
}
@Nullable
- static Integer stringToInt32(@NotNull String s) {
+ static Integer stringToInt32(@NonNull String s) {
try {
return Integer.valueOf(s);
} catch (NumberFormatException e) {
@@ -126,7 +126,7 @@ static Integer stringToInt32(@NotNull String s) {
}
@Nullable
- static Long stringToInt64(@NotNull String s) {
+ static Long stringToInt64(@NonNull String s) {
try {
return Long.valueOf(s);
} catch (NumberFormatException e) {
@@ -135,7 +135,7 @@ static Long stringToInt64(@NotNull String s) {
}
@Nullable
- static NodeId stringToNodeId(@NotNull String s) {
+ static NodeId stringToNodeId(@NonNull String s) {
try {
return NodeId.parse(s);
} catch (Throwable t) {
@@ -144,7 +144,7 @@ static NodeId stringToNodeId(@NotNull String s) {
}
@Nullable
- static Byte stringToSByte(@NotNull String s) {
+ static Byte stringToSByte(@NonNull String s) {
try {
return Byte.valueOf(s);
} catch (NumberFormatException e) {
@@ -152,18 +152,18 @@ static Byte stringToSByte(@NotNull String s) {
}
}
- @NotNull
- static LocalizedText stringToLocalizedText(@NotNull String s) {
+ @NonNull
+ static LocalizedText stringToLocalizedText(@NonNull String s) {
return new LocalizedText("", s);
}
- @NotNull
- static QualifiedName stringToQualifiedName(@NotNull String s) {
+ @NonNull
+ static QualifiedName stringToQualifiedName(@NonNull String s) {
return new QualifiedName(0, s);
}
@Nullable
- static UShort stringToUInt16(@NotNull String s) {
+ static UShort stringToUInt16(@NonNull String s) {
try {
return UShort.valueOf(s);
} catch (NumberFormatException e) {
@@ -172,7 +172,7 @@ static UShort stringToUInt16(@NotNull String s) {
}
@Nullable
- static UInteger stringToUInt32(@NotNull String s) {
+ static UInteger stringToUInt32(@NonNull String s) {
try {
return UInteger.valueOf(s);
} catch (NumberFormatException e) {
@@ -181,7 +181,7 @@ static UInteger stringToUInt32(@NotNull String s) {
}
@Nullable
- static ULong stringToUInt64(@NotNull String s) {
+ static ULong stringToUInt64(@NonNull String s) {
try {
return ULong.valueOf(s);
} catch (NumberFormatException e) {
@@ -196,7 +196,7 @@ private static Date iso8601UtcStringToDate(String s) throws ParseException {
}
@Nullable
- static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean implicit) {
+ static Object convert(@NonNull Object o, BuiltinDataType targetType, boolean implicit) {
if (o instanceof String) {
String s = (String) o;
@@ -207,7 +207,7 @@ static Object convert(@NotNull Object o, BuiltinDataType targetType, boolean imp
}
@Nullable
- static Object explicitConversion(@NotNull String s, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull String s, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case DateTime:
@@ -227,7 +227,7 @@ static Object explicitConversion(@NotNull String s, BuiltinDataType targetType)
}
@Nullable
- static Object implicitConversion(@NotNull String s, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull String s, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Boolean:
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/UInt16Conversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/UInt16Conversions.java
index 9480a4dcd..b9b2f8ffb 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/UInt16Conversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/UInt16Conversions.java
@@ -20,20 +20,20 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class UInt16Conversions {
private UInt16Conversions() {}
- @NotNull
- static Boolean uInt16ToBoolean(@NotNull UShort us) {
+ @NonNull
+ static Boolean uInt16ToBoolean(@NonNull UShort us) {
return us.intValue() != 0;
}
@Nullable
- static UByte uInt16ToByte(@NotNull UShort us) {
+ static UByte uInt16ToByte(@NonNull UShort us) {
int i = us.intValue();
if (i <= UByte.MAX_VALUE) {
@@ -43,18 +43,18 @@ static UByte uInt16ToByte(@NotNull UShort us) {
}
}
- @NotNull
- static Double uInt16ToDouble(@NotNull UShort us) {
+ @NonNull
+ static Double uInt16ToDouble(@NonNull UShort us) {
return us.doubleValue();
}
- @NotNull
- static Float uInt16ToFloat(@NotNull UShort us) {
+ @NonNull
+ static Float uInt16ToFloat(@NonNull UShort us) {
return us.floatValue();
}
@Nullable
- static Short uInt16ToInt16(@NotNull UShort us) {
+ static Short uInt16ToInt16(@NonNull UShort us) {
int i = us.intValue();
if (i <= Short.MAX_VALUE) {
@@ -64,18 +64,18 @@ static Short uInt16ToInt16(@NotNull UShort us) {
}
}
- @NotNull
- static Integer uInt16ToInt32(@NotNull UShort us) {
+ @NonNull
+ static Integer uInt16ToInt32(@NonNull UShort us) {
return us.intValue();
}
- @NotNull
- static Long uInt16ToInt64(@NotNull UShort us) {
+ @NonNull
+ static Long uInt16ToInt64(@NonNull UShort us) {
return us.longValue();
}
@Nullable
- static Byte uInt16ToSByte(@NotNull UShort us) {
+ static Byte uInt16ToSByte(@NonNull UShort us) {
int i = us.intValue();
if (i <= Byte.MAX_VALUE) {
@@ -85,23 +85,23 @@ static Byte uInt16ToSByte(@NotNull UShort us) {
}
}
- @NotNull
- static StatusCode uInt16ToStatusCode(@NotNull UShort us) {
+ @NonNull
+ static StatusCode uInt16ToStatusCode(@NonNull UShort us) {
return new StatusCode(us.longValue() << 16);
}
- @NotNull
- static String uInt16ToString(@NotNull UShort us) {
+ @NonNull
+ static String uInt16ToString(@NonNull UShort us) {
return us.toString();
}
- @NotNull
- static UInteger uInt16ToUInt32(@NotNull UShort us) {
+ @NonNull
+ static UInteger uInt16ToUInt32(@NonNull UShort us) {
return uint(us.intValue());
}
- @NotNull
- static ULong uInt16ToUInt64(@NotNull UShort us) {
+ @NonNull
+ static ULong uInt16ToUInt64(@NonNull UShort us) {
return ulong(us.longValue());
}
@@ -117,7 +117,7 @@ static Object convert(@Nullable Object o, BuiltinDataType targetType, boolean im
}
@Nullable
- static Object explicitConversion(@NotNull UShort us, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull UShort us, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Boolean:
@@ -135,7 +135,7 @@ static Object explicitConversion(@NotNull UShort us, BuiltinDataType targetType)
}
@Nullable
- static Object implicitConversion(@NotNull UShort us, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull UShort us, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Double:
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/UInt32Conversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/UInt32Conversions.java
index 2ae80b833..550e762ed 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/UInt32Conversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/UInt32Conversions.java
@@ -20,20 +20,20 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class UInt32Conversions {
private UInt32Conversions() {}
- @NotNull
- static Boolean uInt32ToBoolean(@NotNull UInteger ui) {
+ @NonNull
+ static Boolean uInt32ToBoolean(@NonNull UInteger ui) {
return ui.intValue() != 0;
}
@Nullable
- static UByte uInt32ToByte(@NotNull UInteger ui) {
+ static UByte uInt32ToByte(@NonNull UInteger ui) {
long l = ui.longValue();
if (l <= UByte.MAX_VALUE) {
@@ -43,18 +43,18 @@ static UByte uInt32ToByte(@NotNull UInteger ui) {
}
}
- @NotNull
- static Double uInt32ToDouble(@NotNull UInteger ui) {
+ @NonNull
+ static Double uInt32ToDouble(@NonNull UInteger ui) {
return ui.doubleValue();
}
- @NotNull
- static Float uInt32ToFloat(@NotNull UInteger ui) {
+ @NonNull
+ static Float uInt32ToFloat(@NonNull UInteger ui) {
return ui.floatValue();
}
@Nullable
- static Short uInt32ToInt16(@NotNull UInteger ui) {
+ static Short uInt32ToInt16(@NonNull UInteger ui) {
int i = ui.intValue();
if (i <= Short.MAX_VALUE) {
@@ -65,7 +65,7 @@ static Short uInt32ToInt16(@NotNull UInteger ui) {
}
@Nullable
- static Integer uInt32ToInt32(@NotNull UInteger ui) {
+ static Integer uInt32ToInt32(@NonNull UInteger ui) {
long l = ui.longValue();
if (l <= Integer.MAX_VALUE) {
@@ -75,13 +75,13 @@ static Integer uInt32ToInt32(@NotNull UInteger ui) {
}
}
- @NotNull
- static Long uInt32ToInt64(@NotNull UInteger ui) {
+ @NonNull
+ static Long uInt32ToInt64(@NonNull UInteger ui) {
return ui.longValue();
}
@Nullable
- static Byte uInt32ToSByte(@NotNull UInteger ui) {
+ static Byte uInt32ToSByte(@NonNull UInteger ui) {
int i = ui.intValue();
if (i <= Byte.MAX_VALUE) {
@@ -91,18 +91,18 @@ static Byte uInt32ToSByte(@NotNull UInteger ui) {
}
}
- @NotNull
- static StatusCode uInt32ToStatusCode(@NotNull UInteger ui) {
+ @NonNull
+ static StatusCode uInt32ToStatusCode(@NonNull UInteger ui) {
return new StatusCode(ui);
}
- @NotNull
- static String uInt32ToString(@NotNull UInteger ui) {
+ @NonNull
+ static String uInt32ToString(@NonNull UInteger ui) {
return ui.toString();
}
@Nullable
- static UShort uInt32ToUInt16(@NotNull UInteger ui) {
+ static UShort uInt32ToUInt16(@NonNull UInteger ui) {
int i = ui.intValue();
if (i <= UShort.MAX_VALUE) {
@@ -112,8 +112,8 @@ static UShort uInt32ToUInt16(@NotNull UInteger ui) {
}
}
- @NotNull
- static ULong uInt32ToUInt64(@NotNull UInteger ui) {
+ @NonNull
+ static ULong uInt32ToUInt64(@NonNull UInteger ui) {
return ulong(ui.longValue());
}
@@ -129,7 +129,7 @@ static Object convert(@Nullable Object o, BuiltinDataType targetType, boolean im
}
@Nullable
- static Object explicitConversion(@NotNull UInteger ui, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull UInteger ui, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Boolean:
@@ -153,7 +153,7 @@ static Object explicitConversion(@NotNull UInteger ui, BuiltinDataType targetTyp
}
@Nullable
- static Object implicitConversion(@NotNull UInteger ui, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull UInteger ui, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Double:
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/UInt64Conversions.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/UInt64Conversions.java
index 87fb829da..42537e941 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/UInt64Conversions.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/UInt64Conversions.java
@@ -20,20 +20,20 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
final class UInt64Conversions {
private UInt64Conversions() {}
- @NotNull
- static Boolean uInt64ToBoolean(@NotNull ULong ul) {
+ @NonNull
+ static Boolean uInt64ToBoolean(@NonNull ULong ul) {
return ul.intValue() != 0;
}
@Nullable
- static UByte uInt64ToByte(@NotNull ULong ul) {
+ static UByte uInt64ToByte(@NonNull ULong ul) {
long l = ul.longValue();
if (Long.compareUnsigned(l, UByte.MAX_VALUE) <= 0) {
@@ -44,7 +44,7 @@ static UByte uInt64ToByte(@NotNull ULong ul) {
}
@Nullable
- static Double uInt64ToDouble(@NotNull ULong ul) {
+ static Double uInt64ToDouble(@NonNull ULong ul) {
long l = ul.longValue();
if (Long.compareUnsigned(l, (long) Double.MAX_VALUE) <= 0) {
@@ -55,7 +55,7 @@ static Double uInt64ToDouble(@NotNull ULong ul) {
}
@Nullable
- static Float uInt64ToFloat(@NotNull ULong ul) {
+ static Float uInt64ToFloat(@NonNull ULong ul) {
long l = ul.longValue();
if (Long.compareUnsigned(l, (long) Float.MAX_VALUE) <= 0) {
@@ -66,7 +66,7 @@ static Float uInt64ToFloat(@NotNull ULong ul) {
}
@Nullable
- static Short uInt64ToInt16(@NotNull ULong ul) {
+ static Short uInt64ToInt16(@NonNull ULong ul) {
long l = ul.longValue();
if (Long.compareUnsigned(l, Short.MAX_VALUE) <= 0) {
@@ -77,7 +77,7 @@ static Short uInt64ToInt16(@NotNull ULong ul) {
}
@Nullable
- static Integer uInt64ToInt32(@NotNull ULong ul) {
+ static Integer uInt64ToInt32(@NonNull ULong ul) {
long l = ul.longValue();
if (Long.compareUnsigned(l, Integer.MAX_VALUE) <= 0) {
@@ -88,7 +88,7 @@ static Integer uInt64ToInt32(@NotNull ULong ul) {
}
@Nullable
- static Long uInt64ToInt64(@NotNull ULong ul) {
+ static Long uInt64ToInt64(@NonNull ULong ul) {
long l = ul.longValue();
if (Long.compareUnsigned(l, Long.MAX_VALUE) <= 0) {
@@ -99,7 +99,7 @@ static Long uInt64ToInt64(@NotNull ULong ul) {
}
@Nullable
- static Byte uInt64ToSByte(@NotNull ULong ul) {
+ static Byte uInt64ToSByte(@NonNull ULong ul) {
long l = ul.longValue();
if (Long.compareUnsigned(l, Byte.MAX_VALUE) <= 0) {
@@ -110,13 +110,13 @@ static Byte uInt64ToSByte(@NotNull ULong ul) {
}
@Nullable
- static StatusCode uInt64ToStatusCode(@NotNull ULong ul) {
+ static StatusCode uInt64ToStatusCode(@NonNull ULong ul) {
UInteger ui = uInt64ToUInt32(ul);
return ui != null ? UInt32Conversions.uInt32ToStatusCode(ui) : null;
}
- @NotNull
+ @NonNull
static String uInt64ToString(ULong ul) {
return ul.toString();
}
@@ -155,7 +155,7 @@ static Object convert(@Nullable Object o, BuiltinDataType targetType, boolean im
}
@Nullable
- static Object explicitConversion(@NotNull ULong ul, BuiltinDataType targetType) {
+ static Object explicitConversion(@NonNull ULong ul, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Boolean:
@@ -183,7 +183,7 @@ static Object explicitConversion(@NotNull ULong ul, BuiltinDataType targetType)
}
@Nullable
- static Object implicitConversion(@NotNull ULong ul, BuiltinDataType targetType) {
+ static Object implicitConversion(@NonNull ULong ul, BuiltinDataType targetType) {
// @formatter:off
switch (targetType) {
case Double:
diff --git a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/operators/Cast.java b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/operators/Cast.java
index 2c2cdabcf..7e762dc62 100644
--- a/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/operators/Cast.java
+++ b/opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/operators/Cast.java
@@ -21,7 +21,7 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
import org.eclipse.milo.opcua.stack.core.types.structured.FilterOperand;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class Cast implements Operator
-
- org.jetbrains
- annotations
- ${jetbrains-annotations.version}
- provided
-
org.junit.jupiter
diff --git a/opc-ua-stack/encoding-json/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/json/OpcUaJsonEncoder.java b/opc-ua-stack/encoding-json/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/json/OpcUaJsonEncoder.java
index 0019b46e1..0273502b4 100644
--- a/opc-ua-stack/encoding-json/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/json/OpcUaJsonEncoder.java
+++ b/opc-ua-stack/encoding-json/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/json/OpcUaJsonEncoder.java
@@ -52,7 +52,7 @@
import org.eclipse.milo.opcua.stack.core.types.enumerated.IdType;
import org.eclipse.milo.opcua.stack.core.util.ArrayUtil;
import org.eclipse.milo.opcua.stack.core.util.TypeUtil;
-import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
public class OpcUaJsonEncoder implements UaEncoder {
@@ -777,7 +777,7 @@ enum TypeHint {
OPTION_SET
}
- private void encodeVariantValue(@NotNull Object value) throws IOException {
+ private void encodeVariantValue(@NonNull Object value) throws IOException {
Class> valueClass;
if (value instanceof Matrix) {
Matrix m = (Matrix) value;
@@ -1036,7 +1036,7 @@ private void encodeBuiltinTypeValue(String field, int typeId, Object value)
contextPop();
}
- private static Class> getClass(@NotNull Object o) {
+ private static Class> getClass(@NonNull Object o) {
if (o.getClass().isArray()) {
return ArrayUtil.getType(o);
} else {
diff --git a/opc-ua-stack/pom.xml b/opc-ua-stack/pom.xml
index a6ea6b39c..ccbcfdc78 100644
--- a/opc-ua-stack/pom.xml
+++ b/opc-ua-stack/pom.xml
@@ -34,6 +34,14 @@
transport-websocket
+
+
+ org.jspecify
+ jspecify
+ ${jspecify.version}
+
+
+
diff --git a/opc-ua-stack/stack-core/pom.xml b/opc-ua-stack/stack-core/pom.xml
index fcdcd864b..eef2ac5b6 100644
--- a/opc-ua-stack/stack-core/pom.xml
+++ b/opc-ua-stack/stack-core/pom.xml
@@ -57,13 +57,6 @@
slf4j-api
${slf4j.version}
-
- org.jetbrains
- annotations
- ${jetbrains-annotations.version}
- provided
-
-
org.junit.jupiter
junit-jupiter-api
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/BuiltinDataType.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/BuiltinDataType.java
index a3411fcdb..bee70ed9a 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/BuiltinDataType.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/BuiltinDataType.java
@@ -28,7 +28,7 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
import org.eclipse.milo.opcua.stack.core.types.enumerated.IdType;
import org.eclipse.milo.opcua.stack.core.util.Namespaces;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public enum BuiltinDataType {
Boolean(1, Boolean.class),
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/Stack.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/Stack.java
index 8289c29c5..6febfda3a 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/Stack.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/Stack.java
@@ -22,7 +22,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import org.eclipse.milo.opcua.stack.core.util.ManifestUtil;
-import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
import org.slf4j.LoggerFactory;
public final class Stack {
@@ -70,7 +70,7 @@ public static synchronized NioEventLoopGroup sharedEventLoop() {
private final AtomicLong threadNumber = new AtomicLong(0L);
@Override
- public Thread newThread(@NotNull Runnable r) {
+ public Thread newThread(@NonNull Runnable r) {
Thread thread =
new Thread(r, "milo-netty-event-loop-" + threadNumber.getAndIncrement());
thread.setDaemon(true);
@@ -94,7 +94,7 @@ public static synchronized ExecutorService sharedExecutor() {
private final AtomicLong threadNumber = new AtomicLong(0L);
@Override
- public Thread newThread(@NotNull Runnable r) {
+ public Thread newThread(@NonNull Runnable r) {
Thread thread =
new Thread(r, "milo-shared-thread-pool-" + threadNumber.getAndIncrement());
thread.setDaemon(true);
@@ -140,7 +140,7 @@ public static synchronized ScheduledExecutorService sharedScheduledExecutor() {
private final AtomicLong threadNumber = new AtomicLong(0L);
@Override
- public Thread newThread(@NotNull Runnable r) {
+ public Thread newThread(@NonNull Runnable r) {
Thread thread =
new Thread(r, "milo-shared-scheduled-executor-" + threadNumber.getAndIncrement());
thread.setDaemon(true);
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/UriArray.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/UriArray.java
index 31bf15c88..42b127f1c 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/UriArray.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/UriArray.java
@@ -18,7 +18,7 @@
import java.util.Map;
import java.util.function.Consumer;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
/** Manages an array of URIs and provides bidirectional access to the URIs their indices. */
public abstract class UriArray {
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/channel/ChannelSecurity.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/channel/ChannelSecurity.java
index a6c9e3bc2..4a3fda9ed 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/channel/ChannelSecurity.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/channel/ChannelSecurity.java
@@ -15,7 +15,7 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.ByteString;
import org.eclipse.milo.opcua.stack.core.types.structured.ChannelSecurityToken;
import org.eclipse.milo.opcua.stack.core.util.PShaUtil;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class ChannelSecurity {
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/channel/headers/AsymmetricSecurityHeader.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/channel/headers/AsymmetricSecurityHeader.java
index b1014d277..b0fdadb15 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/channel/headers/AsymmetricSecurityHeader.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/channel/headers/AsymmetricSecurityHeader.java
@@ -18,7 +18,7 @@
import org.eclipse.milo.opcua.stack.core.UaSerializationException;
import org.eclipse.milo.opcua.stack.core.channel.EncodingLimits;
import org.eclipse.milo.opcua.stack.core.types.builtin.ByteString;
-import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
public class AsymmetricSecurityHeader {
@@ -36,9 +36,9 @@ public class AsymmetricSecurityHeader {
* field shall be null if the Message is not encrypted.
*/
public AsymmetricSecurityHeader(
- @NotNull String securityPolicyUri,
- @NotNull ByteString senderCertificate,
- @NotNull ByteString receiverThumbprint) {
+ @NonNull String securityPolicyUri,
+ @NonNull ByteString senderCertificate,
+ @NonNull ByteString receiverThumbprint) {
Preconditions.checkNotNull(securityPolicyUri);
Preconditions.checkArgument(
@@ -54,17 +54,17 @@ public AsymmetricSecurityHeader(
this.receiverThumbprint = receiverThumbprint;
}
- @NotNull
+ @NonNull
public String getSecurityPolicyUri() {
return securityPolicyUri;
}
- @NotNull
+ @NonNull
public ByteString getSenderCertificate() {
return senderCertificate;
}
- @NotNull
+ @NonNull
public ByteString getReceiverThumbprint() {
return receiverThumbprint;
}
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/channel/messages/HelloMessage.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/channel/messages/HelloMessage.java
index 7a19ff466..f86e190d0 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/channel/messages/HelloMessage.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/channel/messages/HelloMessage.java
@@ -17,7 +17,7 @@
import java.nio.charset.StandardCharsets;
import org.eclipse.milo.opcua.stack.core.StatusCodes;
import org.eclipse.milo.opcua.stack.core.UaException;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class HelloMessage {
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/DefaultEncodingManager.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/DefaultEncodingManager.java
index 80b14f7b5..f9146d446 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/DefaultEncodingManager.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/DefaultEncodingManager.java
@@ -17,7 +17,7 @@
import org.eclipse.milo.opcua.stack.core.encoding.binary.OpcUaDefaultBinaryEncoding;
import org.eclipse.milo.opcua.stack.core.types.DataTypeEncoding;
import org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/EncodingManager.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/EncodingManager.java
index d3d41441d..d9b4a7242 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/EncodingManager.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/EncodingManager.java
@@ -12,7 +12,7 @@
import org.eclipse.milo.opcua.stack.core.types.DataTypeEncoding;
import org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public interface EncodingManager {
@@ -20,9 +20,7 @@ public interface EncodingManager {
boolean hasEncoding(QualifiedName encodingName);
- @Nullable
- DataTypeEncoding getEncoding(QualifiedName encodingName);
+ @Nullable DataTypeEncoding getEncoding(QualifiedName encodingName);
- @Nullable
- DataTypeEncoding removeEncoding(QualifiedName encodingName);
+ @Nullable DataTypeEncoding removeEncoding(QualifiedName encodingName);
}
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/OpcUaEncodingManager.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/OpcUaEncodingManager.java
index fe5faabb4..cacd522cc 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/OpcUaEncodingManager.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/OpcUaEncodingManager.java
@@ -12,7 +12,7 @@
import org.eclipse.milo.opcua.stack.core.types.DataTypeEncoding;
import org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
/**
* A singleton {@link EncodingManager} initialized with the default OPC UA encodings.
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/binary/OpcUaBinaryDecoder.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/binary/OpcUaBinaryDecoder.java
index 29c938acc..4bd6cb552 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/binary/OpcUaBinaryDecoder.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/binary/OpcUaBinaryDecoder.java
@@ -49,7 +49,7 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
import org.eclipse.milo.opcua.stack.core.util.TypeUtil;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class OpcUaBinaryDecoder implements UaDecoder {
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/binary/OpcUaBinaryEncoder.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/binary/OpcUaBinaryEncoder.java
index 39eb8502c..f42d74ed6 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/binary/OpcUaBinaryEncoder.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/encoding/binary/OpcUaBinaryEncoder.java
@@ -47,7 +47,7 @@
import org.eclipse.milo.opcua.stack.core.types.enumerated.IdType;
import org.eclipse.milo.opcua.stack.core.util.ArrayUtil;
import org.eclipse.milo.opcua.stack.core.util.TypeUtil;
-import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
import org.slf4j.LoggerFactory;
public class OpcUaBinaryEncoder implements UaEncoder {
@@ -765,7 +765,7 @@ private void encodeBuiltinType(int typeId, Object value) throws UaSerializationE
}
}
- private Class> getClass(@NotNull Object o) {
+ private Class> getClass(@NonNull Object o) {
if (o.getClass().isArray()) {
return ArrayUtil.getType(o);
} else {
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/security/CertificateStore.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/security/CertificateStore.java
index 119242926..fcaad191e 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/security/CertificateStore.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/security/CertificateStore.java
@@ -13,7 +13,7 @@
import java.security.PrivateKey;
import java.security.cert.X509Certificate;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public interface CertificateStore {
@@ -35,8 +35,7 @@ public interface CertificateStore {
* {@code certificateTypeId}.
* @throws Exception if an error occurs while getting the {@link Entry}.
*/
- @Nullable
- Entry get(NodeId certificateTypeId) throws Exception;
+ @Nullable Entry get(NodeId certificateTypeId) throws Exception;
/**
* Remove the {@link Entry} for {@code certificateTypeId}.
@@ -46,8 +45,7 @@ public interface CertificateStore {
* certificateTypeId}.
* @throws Exception if an error occurs while removing the {@link Entry}.
*/
- @Nullable
- Entry remove(NodeId certificateTypeId) throws Exception;
+ @Nullable Entry remove(NodeId certificateTypeId) throws Exception;
/**
* Set the {@link Entry} for {@code certificateTypeId}.
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/security/CertificateValidator.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/security/CertificateValidator.java
index f12ab6874..7e6ee34db 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/security/CertificateValidator.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/security/CertificateValidator.java
@@ -13,7 +13,7 @@
import java.security.cert.X509Certificate;
import java.util.List;
import org.eclipse.milo.opcua.stack.core.UaException;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/security/DefaultServerCertificateValidator.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/security/DefaultServerCertificateValidator.java
index add0da2b7..22161dece 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/security/DefaultServerCertificateValidator.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/security/DefaultServerCertificateValidator.java
@@ -23,7 +23,7 @@
import org.eclipse.milo.opcua.stack.core.UaException;
import org.eclipse.milo.opcua.stack.core.util.validation.CertificateValidationUtil;
import org.eclipse.milo.opcua.stack.core.util.validation.ValidationCheck;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/DataTypeDictionary.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/DataTypeDictionary.java
index 2a915b11d..6d36e2e0e 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/DataTypeDictionary.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/DataTypeDictionary.java
@@ -13,19 +13,17 @@
import java.util.List;
import org.eclipse.milo.opcua.stack.core.encoding.DataTypeCodec;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public interface DataTypeDictionary {
String getNamespaceUri();
- @Nullable
- DataTypeCodec getCodec(String description);
+ @Nullable DataTypeCodec getCodec(String description);
void registerType(Type type);
- @Nullable
- Type getType(String description);
+ @Nullable Type getType(String description);
List getTypes();
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/DataTypeManager.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/DataTypeManager.java
index c4f2ede5c..be4d1f95d 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/DataTypeManager.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/DataTypeManager.java
@@ -12,7 +12,7 @@
import org.eclipse.milo.opcua.stack.core.encoding.DataTypeCodec;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public interface DataTypeManager {
@@ -31,20 +31,15 @@ void registerType(
* @param id the {@link NodeId} of either the datatype or encoding.
* @return the {@link DataTypeCodec} for the given {@link NodeId}.
*/
- @Nullable
- DataTypeCodec getCodec(NodeId id);
+ @Nullable DataTypeCodec getCodec(NodeId id);
- @Nullable
- NodeId getBinaryEncodingId(NodeId dataTypeId);
+ @Nullable NodeId getBinaryEncodingId(NodeId dataTypeId);
- @Nullable
- NodeId getXmlEncodingId(NodeId dataTypeId);
+ @Nullable NodeId getXmlEncodingId(NodeId dataTypeId);
- @Nullable
- NodeId getJsonEncodingId(NodeId dataTypeId);
+ @Nullable NodeId getJsonEncodingId(NodeId dataTypeId);
- @Nullable
- DataTypeDictionary getTypeDictionary(String namespaceUri);
+ @Nullable DataTypeDictionary getTypeDictionary(String namespaceUri);
void registerTypeDictionary(DataTypeDictionary dictionary);
}
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/DefaultDataTypeManager.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/DefaultDataTypeManager.java
index 827adfdc0..b7906fd0d 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/DefaultDataTypeManager.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/DefaultDataTypeManager.java
@@ -16,7 +16,7 @@
import org.eclipse.milo.opcua.stack.core.encoding.DataTypeCodec;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
import org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class DefaultDataTypeManager implements DataTypeManager {
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/UaEnumeratedType.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/UaEnumeratedType.java
index 6b738d5f6..76d2821ba 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/UaEnumeratedType.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/UaEnumeratedType.java
@@ -10,7 +10,7 @@
package org.eclipse.milo.opcua.stack.core.types;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
/** Identifies an OPC UA enumerated type. */
public interface UaEnumeratedType extends UaDataType {
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/ByteString.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/ByteString.java
index 6df54778b..4c5084c57 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/ByteString.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/ByteString.java
@@ -15,8 +15,8 @@
import java.util.Arrays;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.Unsigned;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
public final class ByteString implements Serializable {
@@ -50,11 +50,11 @@ public boolean isNotNull() {
return bytes;
}
- public byte @NotNull [] bytesOrElse(byte @NotNull [] other) {
+ public byte @NonNull [] bytesOrElse(byte @NonNull [] other) {
return bytes != null ? bytes : other;
}
- public byte @NotNull [] bytesOrEmpty() {
+ public byte @NonNull [] bytesOrEmpty() {
return bytesOrElse(new byte[0]);
}
@@ -68,13 +68,13 @@ public boolean isNotNull() {
return bs;
}
- public @NotNull UByte[] uBytesOrElse(@NotNull UByte[] other) {
+ public @NonNull UByte[] uBytesOrElse(@NonNull UByte[] other) {
UByte[] ubs = uBytes();
return ubs != null ? ubs : other;
}
- public @NotNull UByte[] uBytesOrEmpty() {
+ public @NonNull UByte[] uBytesOrEmpty() {
return uBytesOrElse(new UByte[0]);
}
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/DataValue.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/DataValue.java
index ce7f58f85..0ba7f5bed 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/DataValue.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/DataValue.java
@@ -17,8 +17,8 @@
import org.eclipse.milo.opcua.stack.core.AttributeId;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
import org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
public final class DataValue {
@@ -58,7 +58,7 @@ public DataValue(
}
public DataValue(
- @NotNull Variant value,
+ @NonNull Variant value,
@Nullable StatusCode status,
@Nullable DateTime sourceTime,
@Nullable UShort sourcePicoseconds,
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/DiagnosticInfo.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/DiagnosticInfo.java
index 6afd7241d..015de0eb4 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/DiagnosticInfo.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/DiagnosticInfo.java
@@ -11,7 +11,7 @@
package org.eclipse.milo.opcua.stack.core.types.builtin;
import java.util.Objects;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
/** Vendor-specific diagnostic information */
public final class DiagnosticInfo {
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/ExpandedNodeId.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/ExpandedNodeId.java
index d01a640f2..82d6f01e3 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/ExpandedNodeId.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/ExpandedNodeId.java
@@ -27,8 +27,8 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
import org.eclipse.milo.opcua.stack.core.types.enumerated.IdType;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
public final class ExpandedNodeId {
@@ -85,10 +85,10 @@ public ExpandedNodeId(
}
public ExpandedNodeId(
- @NotNull UShort namespaceIndex,
+ @NonNull UShort namespaceIndex,
@Nullable String namespaceUri,
@Nullable Object identifier,
- @NotNull UInteger serverIndex) {
+ @NonNull UInteger serverIndex) {
Preconditions.checkNotNull(namespaceIndex);
Preconditions.checkNotNull(serverIndex);
@@ -586,7 +586,7 @@ public static ExpandedNodeId parse(String s) {
* @return an {@link ExpandedNodeId} or {@code null} if parsing fails.
*/
@Nullable
- public static ExpandedNodeId parseOrNull(@NotNull String s) {
+ public static ExpandedNodeId parseOrNull(@NonNull String s) {
try {
return ExpandedNodeId.parse(s);
} catch (UaRuntimeException t) {
@@ -602,7 +602,7 @@ public static ExpandedNodeId parseOrNull(@NotNull String s) {
* @return an Optional containing an {@link ExpandedNodeId}, or {@link Optional#empty()} if
* parsing fails.
*/
- public static Optional parseSafe(@NotNull String s) {
+ public static Optional parseSafe(@NonNull String s) {
return Optional.ofNullable(parseOrNull(s));
}
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/ExtensionObject.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/ExtensionObject.java
index 8df747d41..8c899d2a3 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/ExtensionObject.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/ExtensionObject.java
@@ -19,8 +19,8 @@
import org.eclipse.milo.opcua.stack.core.types.DataTypeEncoding;
import org.eclipse.milo.opcua.stack.core.types.UaStructuredType;
import org.eclipse.milo.opcua.stack.core.util.Lazy;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
public final class ExtensionObject {
@@ -37,19 +37,19 @@ public enum BodyType {
private final Object body;
private final NodeId encodingId;
- public ExtensionObject(@NotNull ByteString body, @NotNull NodeId encodingId) {
+ public ExtensionObject(@NonNull ByteString body, @NonNull NodeId encodingId) {
this((Object) body, encodingId);
}
- public ExtensionObject(@NotNull XmlElement body, @NotNull NodeId encodingId) {
+ public ExtensionObject(@NonNull XmlElement body, @NonNull NodeId encodingId) {
this((Object) body, encodingId);
}
- public ExtensionObject(@Nullable String body, @NotNull NodeId encodingId) {
+ public ExtensionObject(@Nullable String body, @NonNull NodeId encodingId) {
this((Object) body, encodingId);
}
- private ExtensionObject(@Nullable Object body, @NotNull NodeId encodingId) {
+ private ExtensionObject(@Nullable Object body, @NonNull NodeId encodingId) {
this.body = body;
this.encodingId = encodingId;
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/LocalizedText.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/LocalizedText.java
index 59a3dbc95..f5e332524 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/LocalizedText.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/LocalizedText.java
@@ -13,7 +13,7 @@
import com.google.common.base.MoreObjects;
import java.util.Locale;
import java.util.Objects;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public final class LocalizedText {
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/Matrix.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/Matrix.java
index 8f1549bcf..1afaf9462 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/Matrix.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/Matrix.java
@@ -25,7 +25,7 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
import org.eclipse.milo.opcua.stack.core.util.ArrayUtil;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
/**
* Matrix is a container for multidimensional array values.
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/NodeId.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/NodeId.java
index 63370b4c4..5a2b807fb 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/NodeId.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/NodeId.java
@@ -27,8 +27,8 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
import org.eclipse.milo.opcua.stack.core.types.enumerated.IdType;
import org.eclipse.milo.opcua.stack.core.util.Namespaces;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
public final class NodeId {
@@ -152,7 +152,7 @@ public NodeId(UShort namespaceIndex, ByteString identifier) {
this.identifier = identifier;
}
- NodeId(@NotNull UShort namespaceIndex, @NotNull Object identifier) {
+ NodeId(@NonNull UShort namespaceIndex, @NonNull Object identifier) {
checkNotNull(namespaceIndex);
checkNotNull(identifier);
@@ -421,7 +421,7 @@ public String toParseableString() {
return sb.toString();
}
- public static NodeId parse(@NotNull String s) throws UaRuntimeException {
+ public static NodeId parse(@NonNull String s) throws UaRuntimeException {
if (s.startsWith("ns=")) {
int index = s.indexOf(";");
@@ -476,7 +476,7 @@ private static NodeId parse(String s, int namespaceIndex) throws UaRuntimeExcept
}
@Nullable
- public static NodeId parseOrNull(@NotNull String s) {
+ public static NodeId parseOrNull(@NonNull String s) {
try {
return NodeId.parse(s);
} catch (UaRuntimeException t) {
@@ -484,7 +484,7 @@ public static NodeId parseOrNull(@NotNull String s) {
}
}
- public static Optional parseSafe(@NotNull String s) {
+ public static Optional parseSafe(@NonNull String s) {
return Optional.ofNullable(parseOrNull(s));
}
}
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/QualifiedName.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/QualifiedName.java
index 282f3641b..d769bcf53 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/QualifiedName.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/QualifiedName.java
@@ -17,8 +17,8 @@
import java.util.Objects;
import org.eclipse.milo.opcua.stack.core.NamespaceTable;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
/** This Built-in DataType contains a qualified name. It is, for example, used as BrowseName. */
public final class QualifiedName {
@@ -46,7 +46,7 @@ public QualifiedName(int namespaceIndex, @Nullable String name) {
* the index of that namespace in the local Server’s NamespaceArray.
* @param name the text portion of the QualifiedName.
*/
- public QualifiedName(@NotNull UShort namespaceIndex, @Nullable String name) {
+ public QualifiedName(@NonNull UShort namespaceIndex, @Nullable String name) {
Preconditions.checkNotNull(namespaceIndex);
Preconditions.checkArgument(name == null || name.length() <= 512, "name");
@@ -108,7 +108,7 @@ public QualifiedName withName(@Nullable String name) {
* @param namespaceIndex thew new namespace index.
* @return a new {@link QualifiedName} with {@code namespaceIndex}.
*/
- public QualifiedName withNamespaceIndex(@NotNull UShort namespaceIndex) {
+ public QualifiedName withNamespaceIndex(@NonNull UShort namespaceIndex) {
return new QualifiedName(namespaceIndex, name);
}
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/Variant.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/Variant.java
index 91e16ca35..a56d194f4 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/Variant.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/Variant.java
@@ -27,7 +27,7 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
import org.eclipse.milo.opcua.stack.core.util.ArrayUtil;
import org.eclipse.milo.opcua.stack.core.util.TypeUtil;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public final class Variant {
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/UByte.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/UByte.java
index e09a41bf6..d50c1c1cf 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/UByte.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/UByte.java
@@ -12,7 +12,7 @@
import java.io.ObjectStreamException;
import java.math.BigInteger;
-import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
/**
* The unsigned byte
type
@@ -257,7 +257,7 @@ public String toString() {
}
@Override
- public int compareTo(@NotNull UByte o) {
+ public int compareTo(@NonNull UByte o) {
return Short.compare(value, o.value);
}
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/UInteger.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/UInteger.java
index f35a8ae45..b227aeb6c 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/UInteger.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/UInteger.java
@@ -11,7 +11,7 @@
package org.eclipse.milo.opcua.stack.core.types.builtin.unsigned;
import java.io.ObjectStreamException;
-import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
/**
* The unsigned int
type
@@ -268,7 +268,7 @@ public String toString() {
}
@Override
- public int compareTo(@NotNull UInteger o) {
+ public int compareTo(@NonNull UInteger o) {
return Long.compare(value, o.value);
}
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/ULong.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/ULong.java
index 9a9b43721..a70ae27a1 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/ULong.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/ULong.java
@@ -11,7 +11,7 @@
package org.eclipse.milo.opcua.stack.core.types.builtin.unsigned;
import java.math.BigInteger;
-import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
/**
* The unsigned long
type
@@ -199,7 +199,7 @@ public String toString() {
}
@Override
- public int compareTo(@NotNull ULong o) {
+ public int compareTo(@NonNull ULong o) {
return compare(value, o.value);
}
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/UShort.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/UShort.java
index 221029d1b..fbdb4662d 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/UShort.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/UShort.java
@@ -10,7 +10,7 @@
package org.eclipse.milo.opcua.stack.core.types.builtin.unsigned;
-import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
/**
* The unsigned short
type
@@ -160,7 +160,7 @@ public String toString() {
}
@Override
- public int compareTo(@NotNull UShort o) {
+ public int compareTo(@NonNull UShort o) {
return Integer.compare(value, o.value);
}
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/enumerated/ApplicationType.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/enumerated/ApplicationType.java
index d496e0f56..01b6b95b0 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/enumerated/ApplicationType.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/types/enumerated/ApplicationType.java
@@ -15,7 +15,7 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText;
import org.eclipse.milo.opcua.stack.core.types.structured.EnumDefinition;
import org.eclipse.milo.opcua.stack.core.types.structured.EnumField;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
/**
* @see {
diff --git a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/util/TypeUtil.java b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/util/TypeUtil.java
index bb8a2daa1..5d4ebf4b8 100644
--- a/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/util/TypeUtil.java
+++ b/opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/util/TypeUtil.java
@@ -29,7 +29,7 @@
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public class TypeUtil {
diff --git a/opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/security/KeyStoreCertificateStoreTest.java b/opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/security/KeyStoreCertificateStoreTest.java
index 78a96c75b..70cff30f0 100644
--- a/opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/security/KeyStoreCertificateStoreTest.java
+++ b/opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/security/KeyStoreCertificateStoreTest.java
@@ -14,7 +14,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.AfterEach;
class KeyStoreCertificateStoreTest extends CertificateStoreTest {
diff --git a/opc-ua-stack/transport-https/pom.xml b/opc-ua-stack/transport-https/pom.xml
index 60bcc142a..13f4bc2af 100644
--- a/opc-ua-stack/transport-https/pom.xml
+++ b/opc-ua-stack/transport-https/pom.xml
@@ -42,13 +42,6 @@
netty-codec-http
${netty.version}
-
- org.jetbrains
- annotations
- ${jetbrains-annotations.version}
- provided
-
-
org.junit.jupiter
junit-jupiter-api
diff --git a/opc-ua-stack/transport-websocket/pom.xml b/opc-ua-stack/transport-websocket/pom.xml
index cbf7979b2..45cba8e63 100644
--- a/opc-ua-stack/transport-websocket/pom.xml
+++ b/opc-ua-stack/transport-websocket/pom.xml
@@ -42,12 +42,6 @@
netty-codec-http
${netty.version}
-
- org.jetbrains
- annotations
- ${jetbrains-annotations.version}
- provided
-
org.junit.jupiter
diff --git a/opc-ua-stack/transport/pom.xml b/opc-ua-stack/transport/pom.xml
index d0a28111e..000a382e7 100644
--- a/opc-ua-stack/transport/pom.xml
+++ b/opc-ua-stack/transport/pom.xml
@@ -37,13 +37,6 @@
netty-channel-fsm
${netty-channel-fsm.version}
-
- org.jetbrains
- annotations
- ${jetbrains-annotations.version}
- provided
-
-
org.junit.jupiter
junit-jupiter-api
diff --git a/opc-ua-stack/transport/src/main/java/org/eclipse/milo/opcua/stack/transport/client/uasc/UascResponse.java b/opc-ua-stack/transport/src/main/java/org/eclipse/milo/opcua/stack/transport/client/uasc/UascResponse.java
index f32db50aa..2a8fbd409 100644
--- a/opc-ua-stack/transport/src/main/java/org/eclipse/milo/opcua/stack/transport/client/uasc/UascResponse.java
+++ b/opc-ua-stack/transport/src/main/java/org/eclipse/milo/opcua/stack/transport/client/uasc/UascResponse.java
@@ -12,7 +12,7 @@
import org.eclipse.milo.opcua.stack.core.UaException;
import org.eclipse.milo.opcua.stack.core.types.UaResponseMessageType;
-import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.Nullable;
public final class UascResponse {
diff --git a/pom.xml b/pom.xml
index 1589fea65..084878e05 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,10 +63,10 @@
2.0.1
4.0.1
4.0.4
- 24.1.0
4.1.115.Final
1.0.0
2.0.12
+ 1.0.0
10.21.0
@@ -351,5 +351,5 @@
https://oss.sonatype.org/service/local/staging/deploy/maven2/
-
+