You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2022/09/02 14:51:30 UTC

[plc4x] 05/05: chore(plc4j/api): Removed the limit of 254 chars from PlcString

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 7832f0b4920d57c278f6d43c395f0d56770de04c
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Fri Sep 2 16:49:37 2022 +0200

    chore(plc4j/api): Removed the limit of 254 chars from PlcString
---
 .../src/main/java/org/apache/plc4x/java/spi/values/PlcSTRING.java   | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcSTRING.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcSTRING.java
index b61f455ae..1d8f43af8 100644
--- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcSTRING.java
+++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/values/PlcSTRING.java
@@ -33,8 +33,6 @@ import java.nio.charset.StandardCharsets;
 @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property = "className")
 public class PlcSTRING extends PlcSimpleValue<String> {
 
-    static int maxLength = 254;
-
     public static PlcSTRING of(Object value) {
         if (value instanceof String) {
             return new PlcSTRING((String) value);
@@ -45,10 +43,6 @@ public class PlcSTRING extends PlcSimpleValue<String> {
     @JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
     public PlcSTRING(@JsonProperty("value") String value) {
         super(value, true);
-        if (value.length() > maxLength) {
-            throw new IllegalArgumentException(
-                String.format("String length %d exceeds allowed maximum for type String (max %d)", value.length(), maxLength));
-        }
     }
 
     @Override