This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | IllegalArgumentException: Negative pageSize | ||
---|---|---|---|
Product: | db | Reporter: | miibx5 |
Component: | Show Data | Assignee: | Libor Fischmeistr <lfischmeistr> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | Keywords: | PATCH_AVAILABLE |
Priority: | P3 | ||
Version: | 8.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 211218 |
Attachments: | stacktrace |
Description
miibx5
2014-08-13 13:56:05 UTC
Created attachment 148685 [details]
stacktrace
Could it be, that you specified 0 as page size? Looks like that is the non checked corner-case. Ok - no reply - so just in case my prediction is correct: # This patch file was generated by NetBeans IDE # It uses platform neutral UTF-8 encoding and \n newlines. --- Base (BASE) +++ Locally Modified (Based On LOCAL) @@ -255,9 +255,9 @@ int totalCount = pageContext.getTotalRows(); try { int count = Integer.parseInt(refreshField.getText().trim()); - return count < 0 ? pageSize : count; + return count > 0 ? count : pageSize; } catch (NumberFormatException ex) { - return totalCount < pageSize ? totalCount : pageSize; + return (totalCount < pageSize && totalCount > 0) ? totalCount : pageSize; } } This was superseeded when #156492 was merged to allows 0 to mean infinite |