--- old/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryArithmeticOperatorFactory.java 2016-05-12 04:24:15.990334680 +0300 +++ new/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryArithmeticOperatorFactory.java 2016-05-12 04:24:15.906334681 +0300 @@ -30,7 +30,6 @@ import jdk.test.lib.jittester.Type; import jdk.test.lib.jittester.TypeList; import jdk.test.lib.jittester.utils.TypeUtil; -import jdk.test.lib.jittester.types.TypeInt; import jdk.test.lib.jittester.types.TypeKlass; import jdk.test.lib.jittester.utils.PseudoRandom; @@ -47,18 +46,18 @@ // arithmetic for built-in types less capacious than "int" is not supported. if (TypeList.isBuiltIn(resultType)) { BuiltInType builtInType = (BuiltInType) resultType; - return builtInType.equals(new TypeInt()) || builtInType.isMoreCapaciousThan(new TypeInt()); + return builtInType.equals(TypeList.INT) || builtInType.isMoreCapaciousThan(TypeList.INT); } else { return false; } } @Override - protected Pair generateTypes() throws ProductionFailedException { + protected Pair generateTypes() { Collection castableFromResultType = TypeUtil.getImplicitlyCastable(TypeList.getBuiltIn(), resultType); // built-in types less capacious than int are automatically casted to int in arithmetic. final Type leftType = PseudoRandom.randomElement(castableFromResultType); - final Type rightType = resultType.equals(new TypeInt()) ? + final Type rightType = resultType.equals(TypeList.INT) ? PseudoRandom.randomElement(castableFromResultType) : resultType; //TODO: is there sense to swap them randomly as it was done in original code? return PseudoRandom.randomBoolean() ? new Pair<>(leftType, rightType) : new Pair<>(rightType, leftType);