News for hackers. Stuff that matters.
Re:The Reason Java Is Still Popular by jerven on Thursday September 22, 2022 @02:44PM (#32942972)
I think you are talking about this example:

ResultSet rs = DB."SELECT * FROM Person p WHERE p.last_name = \{name}";

This when it becomes valid java will not allow an SQL injection attack. The name part would be properly passed as a parameter. Not a string concatenation. Per https://openjdk.org/jeps/430

If that was not the example you where thinking about, sorry :)

Otherwise yes don't build parameterized SQL out of strings !

Re:The Reason Java Is Still Popular by jhhh on Thursday September 22, 2022 @08:11PM (#32946306)
My main complaint about this new feature is that it has such poor conceptual clarity that people already familiar with Java will almost always misinterpret what is happening in exactly the same way. I've seen people post similar comments to the one you're correcting on reddit as well.
Re:The Reason Java Is Still Popular by drdec on Thursday September 22, 2022 @05:58PM (#32945165)
Thanks for the correction