Bug 85519 [implementation] saveAs existing file fails - content replaced with original content
I20050215-2300 (m5 test pass) - have pkg/Test1.java open - have pkg/Test2.java open - dirty Test1.java - save Test1.java as Test2.java expected: content of Test2 gets replaced with data in Test1 actual: a second editor with Test2.java is opened, Test1.java is closed, the unsaved changes in Test1.java are lost -> lost data.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitDocumentProvider.java
synchronized (getLockObject()) {
					return fReverseMap.get(position);
				}
			}
						
			/*
			 * @see AnnotationModel#addAnnotation(Annotation, Position, boolean)
			 */
			protected void addAnnotation(Annotation annotation, Position position, boolean fireModelChanged) throws BadLocationException {				
				super.addAnnotation(annotation, position, fireModelChanged);
				synchronized (getLockObject()) {
					Object cached= fReverseMap.get(position);
					if (cached == null)
						fReverseMap.put(position, annotation);
					else if (cached instanceof List) {
						List list= (List) cached;
						list.add(annotation);
					} else if (cached instanceof Annotation) {
						List list= new ArrayList(2);
						list.add(cached);
						list.add(annotation);
						fReverseMap.put(position, list);
					}
				}
			}
			
			/*
			 * @see AnnotationModel#removeAllAnnotations(boolean)
			 */
			protected void removeAllAnnotations(boolean fireModelChanged) {