Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 355467
Collapse All | Expand All

(-)UI/org/eclipse/rse/internal/ui/view/SystemTableViewSorter.java (-1 / +16 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2002, 2010 IBM Corporation and others.
2
 * Copyright (c) 2002, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-18 Link Here
13
 * 
13
 * 
14
 * Contributors:
14
 * Contributors:
15
 * David McKnight   (IBM)        - [331986] Sort in Remote System Details view shows wrong results
15
 * David McKnight   (IBM)        - [331986] Sort in Remote System Details view shows wrong results
16
 * David McKnight   (IBM)        - [355467] The result of sorting resources that contains null blank cells is not correct in Remote System Details view.
16
 *******************************************************************************/
17
 *******************************************************************************/
17
18
18
package org.eclipse.rse.internal.ui.view;
19
package org.eclipse.rse.internal.ui.view;
Lines 82-87 Link Here
82
		Object name1 = getValueFor(e1, _columnNumber);
83
		Object name1 = getValueFor(e1, _columnNumber);
83
		Object name2 = getValueFor(e2, _columnNumber);
84
		Object name2 = getValueFor(e2, _columnNumber);
84
85
86
		// deal with equal objects
87
		if (name1 == name2){
88
			return 0;
89
		}
90
		
85
		try
91
		try
86
		{
92
		{
87
			Object n1 = name1;
93
			Object n1 = name1;
Lines 93-98 Link Here
93
				n2 = name1;
99
				n2 = name1;
94
			}
100
			}
95
101
102
			// deal with nulls
103
			if (n1 == null){
104
				return -1;
105
			}
106
			else  if (n2 == null){
107
				return 1;
108
			}
109
			
110
			
96
			if (n1 instanceof String)
111
			if (n1 instanceof String)
97
			{
112
			{
98
				return ((String) n1).compareTo((String) n2);
113
				return ((String) n1).compareTo((String) n2);

Return to bug 355467