From 7a9ffebaab5392ddc2975fded87d9a7f468a5d2a Mon Sep 17 00:00:00 2001 From: Henschi Date: Thu, 3 Apr 2025 20:13:10 +0200 Subject: [PATCH] fix cast brackets to suppress low memory warning --- source/net/yacy/document/parser/GenericXMLParser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/net/yacy/document/parser/GenericXMLParser.java b/source/net/yacy/document/parser/GenericXMLParser.java index b6205e2b0..0cd0e5380 100644 --- a/source/net/yacy/document/parser/GenericXMLParser.java +++ b/source/net/yacy/document/parser/GenericXMLParser.java @@ -105,7 +105,7 @@ public class GenericXMLParser extends AbstractParser implements Parser { if((maxBytes / Character.BYTES) > Integer.MAX_VALUE) { maxChars = Integer.MAX_VALUE; } else { - maxChars = ((int)maxBytes) / Character.BYTES; + maxChars = (int)(maxBytes / Character.BYTES); } try (/* Automatically closed by this try-with-resources statement*/ CharBuffer writer = new CharBuffer(maxChars);){ @@ -165,7 +165,7 @@ public class GenericXMLParser extends AbstractParser implements Parser { if((maxTextBytes / Character.BYTES) > Integer.MAX_VALUE) { maxChars = Integer.MAX_VALUE; } else { - maxChars = ((int)maxTextBytes) / Character.BYTES; + maxChars = (int)(maxTextBytes / Character.BYTES); } try (/* Automatically closed by this try-with-resources statement*/ CharBuffer writer = new CharBuffer(maxChars);){