Bug 46042 [rulers] NPE in preference store, called from JavaAnnotationHover.getJavaAnnotationsForLine
build N20031031 Saw the following in the log. !ENTRY org.eclipse.ui 4 4 Nov 04, 2003 11:17:39.649 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Nov 04, 2003 11:17:39.649 !MESSAGE java.lang.NullPointerException !STACK 0 java.lang.NullPointerException at java.util.Hashtable.get(Hashtable.java:333) at java.util.Properties.getProperty(Properties.java:563) at org.eclipse.core.runtime.Preferences.getBoolean(Preferences.java:594) at org.eclipse.ui.plugin.AbstractUIPlugin$CompatibilityPreferenceStore.getBoolean (AbstractUIPlugin.java:268) at org.eclipse.jdt.internal.ui.text.JavaAnnotationHover.getJavaAnnotationsForLine (JavaAnnotationHover.java:123) at org.eclipse.jdt.internal.ui.text.JavaAnnotationHover.getHoverInfo (JavaAnnotationHover.java:214) at org.eclipse.jface.text.source.AnnotationBarHoverManager.computeInformation (AnnotationBarHoverManager.java:100) at org.eclipse.jface.text.AbstractInformationControlManager.doShowInformation (AbstractInformationControlManager.java:661) at org.eclipse.jface.text.AbstractHoverInformationControlManager$MouseTracker.mouse Hover(AbstractHoverInformationControlManager.java:298) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:211) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:847) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2187) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1877) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1611) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1594) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) 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:299) at org.eclipse.core.launcher.Main.run(Main.java:767) at org.eclipse.core.launcher.Main.main(Main.java:601)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaAnnotationHover.java
messagesAtPosition.put(position, messages);
			}
		} else
			messagesAtPosition.put(position, message);
		return false;
	}
		
	/*
	 * @see IVerticalRulerHover#getHoverInfo(ISourceViewer, int)
	 */
	public String getHoverInfo(ISourceViewer sourceViewer, int lineNumber) {
		List javaAnnotations= getJavaAnnotationsForLine(sourceViewer, lineNumber);
		if (javaAnnotations != null) {
			
			if (javaAnnotations.size() == 1) {
				
				
				IAnnotationExtension annotation= (IAnnotationExtension) javaAnnotations.get(0);
				String message= annotation.getMessage();
				if (message != null && message.trim().length() > 0)
					return formatSingleMessage(message);
					
			} else {
					
				List messages= new ArrayList();
				
				Iterator e= javaAnnotations.iterator();
				while (e.hasNext()) {
					IAnnotationExtension annotation= (IAnnotationExtension) e.next();
					String message= annotation.getMessage();