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

Collapse All | Expand All

(-)dom/org/eclipse/jdt/core/dom/VariableBinding.java (-4 / +4 lines)
Lines 55-61 Link Here
55
			}
55
			}
56
			domInstances[i] = annotationInstance;
56
			domInstances[i] = annotationInstance;
57
		}
57
		}
58
		return domInstances;                                                                  
58
		return domInstances;
59
	}
59
	}
60
60
61
	/* (non-Javadoc)
61
	/* (non-Javadoc)
Lines 179-188 Link Here
179
	 * @see IVariableBinding#getType()
179
	 * @see IVariableBinding#getType()
180
	 */
180
	 */
181
	public ITypeBinding getType() {
181
	public ITypeBinding getType() {
182
		if (type == null) {
182
		if (this.type == null) {
183
			type = this.resolver.getTypeBinding(this.binding.type);
183
			this.type = this.resolver.getTypeBinding(this.binding.type);
184
		}
184
		}
185
		return type;
185
		return this.type;
186
	}
186
	}
187
187
188
	private JavaElement getUnresolvedJavaElement() {
188
	private JavaElement getUnresolvedJavaElement() {
(-)dom/org/eclipse/jdt/core/dom/TypeBinding.java (-46 / +94 lines)
Lines 69-75 Link Here
69
	org.eclipse.jdt.internal.compiler.lookup.TypeBinding binding;
69
	org.eclipse.jdt.internal.compiler.lookup.TypeBinding binding;
70
	private String key;
70
	private String key;
71
	private BindingResolver resolver;
71
	private BindingResolver resolver;
72
	
72
	private ITypeBinding[] interfaces;
73
	private ITypeBinding[] typeParameters;
74
	private ITypeBinding[] typeArguments;
75
	private ITypeBinding[] typeBounds;
76
	private ITypeBinding[] members;
77
73
	public TypeBinding(BindingResolver resolver, org.eclipse.jdt.internal.compiler.lookup.TypeBinding binding) {
78
	public TypeBinding(BindingResolver resolver, org.eclipse.jdt.internal.compiler.lookup.TypeBinding binding) {
74
		this.binding = binding;
79
		this.binding = binding;
75
		this.resolver = resolver;
80
		this.resolver = resolver;
Lines 248-263 Link Here
248
	 * @see ITypeBinding#getDeclaredTypes()
253
	 * @see ITypeBinding#getDeclaredTypes()
249
	 */
254
	 */
250
	public ITypeBinding[] getDeclaredTypes() {
255
	public ITypeBinding[] getDeclaredTypes() {
256
		if (this.members != null) {
257
			return this.members;
258
		}
251
		try {
259
		try {
252
			if (isClass() || isInterface() || isEnum()) {
260
			if (isClass() || isInterface() || isEnum()) {
253
				ReferenceBinding referenceBinding = (ReferenceBinding) this.binding;
261
				ReferenceBinding referenceBinding = (ReferenceBinding) this.binding;
254
				ReferenceBinding[] members = referenceBinding.memberTypes();
262
				ReferenceBinding[] referenceBindingMembers = referenceBinding.memberTypes();
255
				int length = members.length;
263
				int length = referenceBindingMembers == null ? 0 : referenceBindingMembers.length;
256
				ITypeBinding[] newMembers = new ITypeBinding[length];
264
				if (length != 0) {
257
				for (int i = 0; i < length; i++) {
265
					ITypeBinding[] newMembers = new ITypeBinding[length];
258
					newMembers[i] = this.resolver.getTypeBinding(members[i]);
266
					for (int i = 0; i < length; i++) {
267
						ITypeBinding typeBinding = this.resolver.getTypeBinding(referenceBindingMembers[i]);
268
						if (typeBinding == null) {
269
							return this.members = NO_TYPE_BINDINGS;
270
						}
271
						newMembers[i] = typeBinding;
272
					}
273
					return this.members = newMembers;
259
				}
274
				}
260
				return newMembers;
261
			}
275
			}
262
		} catch (RuntimeException e) {
276
		} catch (RuntimeException e) {
263
			/* in case a method cannot be resolvable due to missing jars on the classpath
277
			/* in case a method cannot be resolvable due to missing jars on the classpath
Lines 266-272 Link Here
266
			 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=64299
280
			 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=64299
267
			 */
281
			 */
268
		}
282
		}
269
		return NO_TYPE_BINDINGS;
283
		return this.members = NO_TYPE_BINDINGS;
270
	}
284
	}
271
285
272
	/*
286
	/*
Lines 379-395 Link Here
379
	}
393
	}
380
394
381
	public ITypeBinding[] getInterfaces() {
395
	public ITypeBinding[] getInterfaces() {
396
		if (this.interfaces != null) {
397
			return this.interfaces;
398
		}
382
		if (this.binding == null) 
399
		if (this.binding == null) 
383
			return NO_TYPE_BINDINGS;
400
			return this.interfaces = NO_TYPE_BINDINGS;
384
		switch (this.binding.kind()) {
401
		switch (this.binding.kind()) {
385
			case Binding.ARRAY_TYPE :
402
			case Binding.ARRAY_TYPE :
386
			case Binding.BASE_TYPE :
403
			case Binding.BASE_TYPE :
387
				return NO_TYPE_BINDINGS;
404
				return this.interfaces = NO_TYPE_BINDINGS;
388
		}
405
		}
389
		ReferenceBinding referenceBinding = (ReferenceBinding) this.binding;
406
		ReferenceBinding referenceBinding = (ReferenceBinding) this.binding;
390
		ReferenceBinding[] interfaces = null;
407
		ReferenceBinding[] interfacesBinding = null;
391
		try {
408
		try {
392
			interfaces = referenceBinding.superInterfaces();
409
			interfacesBinding = referenceBinding.superInterfaces();
393
		} catch (RuntimeException e) {
410
		} catch (RuntimeException e) {
394
			/* in case a method cannot be resolvable due to missing jars on the classpath
411
			/* in case a method cannot be resolvable due to missing jars on the classpath
395
			 * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=57871
412
			 * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=57871
Lines 397-414 Link Here
397
			 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=64299
414
			 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=64299
398
			 */
415
			 */
399
		}
416
		}
400
		if (interfaces == null) {
417
		if (interfacesBinding == null) {
401
			return NO_TYPE_BINDINGS;
418
			return this.interfaces = NO_TYPE_BINDINGS;
402
		}
419
		}
403
		int length = interfaces.length;
420
		int length = interfacesBinding.length;
404
		if (length == 0) {
421
		if (length == 0) {
405
			return NO_TYPE_BINDINGS;
422
			return this.interfaces = NO_TYPE_BINDINGS;
406
		} else {
423
		} else {
407
			ITypeBinding[] newInterfaces = new ITypeBinding[length];
424
			ITypeBinding[] newInterfaces = new ITypeBinding[length];
408
			for (int i = 0; i < length; i++) {
425
			for (int i = 0; i < length; i++) {
409
				newInterfaces[i] = this.resolver.getTypeBinding(interfaces[i]);
426
				ITypeBinding typeBinding = this.resolver.getTypeBinding(interfacesBinding[i]);
427
				if (typeBinding == null) {
428
					return this.interfaces = NO_TYPE_BINDINGS;
429
				}
430
				newInterfaces[i] = typeBinding;
410
			}
431
			}
411
			return newInterfaces;
432
			return this.interfaces = newInterfaces;
412
		}
433
		}
413
	}
434
	}
