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

Collapse All | Expand All

(-)dom/org/eclipse/jdt/core/dom/MethodBinding.java (-8 / +34 lines)
Lines 108-115 Link Here
108
		if (annotations == null || (length = annotations.length) == 0)
108
		if (annotations == null || (length = annotations.length) == 0)
109
			return AnnotationBinding.NoAnnotations;
109
			return AnnotationBinding.NoAnnotations;
110
		IAnnotationBinding[] domInstances = new AnnotationBinding[length];
110
		IAnnotationBinding[] domInstances = new AnnotationBinding[length];
111
		for (int i = 0; i < length; i++)
111
		for (int i = 0; i < length; i++) {
112
			domInstances[i] = this.resolver.getAnnotationInstance(annotations[i]);
112
			IAnnotationBinding annotationInstance = this.resolver.getAnnotationInstance(annotations[i]);
113
			if (annotationInstance == null) {
114
				return AnnotationBinding.NoAnnotations;
115
			}
116
			domInstances[i] = annotationInstance;
117
		}
113
		return domInstances; 
118
		return domInstances; 
114
	}
119
	}
115
120
Lines 129-136 Link Here
129
		if (annotations == null || (length = annotations.length) == 0)
134
		if (annotations == null || (length = annotations.length) == 0)
130
			return AnnotationBinding.NoAnnotations;
135
			return AnnotationBinding.NoAnnotations;
131
		IAnnotationBinding[] domInstances =new AnnotationBinding[length];
136
		IAnnotationBinding[] domInstances =new AnnotationBinding[length];
132
		for (int i = 0; i < length; i++)
137
		for (int i = 0; i < length; i++) {
133
			domInstances[i] = this.resolver.getAnnotationInstance(annotations[i]);
138
			IAnnotationBinding annotationInstance = this.resolver.getAnnotationInstance(annotations[i]);
139
			if (annotationInstance == null) {
140
				return AnnotationBinding.NoAnnotations;
141
			}
142
			domInstances[i] = annotationInstance;
143
		}
134
		return domInstances; 
144
		return domInstances; 
135
	}
145
	}
136
146
Lines 148-154 Link Here
148
		} else {
158
		} else {
149
			this.parameterTypes = new ITypeBinding[length];
159
			this.parameterTypes = new ITypeBinding[length];
150
			for (int i = 0; i < length; i++) {
160
			for (int i = 0; i < length; i++) {
151
				this.parameterTypes[i] = this.resolver.getTypeBinding(parameters[i]);
161
				ITypeBinding typeBinding = this.resolver.getTypeBinding(parameters[i]);
162
				if (typeBinding == null) {
163
					return this.parameterTypes = NO_TYPE_BINDINGS;
164
				}
165
				this.parameterTypes[i] = typeBinding;
152
			}
166
			}
153
		}
167
		}
154
		return this.parameterTypes;
168
		return this.parameterTypes;
Lines 184-190 Link Here
184
		} else {
198
		} else {
185
			this.exceptionTypes = new ITypeBinding[length];
199
			this.exceptionTypes = new ITypeBinding[length];
186
			for (int i = 0; i < length; i++) {
200
			for (int i = 0; i < length; i++) {
187
				this.exceptionTypes[i] = this.resolver.getTypeBinding(exceptions[i]);
201
				ITypeBinding typeBinding = this.resolver.getTypeBinding(exceptions[i]);
202
				if (typeBinding == null) {
203
					return this.exceptionTypes = NO_TYPE_BINDINGS;
204
				}
205
				this.exceptionTypes[i] = typeBinding;
188
			}
206
			}
189
		}
207
		}
190
		return this.exceptionTypes;
208
		return this.exceptionTypes;
