### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java,v retrieving revision 1.54 diff -u -r1.54 CompoundAssignment.java --- compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java 28 Mar 2006 20:29:56 -0000 1.54 +++ compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java 16 May 2008 20:31:30 -0000 @@ -152,18 +152,10 @@ scope.problemReporter().invalidOperator(this, lhsType, expressionType); return null; } - if (operator == PLUS){ - if(lhsID == T_JavaLangObject) { - // += is illegal (39248) - scope.problemReporter().invalidOperator(this, lhsType, expressionType); - return null; - } else { - // += is illegal - if ((lhsType.isNumericType() || lhsID == T_boolean) && !expressionType.isNumericType()){ - scope.problemReporter().invalidOperator(this, lhsType, expressionType); - return null; - } - } + if (operator == PLUS && ((lhsType.isNumericType() || lhsID == T_boolean) && !expressionType.isNumericType())) { + // += is illegal + scope.problemReporter().invalidOperator(this, lhsType, expressionType); + return null; } this.lhs.computeConversion(scope, TypeBinding.wellKnownType(scope, (result >>> 16) & 0x0000F), originalLhsType); this.expression.computeConversion(scope, TypeBinding.wellKnownType(scope, (result >>> 8) & 0x0000F), originalExpressionType);