414
	
435
	
Lines 484-490 Link Here
484
				IMethod declaringMethod = (IMethod) declaringTypeBinding.getJavaElement();
505
				IMethod declaringMethod = (IMethod) declaringTypeBinding.getJavaElement();
485
				return (JavaElement) declaringMethod.getTypeParameter(typeVariableName);
506
				return (JavaElement) declaringMethod.getTypeParameter(typeVariableName);
486
			} else {
507
			} else {
487
				declaringTypeBinding = this.resolver.getTypeBinding((org.eclipse.jdt.internal.compiler.lookup.TypeBinding) declaringElement);
508
				ITypeBinding typeBinding2 = this.resolver.getTypeBinding((org.eclipse.jdt.internal.compiler.lookup.TypeBinding) declaringElement);
509
				if (typeBinding2 == null) return null;
510
				declaringTypeBinding = typeBinding2;
488
				IType declaringType = (IType) declaringTypeBinding.getJavaElement();
511
				IType declaringType = (IType) declaringTypeBinding.getJavaElement();
489
				return (JavaElement) declaringType.getTypeParameter(typeVariableName);
512
				return (JavaElement) declaringType.getTypeParameter(typeVariableName);
490
			}
513
			}
Lines 590-604 Link Here
590
				ParameterizedTypeBinding parameterizedTypeBinding = (ParameterizedTypeBinding) this.binding;
