ASF Bugzilla – Attachment 13528 Details for
Bug 32368
Datagrid: NullPointerException when sorting null values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
ValueComparator.java patch for handling null values
patch.txt (text/plain), 714 bytes, created by
Adam Moore
on 2004-11-24 00:06:40 UTC
(
hide
)
Description:
ValueComparator.java patch for handling null values
Filename:
MIME Type:
Creator:
Adam Moore
Created:
2004-11-24 00:06:40 UTC
Size:
714 bytes
patch
obsolete
>--- ValueComparator.java.orig Tue Nov 23 04:11:56 2004 >+++ ValueComparator.java Tue Nov 23 14:54:31 2004 >@@ -47,9 +47,9 @@ > cell1 = ((Cell []) values1) [index]; > cell2 = ((Cell []) values2) [index]; > >- if (cell1 == null) >+ if (cell1 == null || cell1.getValue () == null) > result = -1; >- else if (cell2 == null) >+ else if (cell2 == null || cell2.getValue () == null) > result = 1; > else if ((cell1.getValue () instanceof Comparable) && (cell2.getValue () instanceof Comparable)) > result = ((Comparable) cell1.getValue ()).compareTo (cell2.getValue ()); >@@ -60,4 +60,4 @@ > > return (result); > } >-} >\ No newline at end of file >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 32368
:
13528
|
13558