Bug 134190 [JFace] NPE in StatusLine class
In class org.eclipse.jface.action.StatusLine, method SubTask(String name) NPE. StatusLine.subTask(String) line: 552 StatusLineManager$1.subTask(String) line: 205 EventLoopProgressMonitor(ProgressMonitorWrapper).subTask(String) line: 154 EventLoopProgressMonitor.subTask(String) line: 171 SBModelManager.saveModelState(IProject, IProgressMonitor) line: 175 It happens if beginTask method was never called before. I think it is better to check fTaskName.
bundles/org.eclipse.jface/src/org/eclipse/jface/action/StatusLine.java
String text;
		if (fTaskName.length() == 0) {
			text = newName;
		} else {
			text = JFaceResources.format(
					"Set_SubTask", new Object[] { fTaskName, newName });
		}
		setMessage(text);
	}
	/**
	 * Trims the message to be displayable in the status line. This just pulls
	 * out the first line of the message. Allows null.
	 */
	String trim(String message) {
		if (message == null) {
			return null;
		}
		message = Util.replaceAll(message, "&", "&&"); 
		int cr = message.indexOf('\r');
		int lf = message.indexOf('\n');
		if (cr == -1 && lf == -1) {
			return message;
		}
		int len;
		if (cr == -1) {
			len = lf;
		} else if (lf == -1) {
			len = cr;
		} else {
			len = Math.min(cr, lf);