From 1dda0daa470e8eea6fa5ddfbb474b027bd87e76d Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Thu, 30 Aug 2007 01:51:26 +0200 Subject: [PATCH] auth: simplify result checking in checkCredentials --- src/authentication/Authenticator.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/authentication/Authenticator.java b/src/authentication/Authenticator.java index 02b0c74..b48b431 100644 --- a/src/authentication/Authenticator.java +++ b/src/authentication/Authenticator.java @@ -25,16 +25,13 @@ public class Authenticator extends AbstractAuthenticator { "and up.project_id=p.id"; SQLHelper sql = null; - ResultSet rs = null; Exception ex = null; boolean result = false; try { sql = new SQLHelper(); sql.openDB(); - rs = sql.retrieve(checkSQL); - if (rs.next()) - result = true; + result = sql.retrieve(checkSQL).next(); } catch (Exception e) { ex = e; -- 2.11.4.GIT