613
				ParameterizedTypeBinding parameterizedTypeBinding = (ParameterizedTypeBinding) this.binding;
591
				buffer = new StringBuffer();
614
				buffer = new StringBuffer();
592
				buffer.append(parameterizedTypeBinding.sourceName());
615
				buffer.append(parameterizedTypeBinding.sourceName());
593
				ITypeBinding[] typeArguments = getTypeArguments();
616
				ITypeBinding[] tArguments = getTypeArguments();
594
				final int typeArgumentsLength = typeArguments.length;
617
				final int typeArgumentsLength = tArguments.length;
595
				if (typeArgumentsLength != 0) {
618
				if (typeArgumentsLength != 0) {
596
					buffer.append('<');
619
					buffer.append('<');
597
					for (int i = 0, max = typeArguments.length; i < max; i++) {
620
					for (int i = 0, max = tArguments.length; i < max; i++) {
598
						if (i > 0) {
621
						if (i > 0) {
599
							buffer.append(',');
622
							buffer.append(',');
600
						}
623
						}
601
						buffer.append(typeArguments[i].getName());
624
						buffer.append(tArguments[i].getName());
602
					}
625
					}
603
					buffer.append('>');	
626
					buffer.append('>');	
604
				}
627
				}
Lines 743-772 Link Here
743
						.append('.');
766
						.append('.');
744
					ParameterizedTypeBinding parameterizedTypeBinding = (ParameterizedTypeBinding) this.binding;
767
					ParameterizedTypeBinding parameterizedTypeBinding = (ParameterizedTypeBinding) this.binding;
745
					buffer.append(parameterizedTypeBinding.sourceName());
768
					buffer.append(parameterizedTypeBinding.sourceName());
746
					ITypeBinding[] typeArguments = getTypeArguments();
769
					ITypeBinding[] tArguments = getTypeArguments();
747
					final int typeArgumentsLength = typeArguments.length;
770
					final int typeArgumentsLength = tArguments.length;
748
					if (typeArgumentsLength != 0) {
771
					if (typeArgumentsLength != 0) {
749
						buffer.append('<');
772
						buffer.append('<');
750
						for (int i = 0, max = typeArguments.length; i < max; i++) {
773
						for (int i = 0, max = tArguments.length; i < max; i++) {
751
							if (i > 0) {
774
							if (i > 0) {
752
								buffer.append(',');
775
								buffer.append(',');
753
							}
776
							}
754
							buffer.append(typeArguments[i].getQualifiedName());
777
							buffer.append(tArguments[i].getQualifiedName());
755
						}
778
						}
756
						buffer.append('>');	
779
						buffer.append('>');	
757
					}
780
					}
758
					return String.valueOf(buffer);
781
					return String.valueOf(buffer);
759
				}				
782
				}				
760
				buffer.append(getTypeDeclaration().getQualifiedName());
783
				buffer.append(getTypeDeclaration().getQualifiedName());
