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

(-)LookupEnvironment.java (-5 / +9 lines)
Lines 470-480 Link Here
470
	// resolve any array bindings which reference the unresolvedType
470
	// resolve any array bindings which reference the unresolvedType
471
	ReferenceBinding cachedType = packageBinding.getType0(binaryBinding.compoundName[binaryBinding.compoundName.length - 1]);
471
	ReferenceBinding cachedType = packageBinding.getType0(binaryBinding.compoundName[binaryBinding.compoundName.length - 1]);
472
	if (cachedType != null) { // update reference to unresolved binding after having read classfile (knows whether generic for raw conversion)
472
	if (cachedType != null) { // update reference to unresolved binding after having read classfile (knows whether generic for raw conversion)
473
		// TODO (kent) suspect the check below is no longer required, since we should not be requesting a binary which is already in the cache
473
		if (cachedType instanceof UnresolvedReferenceBinding) {
474
		if (cachedType.isBinaryBinding()) // sanity check before the cast... at this point the cache should ONLY contain unresolved types
474
			((UnresolvedReferenceBinding) cachedType).setResolvedType(binaryBinding, this);
475
			return (BinaryTypeBinding) cachedType;
475
		} else {
476
476
			if (cachedType.isBinaryBinding()) // sanity check... at this point the cache should ONLY contain unresolved types
477
		((UnresolvedReferenceBinding) cachedType).setResolvedType(binaryBinding, this);
477
				return (BinaryTypeBinding) cachedType;
478
			// it is possible with a large number of source files (exceeding AbstractImageBuilder.MAX_AT_ONCE) that a member type can be in the cache as an UnresolvedType,
479
			// but because its enclosingType is resolved while its created (call to BinaryTypeBinding constructor), its replaced with a source type
480
			return null;
481
		}
478
	}
482
	}
479
483
480
	packageBinding.addType(binaryBinding);
484
	packageBinding.addType(binaryBinding);

Return to bug 100631