Lines 341-347 Link Here
341
			if (typeVariableBindingsLength != 0) {
359
			if (typeVariableBindingsLength != 0) {
342
				this.typeParameters = new ITypeBinding[typeVariableBindingsLength];
360
				this.typeParameters = new ITypeBinding[typeVariableBindingsLength];
343
				for (int i = 0; i < typeVariableBindingsLength; i++) {
361
				for (int i = 0; i < typeVariableBindingsLength; i++) {
344
					typeParameters[i] = this.resolver.getTypeBinding(typeVariableBindings[i]);
362
					ITypeBinding typeBinding = this.resolver.getTypeBinding(typeVariableBindings[i]);
363
					if (typeBinding == null) {
364
						return this.typeParameters = NO_TYPE_BINDINGS;
365
					}
366
					typeParameters[i] = typeBinding;
345
				}
367
				}
346
			} else {
368
			} else {
347
				this.typeParameters = NO_TYPE_BINDINGS;
369
				this.typeParameters = NO_TYPE_BINDINGS;
Lines 381-387 Link Here
381
				if (typeArgumentsLength != 0) {
403
				if (typeArgumentsLength != 0) {
382
					this.typeArguments = new ITypeBinding[typeArgumentsLength];
404
					this.typeArguments = new ITypeBinding[typeArgumentsLength];
383
					for (int i = 0; i < typeArgumentsLength; i++) {
405
					for (int i = 0; i < typeArgumentsLength; i++) {
384
						this.typeArguments[i] = this.resolver.getTypeBinding(typeArgumentsBindings[i]);
406
						ITypeBinding typeBinding = this.resolver.getTypeBinding(typeArgumentsBindings[i]);
407
						if (typeBinding == null) {
408
							return this.typeArguments = NO_TYPE_BINDINGS;
409
						}
410
						this.typeArguments[i] = typeBinding;
385
					}
411
					}
386
				} else {
412
				} else {
387
					this.typeArguments = NO_TYPE_BINDINGS;
413
					this.typeArguments = NO_TYPE_BINDINGS;
(-)dom/org/eclipse/jdt/core/dom/VariableBinding.java (-2 / +7 lines)
Lines 48-55 Link Here
48
		int length = internalAnnotations == null ? 0 : internalAnnotations.length;
48
		int length = internalAnnotations == null ? 0 : internalAnnotations.length;
49
		IAnnotationBinding[] domInstances =
49
		IAnnotationBinding[] domInstances =
50
			length == 0 ? AnnotationBinding.NoAnnotations : new AnnotationBinding[length];
50
			length == 0 ? AnnotationBinding.NoAnnotations : new AnnotationBinding[length];
51
		for (int i = 0; i < length; i++)
51
		for (int i = 0; i < length; i++) {
52
			domInstances[i] = this.resolver.getAnnotationInstance(internalAnnotations[i]);
52
			IAnnotationBinding annotationInstance = this.resolver.getAnnotationInstance(internalAnnotations[i]);
53
			if (annotationInstance == null) {
54
				return AnnotationBinding.NoAnnotations;
55
			}
56
			domInstances[i] = annotationInstance;
57
		}
53
		return domInstances;                                                                  
58
		return domInstances;                                                                  
54
	}
59
	}
55
60
(-)dom/org/eclipse/jdt/core/dom/PackageBinding.java (-2 / +4 lines)
Lines 106-113 Link Here
106
							IAnnotationBinding[] domInstances = new AnnotationBinding[total];
106
							IAnnotationBinding[] domInstances = new AnnotationBinding[total];
107
							for (int a = 0; a < total; a++) {
107
							for (int a = 0; a < total; a++) {
108
								domInstances[a] = this.resolver.getAnnotationInstance(allInstances[a]);
108
								domInstances[a] = this.resolver.getAnnotationInstance(allInstances[a]);
109
								if (domInstances[a] == null) // not resolving binding
109
								if (domInstances[a] == null) { 
110
									return AnnotationBinding.NoAnnotations; 
110
									// not resolving binding
111
									return AnnotationBinding.NoAnnotations;
112
								}
111
							}
113
							}
112
							return domInstances;
114
							return domInstances;
113
						}
115
						}
(-)dom/org/eclipse/jdt/core/dom/TypeBinding.java (-9 / +40 lines)
Lines 84-91 Link Here
84
			int length = internalAnnotations == null ? 0 : internalAnnotations.length;
84
			int length = internalAnnotations == null ? 0 : internalAnnotations.length;