761
				ITypeBinding[] typeArguments = getTypeArguments();
784
				ITypeBinding[] tArguments = getTypeArguments();
762
				final int typeArgumentsLength = typeArguments.length;
785
				final int typeArgumentsLength = tArguments.length;
763
				if (typeArgumentsLength != 0) {
786
				if (typeArgumentsLength != 0) {
764
					buffer.append('<');
787
					buffer.append('<');
765
					for (int i = 0, max = typeArguments.length; i < max; i++) {
788
					for (int i = 0, max = tArguments.length; i < max; i++) {
766
						if (i > 0) {
789
						if (i > 0) {
767
							buffer.append(',');
790
							buffer.append(',');
768
						}
791
						}
769
						buffer.append(typeArguments[i].getQualifiedName());
792
						buffer.append(tArguments[i].getQualifiedName());
770
					}
793
					}
771
					buffer.append('>');
794
					buffer.append('>');
772
				}
795
				}
Lines 827-858 Link Here
827
		if (superclass == null) {
850
		if (superclass == null) {
828
			return null;
851
			return null;
829
		}
852
		}
830
		return this.resolver.getTypeBinding(superclass);		
853
		return this.resolver.getTypeBinding(superclass);
831
	}
854
	}
832
855
833
	/* (non-Javadoc)
856
	/* (non-Javadoc)
834
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getTypeArguments()
857
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getTypeArguments()
835
	 */
858
	 */
836
	public ITypeBinding[] getTypeArguments() {
859
	public ITypeBinding[] getTypeArguments() {
860
		if (this.typeArguments != null) {
861
			return this.typeArguments;
862
		}
837
		if (this.binding.isParameterizedType()) {
863
		if (this.binding.isParameterizedType()) {
838
			ParameterizedTypeBinding parameterizedTypeBinding = (ParameterizedTypeBinding) this.binding;
864
			ParameterizedTypeBinding parameterizedTypeBinding = (ParameterizedTypeBinding) this.binding;
839
			final org.eclipse.jdt.internal.compiler.lookup.TypeBinding[] arguments = parameterizedTypeBinding.arguments;
865
			final org.eclipse.jdt.internal.compiler.lookup.TypeBinding[] arguments = parameterizedTypeBinding.arguments;
840
			if (arguments != null) {
866
			if (arguments != null) {
841
				int argumentsLength = arguments.length;
867
				int argumentsLength = arguments.length;
842
				ITypeBinding[] typeArguments = new ITypeBinding[argumentsLength];
868
				ITypeBinding[] newTypeArguments = new ITypeBinding[argumentsLength];
843
				for (int i = 0; i < argumentsLength; i++) {
869
				for (int i = 0; i < argumentsLength; i++) {
844
					typeArguments[i] = this.resolver.getTypeBinding(arguments[i]);
870
					ITypeBinding typeBinding = this.resolver.getTypeBinding(arguments[i]);
871
					if (typeBinding == null) {
872
						return this.typeArguments = NO_TYPE_BINDINGS;
873
					}
874
					newTypeArguments[i] = typeBinding;
845
				}
875
				}
846
				return typeArguments;
876
				return this.typeArguments = newTypeArguments;
847
			}
877
			}
848
		}
878
		}
849
		return NO_TYPE_BINDINGS;
879
		return this.typeArguments = NO_TYPE_BINDINGS;
850
	}
880
	}
851
881
852
	/* (non-Javadoc)
882
	/* (non-Javadoc)
853
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getTypeBounds()
883
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getTypeBounds()
854
	 */
884
	 */
