View | Details | Raw Unified | Return to bug 120559
Collapse All | Expand All

(-)model/org/eclipse/jdt/internal/core/BinaryField.java (-1 / +1 lines)
Lines 109-115 Link Here
109
}
109
}
110
public String getAttachedJavadoc(IProgressMonitor monitor, String defaultEncoding) throws JavaModelException {
110
public String getAttachedJavadoc(IProgressMonitor monitor, String defaultEncoding) throws JavaModelException {
111
	String contents = ((BinaryType) this.getDeclaringType()).getJavadocContents(monitor, defaultEncoding);
111
	String contents = ((BinaryType) this.getDeclaringType()).getJavadocContents(monitor, defaultEncoding);
112
	if (contents == null) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.CANNOT_RETRIEVE_ATTACHED_JAVADOC, this));
112
	if (contents == null) return null;
113
	int indexAnchor = contents.indexOf(
113
	int indexAnchor = contents.indexOf(
114
			JavadocConstants.ANCHOR_PREFIX_START + this.getElementName() + JavadocConstants.ANCHOR_PREFIX_END);
114
			JavadocConstants.ANCHOR_PREFIX_START + this.getElementName() + JavadocConstants.ANCHOR_PREFIX_END);
115
	if (indexAnchor == -1) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.UNKNOWN_JAVADOC_FORMAT, this));
115
	if (indexAnchor == -1) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.UNKNOWN_JAVADOC_FORMAT, this));
(-)model/org/eclipse/jdt/internal/core/BinaryMethod.java (-1 / +1 lines)
Lines 462-468 Link Here
462
	return extractJavadoc(declaringType, contents);
462
	return extractJavadoc(declaringType, contents);
463
}
463
}
464
private String extractJavadoc(IType declaringType, String contents) throws JavaModelException {
464
private String extractJavadoc(IType declaringType, String contents) throws JavaModelException {
465
	if (contents == null) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.CANNOT_RETRIEVE_ATTACHED_JAVADOC, this));
465
	if (contents == null) return null;
466
466
467
	String typeQualifiedName = declaringType.getTypeQualifiedName('.');
467
	String typeQualifiedName = declaringType.getTypeQualifiedName('.');
468
	typeQualifiedName = typeQualifiedName.replace('$', '.');
468
	typeQualifiedName = typeQualifiedName.replace('$', '.');
(-)model/org/eclipse/jdt/internal/core/BinaryType.java (-1 / +1 lines)
Lines 988-994 Link Here
988
}
988
}
989
public String getAttachedJavadoc(IProgressMonitor monitor, String defaultEncoding) throws JavaModelException {
989
public String getAttachedJavadoc(IProgressMonitor monitor, String defaultEncoding) throws JavaModelException {
990
	final String contents = getJavadocContents(monitor, defaultEncoding);
990
	final String contents = getJavadocContents(monitor, defaultEncoding);
991
	if (contents == null) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.CANNOT_RETRIEVE_ATTACHED_JAVADOC, this));
991
	if (contents == null) return null;
992
	final int indexOfStartOfClassData = contents.indexOf(JavadocConstants.START_OF_CLASS_DATA);
992
	final int indexOfStartOfClassData = contents.indexOf(JavadocConstants.START_OF_CLASS_DATA);
993
	if (indexOfStartOfClassData == -1) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.UNKNOWN_JAVADOC_FORMAT, this));
993
	if (indexOfStartOfClassData == -1) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.UNKNOWN_JAVADOC_FORMAT, this));
994
	int indexOfNextSummary = contents.indexOf(JavadocConstants.NESTED_CLASS_SUMMARY);
994
	int indexOfNextSummary = contents.indexOf(JavadocConstants.NESTED_CLASS_SUMMARY);
(-)model/org/eclipse/jdt/internal/core/JavaElement.java (-3 / +6 lines)
Lines 11-16 Link Here
11
package org.eclipse.jdt.internal.core;
11
package org.eclipse.jdt.internal.core;
12
12
13
import java.io.BufferedInputStream;
13
import java.io.BufferedInputStream;
14
import java.io.FileNotFoundException;
14
import java.io.IOException;
15
import java.io.IOException;
15
import java.io.InputStream;
16
import java.io.InputStream;
16
import java.net.MalformedURLException;
17
import java.net.MalformedURLException;
Lines 722-730 Link Here
722
				return String.valueOf(contents);
723
				return String.valueOf(contents);
723
			}
724
			}
724
 		} catch (MalformedURLException e) {
725
 		} catch (MalformedURLException e) {
725
 			// ignore
726
 			throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.CANNOT_RETRIEVE_ATTACHED_JAVADOC, this));
726
		} catch (IOException e) {
727
		} catch (FileNotFoundException e) {
727
			// ignore
728
			// ignore. see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=120559
729
		} catch(IOException e) {
730
			throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.CANNOT_RETRIEVE_ATTACHED_JAVADOC, this));
728
		} finally {
731
		} finally {
729
			if (stream != null) {
732
			if (stream != null) {
730
				try {
733
				try {

Return to bug 120559