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

(-)Expression.java (-1 / +2 lines)
Lines 253-259 Link Here
253
			return false;
253
			return false;
254
		} else if (use15specifics 
254
		} else if (use15specifics 
255
							&& expressionType.isBaseType() 
255
							&& expressionType.isBaseType() 
256
							&& env.computeBoxingType(castType) == expressionType) { // boxing - only exact match is allowed
256
							&& env.computeBoxingType(expressionType).isCompatibleWith(castType)) {
257
				// boxing - only compatible match is allowed: byte is compatible with java.lang.Number
257
			tagAsUnnecessaryCast(scope, castType);  
258
			tagAsUnnecessaryCast(scope, castType);  
258
			return true;
259
			return true;
259
		}
260
		}

Return to bug 84345