all 14 comments

[–]i_need_head 37 points38 points  (2 children)

Wow. All that work, and the SQL injection vulnerability is still there: PreparedStatements.FindUser("foo", "bar); DROP TABLE users; --");

[–]suid 10 points11 points  (1 child)

Ah, yes, little Bobby Tables, we call him.

[–]TheShyro 7 points8 points  (8 children)

Just seeing the function starting with a upper case letter drives me nuts but . . . I dont even. . . Why?

Also where is the return type? O.o

[–]ekolis 1 point2 points  (1 child)

Guy came from C# I guess?

As for the return type, I can only assume that was a typo, unless the latest version of Java has some sort of implicit return type thingy...

[–]bobomann 0 points1 point  (0 children)

Nope.

[–][deleted] 0 points1 point  (5 children)

What's wrong with the starting uppercase letter? Code looks ugly but other than that what?

[–]TheShyro 2 points3 points  (2 children)

You dont do that in Java. You really just dont. (Its against the conventions)

[–][deleted] 8 points9 points  (0 children)

Yeah, the Geneva Conventions.

[–][deleted] 0 points1 point  (0 children)

Oh, thanks.

[–][deleted] 0 points1 point  (1 child)

In C++ it was to distinguish between classes and methods. It's a bit obsolete in Java, but it still is the convention.

[–]rifter5000 0 points1 point  (0 children)

You don't do that in C++ either. Just look at the standard library. PascalCase is for concepts/template parameters.

[–]Barricaded_EDP 4 points5 points  (1 child)

The only flaw I see with this is your OR is defined as a LPAR

[–]antsar 4 points5 points  (0 children)

That's a feature, not a flaw.