reschke commented on code in PR #2458:
URL: https://github.com/apache/jackrabbit-oak/pull/2458#discussion_r2282618039


##########
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/analysis/modules/BinaryId.java:
##########
@@ -39,8 +39,14 @@ public BinaryId(String identifier) {
         // <hex digits or '-'>#<length>
         // the '-' is ignored
         int hashIndex = identifier.lastIndexOf('#');
-        String length = identifier.substring(hashIndex + 1);
-        this.length = Long.parseLong(length);
+        if (hashIndex >= 0) {
+            String length = identifier.substring(hashIndex + 1);

Review Comment:
   Recommendation: use a different variable name here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to