Explicitly set scrolling mode where ResultSet is used for scrolling

This commit is contained in:
P0nk
2021-04-02 16:41:44 +02:00
parent 754ab67de7
commit 08a0407417
5 changed files with 14 additions and 11 deletions

View File

@@ -9778,7 +9778,8 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
public void showNote() {
try {
Connection con = DatabaseConnection.getConnection();
try (PreparedStatement ps = con.prepareStatement("SELECT * FROM notes WHERE `to` = ? AND `deleted` = 0", ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE)) {
try (PreparedStatement ps = con.prepareStatement("SELECT * FROM notes WHERE `to` = ? AND `deleted` = 0",
ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE)) {
ps.setString(1, this.getName());
try (ResultSet rs = ps.executeQuery()) {
rs.last();