85
			if (length > 0) {
85
			if (length > 0) {
86
				domInstances = new AnnotationBinding[length];
86
				domInstances = new AnnotationBinding[length];
87
				for (int i = 0; i < length; i++)
87
				for (int i = 0; i < length; i++) {
88
					domInstances[i] = this.resolver.getAnnotationInstance(internalAnnotations[i]);
88
					IAnnotationBinding annotationInstance = this.resolver.getAnnotationInstance(internalAnnotations[i]);
89
					if (annotationInstance == null) {
90
						return AnnotationBinding.NoAnnotations;
91
					}
92
					domInstances[i] = annotationInstance;
93
				}
89
			}
94
			}
90
		}
95
		}
91
		return domInstances;
96
		return domInstances;
Lines 241-247 Link Here
241
				int length = members.length;
246
				int length = members.length;
242
				ITypeBinding[] newMembers = new ITypeBinding[length];
247
				ITypeBinding[] newMembers = new ITypeBinding[length];
243
				for (int i = 0; i < length; i++) {
248
				for (int i = 0; i < length; i++) {
244
					newMembers[i] = this.resolver.getTypeBinding(members[i]);
249
					ITypeBinding typeBinding = this.resolver.getTypeBinding(members[i]);
250
					if (typeBinding == null) {
251
						return NO_TYPE_BINDINGS;
252
					}
253
					newMembers[i] = typeBinding;
245
				}
254
				}
246
				return newMembers;
255
				return newMembers;
247
			}
256
			}
Lines 392-398 Link Here
392
		} else {
401
		} else {
393
			ITypeBinding[] newInterfaces = new ITypeBinding[length];
402
			ITypeBinding[] newInterfaces = new ITypeBinding[length];
394
			for (int i = 0; i < length; i++) {
403
			for (int i = 0; i < length; i++) {
395
				newInterfaces[i] = this.resolver.getTypeBinding(interfaces[i]);
404
				ITypeBinding typeBinding = this.resolver.getTypeBinding(interfaces[i]);
405
				if (typeBinding == null) {
406
					return NO_TYPE_BINDINGS;
407
				}
408
				newInterfaces[i] = typeBinding;
396
			}
409
			}
397
			return newInterfaces;
410
			return newInterfaces;
398
		}
411
		}
Lines 470-476 Link Here
470
				IMethod declaringMethod = (IMethod) declaringTypeBinding.getJavaElement();
483
				IMethod declaringMethod = (IMethod) declaringTypeBinding.getJavaElement();
471
				return (JavaElement) declaringMethod.getTypeParameter(typeVariableName);
484
				return (JavaElement) declaringMethod.getTypeParameter(typeVariableName);
472
			} else {
485
			} else {
473
				declaringTypeBinding = this.resolver.getTypeBinding((org.eclipse.jdt.internal.compiler.lookup.TypeBinding) declaringElement);
486
				ITypeBinding typeBinding2 = this.resolver.getTypeBinding((org.eclipse.jdt.internal.compiler.lookup.TypeBinding) declaringElement);
487
				if (typeBinding2 == null) return null;
488
				declaringTypeBinding = typeBinding2;
474
				IType declaringType = (IType) declaringTypeBinding.getJavaElement();
489
				IType declaringType = (IType) declaringTypeBinding.getJavaElement();
475
				return (JavaElement) declaringType.getTypeParameter(typeVariableName);
490
				return (JavaElement) declaringType.getTypeParameter(typeVariableName);
476
			}
491
			}
Lines 827-833 Link Here
827
				int argumentsLength = arguments.length;
842
				int argumentsLength = arguments.length;
828
				ITypeBinding[] typeArguments = new ITypeBinding[argumentsLength];
843
				ITypeBinding[] typeArguments = new ITypeBinding[argumentsLength];
829
				for (int i = 0; i < argumentsLength; i++) {
844
				for (int i = 0; i < argumentsLength; i++) {
830
					typeArguments[i] = this.resolver.getTypeBinding(arguments[i]);
845
					ITypeBinding typeBinding = this.resolver.getTypeBinding(arguments[i]);
846
					if (typeBinding == null) {
847
						return NO_TYPE_BINDINGS;
848
					}
849
					typeArguments[i] = typeBinding;
831
				}
850
				}
832
				return typeArguments;
