Message-ID: From: "butopcu (@butopcu)" To: "pgjdbc/pgjdbc" Date: Fri, 20 Dec 2024 01:05:08 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #3462: Next Method of PgResultSet Throws NullPointerException Instead of SQLException In-Reply-To: References: List-Id: X-GitHub-Author-Login: butopcu X-GitHub-Comment-Id: 2556048462 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 3462 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3462#issuecomment-2556048462 Content-Type: text/plain; charset=utf-8 @vlsi Hi; I have a quick question for you: Is it a good idea to assign the size of `rows` to a variable and avoid calling `.size()` repeatedly, like this: ```java final int rowsSize = rows.size(); ``` [Commit](https://github.com/butopcu/pgjdbc/commit/67b0994449665aabd5d843f66c62f9a65ea38015) If it doesn't break anything, I suppose the size won't change while we're processing the `ResultSet`. Could this approach help in my case?