News for hackers. Stuff that matters.
Re:Google broke a conditional statement that verifies passwo... by grishka on Thursday July 22, 2021 @04:37PM (#27923994)
Certainly won't compile in Java.
Re:Google broke a conditional statement that verifies passwo... by shawnz on Thursday July 22, 2021 @04:51PM (#27924171)
In fact you can apply the single ampersand & operator to booleans in Java, and just like in the example here it has the same behaviour as && but with no short-circuiting.
Re:Google broke a conditional statement that verifies passwo... by grishka on Thursday July 22, 2021 @05:23PM (#27924514)
Huh. I didn't know that.
Re:Google broke a conditional statement that verifies passwo... by taeric on Thursday July 22, 2021 @04:59PM (#27924244)
Oddly... It would? Try:

    Map<String, Boolean> map = ...
    if (map.containsKey("hello") & map.get("hello")) { ...