Questionable use of non-short-circuit logic
This code seems to be using non-short-circuit logic (e.g., & or |) rather than short-circuit logic (&& or ||). Non-short-circuit logic causes both sides of the expression to be evaluated even when the result can be inferred from knowing the left-hand side. This can be less efficient and can result in errors if the left-hand side guards cases when evaluating the right-hand side can generate an error.
The line has been present since at least 2.3.25, probably earlier.
Is this code correct? If so, perhaps a comment noting that the bitwise-and is intentional?
https://github.com/eclipse-ee4j/grizzly/blob/a2ce7775658e11fbccbb9acd32e2daf2b0799f45/modules/grizzly/src/main/java/org/glassfish/grizzly/memory/BuffersBuffer.java#L738
Questionable use of non-short-circuit logic This code seems to be using non-short-circuit logic (e.g., & or |) rather than short-circuit logic (&& or ||). Non-short-circuit logic causes both sides of the expression to be evaluated even when the result can be inferred from knowing the left-hand side. This can be less efficient and can result in errors if the left-hand side guards cases when evaluating the right-hand side can generate an error.
The line has been present since at least 2.3.25, probably earlier.