Browse Source

bug class fixed involving rs usage

master
MagicBot 2 years ago
parent
commit
bcc1ac115d
  1. 3
      src/engine/db/handlers/dbBuildingHandler.java
  2. 1
      src/engine/db/handlers/dbGuildHandler.java
  3. 1
      src/engine/db/handlers/dbItemHandler.java
  4. 3
      src/engine/db/handlers/dbMobHandler.java
  5. 3
      src/engine/db/handlers/dbNPCHandler.java
  6. 4
      src/engine/db/handlers/dbPlayerCharacterHandler.java

3
src/engine/db/handlers/dbBuildingHandler.java

@ -165,8 +165,9 @@ public class dbBuildingHandler extends dbHandlerBase {
preparedStatement.setString(3, String.valueOf(new_value)); preparedStatement.setString(3, String.valueOf(new_value));
ResultSet rs = preparedStatement.executeQuery(); ResultSet rs = preparedStatement.executeQuery();
result = rs.getString("result");
if (rs.next())
result = rs.getString("result");
} catch (SQLException e) { } catch (SQLException e) {
Logger.error(e); Logger.error(e);

1
src/engine/db/handlers/dbGuildHandler.java

@ -439,6 +439,7 @@ public class dbGuildHandler extends dbHandlerBase {
if (objectUUID > 0) if (objectUUID > 0)
guild = GET_GUILD(objectUUID); guild = GET_GUILD(objectUUID);
} }
} catch (SQLException e) { } catch (SQLException e) {
Logger.error(e); Logger.error(e);
} }

1
src/engine/db/handlers/dbItemHandler.java

@ -101,6 +101,7 @@ public class dbItemHandler extends dbHandlerBase {
if (objectUUID > 0) if (objectUUID > 0)
return GET_ITEM(objectUUID); return GET_ITEM(objectUUID);
} }
} catch (SQLException e) { } catch (SQLException e) {
Logger.error(e); Logger.error(e);
} }

3
src/engine/db/handlers/dbMobHandler.java

@ -63,6 +63,7 @@ public class dbMobHandler extends dbHandlerBase {
if (objectUUID > 0) if (objectUUID > 0)
mobile = GET_MOB(objectUUID); mobile = GET_MOB(objectUUID);
} }
} catch (SQLException e) { } catch (SQLException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
@ -238,6 +239,8 @@ public class dbMobHandler extends dbHandlerBase {
preparedStatement.setString(3, String.valueOf(new_value)); preparedStatement.setString(3, String.valueOf(new_value));
ResultSet rs = preparedStatement.executeQuery(); ResultSet rs = preparedStatement.executeQuery();
if (rs.next())
result = rs.getString("result"); result = rs.getString("result");
} catch (SQLException e) { } catch (SQLException e) {

3
src/engine/db/handlers/dbNPCHandler.java

@ -62,6 +62,7 @@ public class dbNPCHandler extends dbHandlerBase {
if (objectUUID > 0) if (objectUUID > 0)
npc = GET_NPC(objectUUID); npc = GET_NPC(objectUUID);
} }
} catch (SQLException e) { } catch (SQLException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
@ -160,6 +161,8 @@ public class dbNPCHandler extends dbHandlerBase {
preparedStatement.setString(3, String.valueOf(new_value)); preparedStatement.setString(3, String.valueOf(new_value));
ResultSet rs = preparedStatement.executeQuery(); ResultSet rs = preparedStatement.executeQuery();
if (rs.next())
result = rs.getString("result"); result = rs.getString("result");
} catch (SQLException e) { } catch (SQLException e) {

4
src/engine/db/handlers/dbPlayerCharacterHandler.java

@ -62,12 +62,12 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
ResultSet rs = preparedStatement.executeQuery(); ResultSet rs = preparedStatement.executeQuery();
if (rs.next()) { if (rs.next()) {
int objectUUID = (int) rs.getLong("UID"); int objectUUID = (int) rs.getLong("UID");
if (objectUUID > 0) if (objectUUID > 0)
playerCharacter = GET_PLAYER_CHARACTER(objectUUID); playerCharacter = GET_PLAYER_CHARACTER(objectUUID);
} }
} catch (SQLException e) { } catch (SQLException e) {
Logger.error(e); Logger.error(e);
} }
@ -362,6 +362,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
preparedStatement.setString(3, String.valueOf(new_value)); preparedStatement.setString(3, String.valueOf(new_value));
ResultSet rs = preparedStatement.executeQuery(); ResultSet rs = preparedStatement.executeQuery();
if (rs.next())
result = rs.getString("result"); result = rs.getString("result");
} catch (SQLException e) { } catch (SQLException e) {

Loading…
Cancel
Save