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: | sort doesn't work properly | ||
---|---|---|---|
Product: | db | Reporter: | medeag |
Component: | Code | Assignee: | Jaroslav Havlin <jhavlin> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | NETFIX |
Priority: | P3 | ||
Version: | 7.3 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
screenshot
proposed patch v1 |
Please provide some more information: - What is your DBMS? - Which version is you DBMS? - What JDBC driver are you using? - What version of the JDBC driver are you using. Oracle Database XE 11.2 ojdbc6 Created attachment 125307 [details]
proposed patch v1
Ok - problem is the ResultSetTableModel, this implements getColumnClass in parts as follows:
case Types.BIGINT:
case Types.DOUBLE:
case Types.FLOAT:
case Types.REAL:
case Types.DECIMAL:
case Types.NUMERIC:
case Types.INTEGER:
case Types.SMALLINT:
case Types.TINYINT:
return Number.class;
Number is not comparable, so it falls through to a string comparison of <Object>.toString()
The attached patch fixes this.
Applied as http://hg.netbeans.org/core-main/rev/7e9a986c879f Great job! Thank you. Integrated into 'main-golden', will be available in build *201210070002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/7e9a986c879f User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #219429: Sort doesn't work properly |
Created attachment 125280 [details] screenshot Tried to sort table by column which is NUMBER(12), it was sorted like string (see attachment) Product Version: NetBeans IDE 7.3 Beta (Build 201209272333) Updates: Updates available Java: 1.7.0_05; Java HotSpot(TM) 64-Bit Server VM 23.1-b03 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)