855
	public ITypeBinding[] getTypeBounds() {
885
	public ITypeBinding[] getTypeBounds() {
886
		if (this.typeBounds != null) {
887
			return this.typeBounds;
888
		}
856
		if (this.binding instanceof TypeVariableBinding) {
889
		if (this.binding instanceof TypeVariableBinding) {
857
			TypeVariableBinding typeVariableBinding = (TypeVariableBinding) this.binding;
890
			TypeVariableBinding typeVariableBinding = (TypeVariableBinding) this.binding;
858
			ReferenceBinding varSuperclass = typeVariableBinding.superclass();
891
			ReferenceBinding varSuperclass = typeVariableBinding.superclass();
Lines 874-916 Link Here
874
				boundsLength += superinterfacesLength;
907
				boundsLength += superinterfacesLength;
875
			}
908
			}
876
			if (boundsLength != 0) {
909
			if (boundsLength != 0) {
877
				ITypeBinding[] typeBounds = new ITypeBinding[boundsLength];
910
				ITypeBinding[] newTypeBounds = new ITypeBinding[boundsLength];
878
				int boundsIndex = 0;
911
				int boundsIndex = 0;
879
				if (firstClassOrArrayBound != null) {
912
				if (firstClassOrArrayBound != null) {
880
					typeBounds[boundsIndex++] = this.resolver.getTypeBinding(firstClassOrArrayBound);
913
					ITypeBinding typeBinding = this.resolver.getTypeBinding(firstClassOrArrayBound);
914
					if (typeBinding == null) {
915
						return this.typeBounds = NO_TYPE_BINDINGS;
916
					}
917
					newTypeBounds[boundsIndex++] = typeBinding;
881
				}
918
				}
882
				if (superinterfaces != null) {
919
				if (superinterfaces != null) {
883
					for (int i = 0; i < superinterfacesLength; i++, boundsIndex++) {
920
					for (int i = 0; i < superinterfacesLength; i++, boundsIndex++) {
884
						typeBounds[boundsIndex] = this.resolver.getTypeBinding(superinterfaces[i]);
921
						ITypeBinding typeBinding = this.resolver.getTypeBinding(superinterfaces[i]);
922
						if (typeBinding == null) {
923
							return this.typeBounds = NO_TYPE_BINDINGS;
924
						}
925
						newTypeBounds[boundsIndex] = typeBinding;
885
					}
926
					}
886
				}
927
				}
887
				return typeBounds;
928
				return this.typeBounds = newTypeBounds;
888
			}
929
			}
889
		}
930
		}
890
		return NO_TYPE_BINDINGS;
931
		return this.typeBounds = NO_TYPE_BINDINGS;
891
	}
932
	}
892
933
893
	/* (non-Javadoc)
934
	/* (non-Javadoc)
894
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getTypeParameters()
935
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getTypeParameters()
895
	 */
936
	 */
896
	public ITypeBinding[] getTypeParameters() {
937
	public ITypeBinding[] getTypeParameters() {
938
		if (this.typeParameters != null) {
939
			return this.typeParameters;
940
		}
897
		switch(this.binding.kind()) {
941
		switch(this.binding.kind()) {
898
			case Binding.RAW_TYPE :
942
			case Binding.RAW_TYPE :
899
			case Binding.PARAMETERIZED_TYPE :
943
			case Binding.PARAMETERIZED_TYPE :
900
				return NO_TYPE_BINDINGS;
944
				return this.typeParameters = NO_TYPE_BINDINGS;
901
		}
945
		}
902
		TypeVariableBinding[] typeVariableBindings = this.binding.typeVariables();
946
		TypeVariableBinding[] typeVariableBindings = this.binding.typeVariables();
903
		if (typeVariableBindings != null) {
947
		if (typeVariableBindings != null) {
904
			int typeVariableBindingsLength = typeVariableBindings.length;
948
			int typeVariableBindingsLength = typeVariableBindings.length;
905
			if (typeVariableBindingsLength != 0) {
949
			if (typeVariableBindingsLength != 0) {
906
				ITypeBinding[] typeParameters = new ITypeBinding[typeVariableBindingsLength];
950
				ITypeBinding[] tParameters = new ITypeBinding[typeVariableBindingsLength];
907
				for (int i = 0; i < typeVariableBindingsLength; i++) {
951
				for (int i = 0; i < typeVariableBindingsLength; i++) {
908
					typeParameters[i] = this.resolver.getTypeBinding(typeVariableBindings[i]);
952
					ITypeBinding typeBinding = this.resolver.getTypeBinding(typeVariableBindings[i]);
953
					if (typeBinding == null) {
954
						return this.typeParameters = NO_TYPE_BINDINGS;
955
					}
956
					tParameters[i] = typeBinding;
909
				}
957
				}
910
				return typeParameters;
958
				return this.typeParameters = tParameters;
911
			}
959
			}
912
		}
960
		}
913
		return NO_TYPE_BINDINGS;
961
		return this.typeParameters = NO_TYPE_BINDINGS;
914
	}
962
	}
