Bug 46377 [misc] Save not working for linked resources in Java editor
Trying to open a java file stored in a linked folder, results in error message "Java editor could not initialize" and no editor is opened. Other functions like compiling or comparing work fine with files in a linked folder. In previous build of Eclipse the Java editor used to work fine on files in linked folder. The build I have found this bug in is the M4.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/filebuffers/DocumentAdapter2.java
try {
					String curr= fDocument.getLineDelimiter(i);
					if (curr != null) {
						existingDelimiters.add(curr);
					}
				} catch (BadLocationException e) {
					JavaPlugin.log(e);
				}
			}
			if (existingDelimiters.isEmpty()) {
				return; 
			}
			fLegalLineDelimiters= existingDelimiters;
			
		}
		
		DefaultLineTracker tracker= new DefaultLineTracker();
		tracker.set(contents);
		
		int lines= tracker.getNumberOfLines();
		if (lines <= 1)
			return;
		
		for (int i= 0; i < lines; i++) {
			try {
				String curr= tracker.getLineDelimiter(i);
				if (curr != null && !fLegalLineDelimiters.contains(curr)) {
					StringBuffer buf= new StringBuffer("New line delimiter added to new code: "); 
					for (int k= 0; k < curr.length(); k++) {
						buf.append(String.valueOf((int) curr.charAt(k)));