matthiasblaesing commented on code in PR #8038:
URL: https://github.com/apache/netbeans/pull/8038#discussion_r2160129298


##########
platform/o.n.bootstrap/src/org/netbeans/CLIHandler.java:
##########
@@ -741,7 +753,7 @@ public void run() {
                         } else {
                             os.write(key);
                         }
-                        assert VERSION.length == key.length;
+                        assert VERSION.length <= key.length;

Review Comment:
   What shall this assert do? It looks bogus to me.



##########
platform/o.n.bootstrap/src/org/netbeans/CLIHandler.java:
##########
@@ -579,7 +579,19 @@ static Status initialize(
                 enterState(10, block);
                 
                 final byte[] arr = new byte[KEY_LENGTH];
-                new SecureRandom().nextBytes(arr);
+                SecureRandom secureRandom = new SecureRandom();
+                boolean isPrefix;
+                // making sure arr doesn't have VERSION as prefix, rare 
occurance

Review Comment:
   Why is that bad? It is as random as any other value isn't it? You don't 
filter other special values like "all zeros", "all 0xFF".



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to