Bug 68667 NPE in AddressBook example
RC4 - run the AddressBook example - File -> Open Address Book... --> opens a FileDialog - change the file filter in the dialog to * to show all files (assuming you're on a platform whose FileDialog shows this filter) - select some random file that has nothing to do with the AddressBook example, Open - will get the following NPE: java.lang.NullPointerException at org.eclipse.swt.examples.addressbook.AddressBook$RowComparator.compare(AddressBook.java:870) at java.util.Arrays.mergeSort(Arrays.java:1278) at java.util.Arrays.mergeSort(Arrays.java:1289) at java.util.Arrays.mergeSort(Arrays.java:1289) at java.util.Arrays.mergeSort(Arrays.java:1289) at java.util.Arrays.mergeSort(Arrays.java:1289) at java.util.Arrays.mergeSort(Arrays.java:1289) at java.util.Arrays.sort(Arrays.java:1219) at org.eclipse.swt.examples.addressbook.AddressBook.openAddressBook(AddressBook.java:326) at org.eclipse.swt.examples.addressbook.AddressBook.access$9(AddressBook.java:268) at org.eclipse.swt.examples.addressbook.AddressBook$9.widgetSelected(AddressBook.java:509) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:731) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2938) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2642) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:183) at org.eclipse.core.launcher.Main.run(Main.java:644) at org.eclipse.core.launcher.Main.main(Main.java:628)
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/AddressBook.java
}
		}
	}
	shell.setText(resAddressBook.getString("Title_bar")+file.getName());
	isModified = false;
	return true;
}
private boolean saveAs() {
		
	FileDialog saveDialog = new FileDialog(shell, SWT.SAVE);
	saveDialog.setFilterExtensions(new String[] {"*.adr;",  "*.*"});
	saveDialog.setFilterNames(new String[] {"Address Books (*.adr)", "All Files "});
	
	saveDialog.open();
	String name = saveDialog.getFileName();
		
	if(name.equals("")) return false;
	if(name.indexOf(".adr") != name.length() - 4) {
		name += ".adr";
	}
	File file = new File(saveDialog.getFilterPath(), name);
	if(file.exists()) {
		MessageBox box = new MessageBox(shell, SWT.ICON_WARNING | SWT.YES | SWT.NO);
		box.setText(resAddressBook.getString("Save_as_title"));
		box.setMessage(resAddressBook.getString("File") + file.getName()+" "+resAddressBook.getString("Query_overwrite"));
		if(box.open() != SWT.YES) {
			return false;
		}
	}
	this.file = file;