851
				return typeArguments;
833
			}
852
			}
Lines 863-873 Link Here
863
				ITypeBinding[] typeBounds = new ITypeBinding[boundsLength];
882
				ITypeBinding[] typeBounds = new ITypeBinding[boundsLength];
864
				int boundsIndex = 0;
883
				int boundsIndex = 0;
865
				if (firstClassOrArrayBound != null) {
884
				if (firstClassOrArrayBound != null) {
866
					typeBounds[boundsIndex++] = this.resolver.getTypeBinding(firstClassOrArrayBound);
885
					ITypeBinding typeBinding = this.resolver.getTypeBinding(firstClassOrArrayBound);
886
					if (typeBinding == null) {
887
						return NO_TYPE_BINDINGS;
888
					}
889
					typeBounds[boundsIndex++] = typeBinding;
867
				}
890
				}
868
				if (superinterfaces != null) {
891
				if (superinterfaces != null) {
869
					for (int i = 0; i < superinterfacesLength; i++, boundsIndex++) {
892
					for (int i = 0; i < superinterfacesLength; i++, boundsIndex++) {
870
						typeBounds[boundsIndex] = this.resolver.getTypeBinding(superinterfaces[i]);
893
						ITypeBinding typeBinding = this.resolver.getTypeBinding(superinterfaces[i]);
894
						if (typeBinding == null) {
895
							return NO_TYPE_BINDINGS;
896
						}
897
						typeBounds[boundsIndex] = typeBinding;
871
					}
898
					}
872
				}
899
				}
873
				return typeBounds;
900
				return typeBounds;
Lines 891-897 Link Here
891
			if (typeVariableBindingsLength != 0) {
918
			if (typeVariableBindingsLength != 0) {
892
				ITypeBinding[] typeParameters = new ITypeBinding[typeVariableBindingsLength];
919
				ITypeBinding[] typeParameters = new ITypeBinding[typeVariableBindingsLength];
893
				for (int i = 0; i < typeVariableBindingsLength; i++) {
920
				for (int i = 0; i < typeVariableBindingsLength; i++) {
894
					typeParameters[i] = this.resolver.getTypeBinding(typeVariableBindings[i]);
921
					ITypeBinding typeBinding = this.resolver.getTypeBinding(typeVariableBindings[i]);
922
					if (typeBinding == null) {
923
						return NO_TYPE_BINDINGS;
924
					}
925
					typeParameters[i] = typeBinding;
895
				}
926
				}
896
				return typeParameters;
927
				return typeParameters;
897
			}
928
			}
(-)buildnotes_jdt-core.html (-1 / +13 lines)
Lines 37-48 Link Here
37
	</td>
37
	</td>
38
  </tr>
38
  </tr>
39
</table>
39
</table>
40
<a name="v_686_R32x"></a>
41
<p><hr><h1>
42
Eclipse Platform Build Notes<br>
43
Java Development Tooling Core</h1>
44
Eclipse SDK 3.2.2 - 8th February 2007 - 3.2.2 RELEASE
45
<br>Project org.eclipse.jdt.core v_686_R32x
46
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_686_R32x">cvs</a>).
47
<h2>What's new in this drop</h2>
48
49
<h3>Problem Reports Fixed</h3>
50
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=172633">172633</a>
51
NPEs while starting my workspace
40
52
41
<a name="v_685_R32x"></a>
53
<a name="v_685_R32x"></a>
42
<p><hr><h1>
54
<p><hr><h1>
43
Eclipse Platform Build Notes<br>
55
Eclipse Platform Build Notes<br>
44
Java Development Tooling Core</h1>
56
Java Development Tooling Core</h1>
45
Eclipse SDK 3.2.2 - 25th January 2007 - 3.2.2 RELEASE
57
Eclipse SDK 3.2.2 - 25th January 2007
46
<br>Project org.eclipse.jdt.core v_685_R32x
58
<br>Project org.eclipse.jdt.core v_685_R32x
47
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_685_R32x">cvs</a>).
59
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_685_R32x">cvs</a>).
48
<h2>What's new in this drop</h2>
60
<h2>What's new in this drop</h2>

Return to bug 172633