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

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


The following commit(s) were added to refs/heads/develop by this push:
     new 95b11308f0 chore: As the random upper bound is exclusive, switched to 
the first value that's no longer in the range. (#2679)
95b11308f0 is described below

commit 95b11308f047892a631a0f46e0398db585203a00
Author: Christofer Dutz <[email protected]>
AuthorDate: Mon Aug 10 08:10:58 2026 +0200

    chore: As the random upper bound is exclusive, switched to the first value 
that's no longer in the range. (#2679)
---
 .../src/main/java/org/apache/plc4x/java/eip/base/EipTcpConnection.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/plc4j/drivers/eip/src/main/java/org/apache/plc4x/java/eip/base/EipTcpConnection.java
 
b/plc4j/drivers/eip/src/main/java/org/apache/plc4x/java/eip/base/EipTcpConnection.java
index 3cc402e109..3af37c32d3 100644
--- 
a/plc4j/drivers/eip/src/main/java/org/apache/plc4x/java/eip/base/EipTcpConnection.java
+++ 
b/plc4j/drivers/eip/src/main/java/org/apache/plc4x/java/eip/base/EipTcpConnection.java
@@ -91,7 +91,7 @@ public class EipTcpConnection extends 
PollingSubscriptionConnectionBase<EIPConfi
     private final NullAddressItem nullAddressItem = new NullAddressItem();
     private final List<PathSegment> routingAddress = new ArrayList<>();
     private short connectionPathSize = 0;
-    private final int connectionSerialNumber = 
ThreadLocalRandom.current().nextInt(1, 0xFFFF);
+    private final int connectionSerialNumber = 
ThreadLocalRandom.current().nextInt(1, 0x10000);
 
     public EipTcpConnection(EIPConfiguration configuration, 
TransportInstance<?> transportInstance, AuditLog auditLog) {
         this(configuration, transportInstance, auditLog, 
configuration.isBigEndian());

Reply via email to