This is an automated email from the ASF dual-hosted git repository.
shuber pushed a commit to branch opensearch-persistence
in repository https://gitbox.apache.org/repos/asf/unomi.git
The following commit(s) were added to refs/heads/opensearch-persistence by this
push:
new d7da93bd5 Revert IPv6 fix
d7da93bd5 is described below
commit d7da93bd5e6879d5ba57123689789e19912bfe17
Author: Serge Huber <[email protected]>
AuthorDate: Mon Oct 13 20:45:29 2025 +0200
Revert IPv6 fix
---
.../unomi/services/impl/events/EventServiceImpl.java | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git
a/services/src/main/java/org/apache/unomi/services/impl/events/EventServiceImpl.java
b/services/src/main/java/org/apache/unomi/services/impl/events/EventServiceImpl.java
index d57e57ada..f345466c7 100644
---
a/services/src/main/java/org/apache/unomi/services/impl/events/EventServiceImpl.java
+++
b/services/src/main/java/org/apache/unomi/services/impl/events/EventServiceImpl.java
@@ -127,17 +127,10 @@ public class EventServiceImpl implements EventService {
for (Map.Entry<String, ThirdPartyServer> entry :
thirdPartyServers.entrySet()) {
ThirdPartyServer server = entry.getValue();
if (server.getKey().equals(key)) {
- // This is a fix to support proper IPv6 parsing
- if (ip != null) {
- if (ip.startsWith("[") && ip.endsWith("]")) {
- // This can happen with IPv6 addresses, we must
remove the markers since our IPAddress library doesn't support them.
- ip = ip.substring(1, ip.length() - 1);
- }
- IPAddress ipAddress = new
IPAddressString(ip).getAddress();
- for (IPAddress serverIpAddress :
server.getIpAddresses()) {
- if (serverIpAddress.contains(ipAddress)) {
- return server.getId();
- }
+ IPAddress ipAddress = new IPAddressString(ip).getAddress();
+ for (IPAddress serverIpAddress : server.getIpAddresses()) {
+ if (serverIpAddress.contains(ipAddress)) {
+ return server.getId();
}
}
}