915
	
963
	
916
	/* (non-Javadoc)
964
	/* (non-Javadoc)
(-)dom/org/eclipse/jdt/core/dom/MethodBinding.java (-25 / +33 lines)
Lines 152-166 Link Here
152
			return parameterTypes;
152
			return parameterTypes;
153
		}
153
		}
154
		org.eclipse.jdt.internal.compiler.lookup.TypeBinding[] parameters = this.binding.parameters;
154
		org.eclipse.jdt.internal.compiler.lookup.TypeBinding[] parameters = this.binding.parameters;
155
		int length = parameters.length;
155
		int length = parameters == null ? 0 : parameters.length;
156
		if (length == 0) {
156
		if (length == 0) {
157
			this.parameterTypes = NO_TYPE_BINDINGS;
157
			return this.parameterTypes = NO_TYPE_BINDINGS;
158
		} else {
158
		} else {
159
			this.parameterTypes = new ITypeBinding[length];
159
			ITypeBinding[] paramTypes = new ITypeBinding[length];
160
			for (int i = 0; i < length; i++) {
160
			for (int i = 0; i < length; i++) {
161
				final TypeBinding parameterBinding = parameters[i];
161
				final TypeBinding parameterBinding = parameters[i];
162
				if (parameterBinding != null) {
162
				if (parameterBinding != null) {
163
					this.parameterTypes[i] = this.resolver.getTypeBinding(parameterBinding);
163
					ITypeBinding typeBinding = this.resolver.getTypeBinding(parameterBinding);
164
					if (typeBinding == null) {
165
						return this.parameterTypes = NO_TYPE_BINDINGS;
166
					}
167
					paramTypes[i] = typeBinding;
164
				} else {
168
				} else {
165
					// log error
169
					// log error
166
					StringBuffer message = new StringBuffer("Report method binding where a parameter is null:\n");  //$NON-NLS-1$
170
					StringBuffer message = new StringBuffer("Report method binding where a parameter is null:\n");  //$NON-NLS-1$
Lines 170-177 Link Here
170
					return this.parameterTypes = NO_TYPE_BINDINGS;
174
					return this.parameterTypes = NO_TYPE_BINDINGS;
171
				}
175
				}
172
			}
176
			}
177
			return this.parameterTypes = paramTypes;
173
		}
178
		}
174
		return this.parameterTypes;
175
	}
179
	}
176
180
177
	/**
181
	/**
Lines 200-213 Link Here
200
		org.eclipse.jdt.internal.compiler.lookup.TypeBinding[] exceptions = this.binding.thrownExceptions;
204
		org.eclipse.jdt.internal.compiler.lookup.TypeBinding[] exceptions = this.binding.thrownExceptions;
201
		int length = exceptions.length;
205
		int length = exceptions.length;
202
		if (length == 0) {
206
		if (length == 0) {
203
			this.exceptionTypes = NO_TYPE_BINDINGS;
207
			return this.exceptionTypes = NO_TYPE_BINDINGS;
204
		} else {
208
		} else {
205
			this.exceptionTypes = new ITypeBinding[length];
209
			ITypeBinding[] newExceptionTypes = new ITypeBinding[length];
206
			for (int i = 0; i < length; i++) {
210
			for (int i = 0; i < length; i++) {
207
				this.exceptionTypes[i] = this.resolver.getTypeBinding(exceptions[i]);
211
				ITypeBinding typeBinding = this.resolver.getTypeBinding(exceptions[i]);
212
				if (typeBinding == null) {
213
					return this.exceptionTypes = NO_TYPE_BINDINGS;
214
				}
215
				newExceptionTypes[i] = typeBinding;
208
			}
216
			}
217
			return this.exceptionTypes = newExceptionTypes;
209
		}
218
		}
210
		return this.exceptionTypes;
211
	}
219
	}
212
	
220
	
213
	public IJavaElement getJavaElement() {
221
	public IJavaElement getJavaElement() {
Lines 359-375 Link Here
359
		if (typeVariableBindings != null) {
367
		if (typeVariableBindings != null) {
360
			int typeVariableBindingsLength = typeVariableBindings.length;
368
			int typeVariableBindingsLength = typeVariableBindings.length;
361
			if (typeVariableBindingsLength != 0) {
369
			if (typeVariableBindingsLength != 0) {
362
				this.typeParameters = new ITypeBinding[typeVariableBindingsLength];
370
				ITypeBinding[] tParameters = new ITypeBinding[typeVariableBindingsLength];
363
				for (int i = 0; i < typeVariableBindingsLength; i++) {
371
				for (int i = 0; i < typeVariableBindingsLength; i++) {
364
					typeParameters[i] = this.resolver.getTypeBinding(typeVariableBindings[i]);
372
					ITypeBinding typeBinding = this.resolver.getTypeBinding(typeVariableBindings[i]);
373
					if (typeBinding == null) {
374
						return this.typeParameters = NO_TYPE_BINDINGS;
375
					}
376
					tParameters[i] = typeBinding;
365
				}
377
				}
366
			} else {
378
				return this.typeParameters = tParameters;
367
				this.typeParameters = NO_TYPE_BINDINGS;
368
			}
379
			}
369
		} else {
370
			this.typeParameters = NO_TYPE_BINDINGS;
371
		}
380
		}
372
		return this.typeParameters;
381
		return this.typeParameters = NO_TYPE_BINDINGS;
373
	}
382
	}
374
383
375
	/**
384
	/**
Lines 399-418 Link Here
399
			if (typeArgumentsBindings != null) {
408
			if (typeArgumentsBindings != null) {
400
				int typeArgumentsLength = typeArgumentsBindings.length;
409
				int typeArgumentsLength = typeArgumentsBindings.length;
401
				if (typeArgumentsLength != 0) {
410
				if (typeArgumentsLength != 0) {
402
					this.typeArguments = new ITypeBinding[typeArgumentsLength];
411
					ITypeBinding[] tArguments = new ITypeBinding[typeArgumentsLength];
403
					for (int i = 0; i < typeArgumentsLength; i++) {
412
					for (int i = 0; i < typeArgumentsLength; i++) {
404
						this.typeArguments[i] = this.resolver.getTypeBinding(typeArgumentsBindings[i]);
413
						ITypeBinding typeBinding = this.resolver.getTypeBinding(typeArgumentsBindings[i]);
414
						if (typeBinding == null) {
415
							return this.typeArguments = NO_TYPE_BINDINGS;
416
						}
417
						tArguments[i] = typeBinding;
405
					}
418
					}
406
				} else {
419
					return this.typeArguments = tArguments;
407
					this.typeArguments = NO_TYPE_BINDINGS;
408
				}
420
				}
409
			} else {
410
				this.typeArguments = NO_TYPE_BINDINGS;
411
			}
421
			}
412
		} else {
413
			this.typeArguments = NO_TYPE_BINDINGS;
414
		}
422
		}
415
		return this.typeArguments;
423
		return this.typeArguments = NO_TYPE_BINDINGS;
416
	}
424
	}
417
425
418
	/**
426
	/**

Return to bug 172633