View | Details | Raw Unified | Return to bug 198085 | Differences between
and this patch

Collapse All | Expand All

(-)dom/org/eclipse/jdt/core/dom/TypeBinding.java (-5 / +8 lines)
Lines 12-17 Link Here
12
package org.eclipse.jdt.core.dom;
12
package org.eclipse.jdt.core.dom;
13
13
14
import java.io.File;
14
import java.io.File;
15
import java.util.ArrayList;
16
import java.util.List;
15
17
16
import org.eclipse.core.resources.IContainer;
18
import org.eclipse.core.resources.IContainer;
17
import org.eclipse.core.resources.IWorkspaceRoot;
19
import org.eclipse.core.resources.IWorkspaceRoot;
Lines 102-116 Link Here
102
			org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] internalAnnotations = refType.getAnnotations();
104
			org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] internalAnnotations = refType.getAnnotations();
103
			int length = internalAnnotations == null ? 0 : internalAnnotations.length;
105
			int length = internalAnnotations == null ? 0 : internalAnnotations.length;
104
			if (length != 0) {
106
			if (length != 0) {
105
				IAnnotationBinding[] domInstances = new IAnnotationBinding[length];
107
				List domInstances = new ArrayList();
106
				for (int i = 0; i < length; i++) {
108
				for (int i = 0; i < length; i++) {
107
					final IAnnotationBinding annotationInstance = this.resolver.getAnnotationInstance(internalAnnotations[i]);
109
					final IAnnotationBinding annotationInstance = this.resolver.getAnnotationInstance(internalAnnotations[i]);
108
					if (annotationInstance == null) {
110
					if (annotationInstance != null) {
109
						return AnnotationBinding.NoAnnotations;
111
						domInstances.add(annotationInstance);
110
					}
112
					}
111
					domInstances[i] = annotationInstance;
112
				}
113
				}
113
				return this.annotations = domInstances;
114
				this.annotations = new IAnnotationBinding[domInstances.size()];
115
				domInstances.toArray(this.annotations);
116
				return this.annotations;
114
			}
117
			}
115
		}
118
		}
116
		return this.annotations = AnnotationBinding.NoAnnotations;
119
		return this.annotations = AnnotationBinding.NoAnnotations;

Return to bug 198085