Fix auto(un)boxing
diff --git a/tck/src/main/java/com/sun/ts/tests/el/api/jakarta_el/beannameelresolver/ELClientIT.java b/tck/src/main/java/com/sun/ts/tests/el/api/jakarta_el/beannameelresolver/ELClientIT.java index a73bf85..f30585d 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/api/jakarta_el/beannameelresolver/ELClientIT.java +++ b/tck/src/main/java/com/sun/ts/tests/el/api/jakarta_el/beannameelresolver/ELClientIT.java
@@ -127,7 +127,7 @@ try { pass = ResolverTest.testELResolverInvoke(context, context.getELResolver(), - new SimpleBean(), "bogue_method", types, values, true, buf); + new SimpleBean(), "bogue_method", types, values, Boolean.TRUE, buf); } catch (Exception ex) { throw new Exception(ex); @@ -171,7 +171,7 @@ try { pass = ResolverTest.testELResolverInvoke(context, context.getELResolver(), - new SimpleBean(), "isName", types, values, false, buf); + new SimpleBean(), "isName", types, values, Boolean.FALSE, buf); } catch (Exception ex) { throw new Exception(ex);
diff --git a/tck/src/main/java/com/sun/ts/tests/el/api/jakarta_el/compositeelresolver/ELClientIT.java b/tck/src/main/java/com/sun/ts/tests/el/api/jakarta_el/compositeelresolver/ELClientIT.java index b470c98..a22e03a 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/api/jakarta_el/compositeelresolver/ELClientIT.java +++ b/tck/src/main/java/com/sun/ts/tests/el/api/jakarta_el/compositeelresolver/ELClientIT.java
@@ -127,7 +127,7 @@ String[] values = { "Doug", "Donahue" }; pass = ResolverTest.testELResolverInvoke(context, compResolver, sb, - "isName", types, values, false, buf); + "isName", types, values, Boolean.FALSE, buf); } catch (Exception ex) { throw new Exception(ex);
diff --git a/tck/src/main/java/com/sun/ts/tests/el/api/jakarta_el/expressionfactory/ELClientIT.java b/tck/src/main/java/com/sun/ts/tests/el/api/jakarta_el/expressionfactory/ELClientIT.java index 0b251d8..c76219a 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/api/jakarta_el/expressionfactory/ELClientIT.java +++ b/tck/src/main/java/com/sun/ts/tests/el/api/jakarta_el/expressionfactory/ELClientIT.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates and others. + * Copyright (c) 2009, 2025 Oracle and/or its affiliates and others. * All rights reserved. * * This program and the accompanying materials are made available under the @@ -45,7 +45,7 @@ public class ELClientIT { private static final Logger logger = System.getLogger(ELClientIT.class.getName()); - + @AfterEach public void cleanup() throws Exception { logger.log(Logger.Level.INFO, "Cleanup method called"); @@ -63,7 +63,7 @@ /** * @testName: newInstanceTest - * + * * @assertion_ids: EL:JAVADOC:119; EL:JAVADOC:120 * @test_Strategy: Verify that an ExpressionFactory can be instantiated with * the newInstance() API. @@ -86,7 +86,7 @@ /** * @testName: createValueExpressionTest - * + * * @assertion_ids: EL:JAVADOC:63 * @test_Strategy: Verify that the ExpressionFactory can handle the types of * input specified in the javadoc when invoking the @@ -157,7 +157,7 @@ /** * @testName: createValueExpression2Test - * + * * @assertion_ids: EL:JAVADOC:64 * @test_Strategy: Verify the functionality of the * createValueExpression(Object, Class) method. @@ -197,7 +197,7 @@ /** * @testName: createValueExpressionELExceptionTest - * + * * @assertion_ids: EL:JAVADOC:63 * @test_Strategy: Verify that * ExpressionFactory.createValueExpression(ELContext, String, @@ -262,7 +262,7 @@ /** * @testName: createMethodExpressionTest - * + * * @assertion_ids: EL:JAVADOC:62 * @test_Strategy: Verify that the ExpressionFactory can handle the types of * input specified in the javadoc when invoking the @@ -326,9 +326,9 @@ /** * @testName: createMethodExpressionELExceptionTest - * + * * @assertion_ids: EL:JAVADOC:63; EL:JAVADOC:253 - * + * * @test_Strategy: Verify that ExpressionFactory.createMethodExpression() * throws an ELException for expressions with syntactical * errors, and for expressions that are not lvalues. @@ -395,10 +395,10 @@ /** * @testName: createExpressionNPETest - * + * * @assertion_ids: EL:JAVADOC:62; EL:JAVADOC:63; EL:JAVADOC:64; * EL:JAVADOC:253; EL:JAVADOC:254; EL:JAVADOC:256 - * + * * @test_Strategy: Verify that ExpressionFactory.createValueExpression() and * ExpressionFactory.createMethodExpression() throw a * NullPointerException under the conditions stated in the @@ -415,7 +415,7 @@ new Class<?>[] { ELContext.class, String.class, Class.class }, new Object[] { context, "function", null }); - logger.log(Logger.Level.INFO, + logger.log(Logger.Level.INFO, "Testing: ELContext.createValueExpression(instance, " + "null)"); ELTestUtil.checkForNPE(expFactory, "createValueExpression", new Class<?>[] { Object.class, Class.class }, @@ -432,7 +432,7 @@ /** * @testName: coerceToTypeTest - * + * * @assertion_ids: EL:JAVADOC:61 * @test_Strategy: Verify that the coerceToType() method coerces an object to * a specific type according to the EL type conversion rules. @@ -483,9 +483,9 @@ /** * @testName: coerceToTypeELExceptionTest - * + * * @assertion_ids: EL:JAVADOC:61; EL:JAVADOC:251 - * + * * @test_Strategy: Verify that the coerceToType() method throws an ELException * for invalid type conversions. */ @@ -498,7 +498,7 @@ new ObjectAndType(Integer.valueOf(1), Boolean.class), new ObjectAndType(Boolean.FALSE, Long.class), new ObjectAndType(Boolean.TRUE, Character.class), - new ObjectAndType(true, Float.class), + new ObjectAndType(Boolean.TRUE, Float.class), new ObjectAndType("non-numeric string", Long.class), new ObjectAndType(Integer.valueOf(1), Class.class) };
diff --git a/tck/src/main/java/com/sun/ts/tests/el/api/jakarta_el/staticfieldelresolver/ELClientIT.java b/tck/src/main/java/com/sun/ts/tests/el/api/jakarta_el/staticfieldelresolver/ELClientIT.java index 21f3d7e..2510188 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/api/jakarta_el/staticfieldelresolver/ELClientIT.java +++ b/tck/src/main/java/com/sun/ts/tests/el/api/jakarta_el/staticfieldelresolver/ELClientIT.java
@@ -187,7 +187,7 @@ try { pass = ResolverTest.testELResolverInvoke(context, context.getELResolver(), - new ELClass(TCKELClass.class), "bogue_method", types, values, true, + new ELClass(TCKELClass.class), "bogue_method", types, values, Boolean.TRUE, buf); } catch (Exception ex) { @@ -224,7 +224,7 @@ try { pass = ResolverTest.testELResolverInvoke(context, context.getELResolver(), - new ELClass(TCKELClass.class), "isName", types, values, false, buf); + new ELClass(TCKELClass.class), "isName", types, values, Boolean.FALSE, buf); } catch (Exception ex) { throw new Exception(ex);
diff --git a/tck/src/main/java/com/sun/ts/tests/el/common/util/ExprEval.java b/tck/src/main/java/com/sun/ts/tests/el/common/util/ExprEval.java index 2817b75..8171d9a 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/common/util/ExprEval.java +++ b/tck/src/main/java/com/sun/ts/tests/el/common/util/ExprEval.java
@@ -327,24 +327,24 @@ public static boolean compareValue(Double val, Float expectedVal, int eps) { - BigDecimal a = new BigDecimal(val); - BigDecimal b = new BigDecimal(expectedVal); + BigDecimal a = new BigDecimal(val.doubleValue()); + BigDecimal b = new BigDecimal(expectedVal.doubleValue()); return compareValue(a, b, eps); } public static boolean compareValue(Float val, Float expectedVal, int eps) { - BigDecimal a = new BigDecimal(val); - BigDecimal b = new BigDecimal(expectedVal); + BigDecimal a = new BigDecimal(val.doubleValue()); + BigDecimal b = new BigDecimal(expectedVal.doubleValue()); return compareValue(a, b, eps); } public static boolean compareValue(Long val, Long expectedVal, int eps) { - BigDecimal a = new BigDecimal(val); - BigDecimal b = new BigDecimal(expectedVal); + BigDecimal a = new BigDecimal(val.longValue()); + BigDecimal b = new BigDecimal(expectedVal.longValue()); return compareValue(a, b, eps); }
diff --git a/tck/src/main/java/com/sun/ts/tests/el/common/util/SimpleBean.java b/tck/src/main/java/com/sun/ts/tests/el/common/util/SimpleBean.java index 628464e..0fd924f 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/common/util/SimpleBean.java +++ b/tck/src/main/java/com/sun/ts/tests/el/common/util/SimpleBean.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2021 Oracle and/or its affiliates and others. + * Copyright (c) 2007, 2025 Oracle and/or its affiliates and others. * All rights reserved. * * This program and the accompanying materials are made available under the @@ -55,7 +55,7 @@ * pattern. */ public boolean isName(String firstName, String lastName) { - boolean result = Boolean.FALSE; + boolean result = false; String testName = firstName + " " + lastName; if (testName.equals(fullName)) {
diff --git a/tck/src/main/java/com/sun/ts/tests/el/common/util/TestNum.java b/tck/src/main/java/com/sun/ts/tests/el/common/util/TestNum.java index 3352ece..448b589 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/common/util/TestNum.java +++ b/tck/src/main/java/com/sun/ts/tests/el/common/util/TestNum.java
@@ -70,13 +70,13 @@ numberList = new ArrayList<>(); - numberList.add(BigDecimal.valueOf(Long.valueOf(COMPARATOR))); + numberList.add(BigDecimal.valueOf(Long.parseLong(COMPARATOR))); numberList.add(Double.valueOf(COMPARATOR)); numberList.add(Float.valueOf(COMPARATOR)); numberList.add(COMPARATOR + ".0"); numberList.add(COMPARATOR + "e0"); numberList.add(COMPARATOR + "E0"); - numberList.add(BigInteger.valueOf(Long.valueOf(COMPARATOR))); + numberList.add(BigInteger.valueOf(Long.parseLong(COMPARATOR))); numberList.add(Long.valueOf(COMPARATOR)); numberList.add(Integer.valueOf(COMPARATOR)); numberList.add(Short.valueOf(COMPARATOR));
diff --git a/tck/src/main/java/com/sun/ts/tests/el/common/util/TypesBean.java b/tck/src/main/java/com/sun/ts/tests/el/common/util/TypesBean.java index 5f5c9be..e5ceec3 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/common/util/TypesBean.java +++ b/tck/src/main/java/com/sun/ts/tests/el/common/util/TypesBean.java
@@ -35,14 +35,14 @@ private static HashMap<Class<?>, String> numberMap; private BigDecimal tckBigDecimal = BigDecimal - .valueOf(Long.valueOf(COMPARATOR)); + .valueOf(Long.parseLong(COMPARATOR)); private Double tckDouble = Double.valueOf(COMPARATOR); private Float tckFloat = Float.valueOf(COMPARATOR); private BigInteger tckBigInteger = BigInteger - .valueOf(Long.valueOf(COMPARATOR)); + .valueOf(Long.parseLong(COMPARATOR)); private Long tckLong = Long.valueOf(COMPARATOR); @@ -52,7 +52,7 @@ private Byte tckByte = Byte.valueOf(COMPARATOR); - private Boolean tckBoolean = true; + private Boolean tckBoolean = Boolean.TRUE; private Byte tckNull = null;
diff --git a/tck/src/main/java/com/sun/ts/tests/el/common/util/Validator.java b/tck/src/main/java/com/sun/ts/tests/el/common/util/Validator.java index 0299029..b91a4b4 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/common/util/Validator.java +++ b/tck/src/main/java/com/sun/ts/tests/el/common/util/Validator.java
@@ -197,7 +197,7 @@ "Setting Expected Type: " + returnType.getCanonicalName()); pass = (ExprEval.compareClass(result, returnType) - && ExprEval.compareValue(((BigDecimal) result).floatValue(), + && ExprEval.compareValue(Float.valueOf(((BigDecimal) result).floatValue()), (Float) expectedVal, 3)); } else { returnType = Double.class; @@ -296,7 +296,7 @@ "Setting Expected Type: " + returnType.getCanonicalName()); pass = (ExprEval.compareClass(result, returnType) - && ExprEval.compareValue(((BigDecimal) result).doubleValue(), + && ExprEval.compareValue(Double.valueOf(((BigDecimal) result).doubleValue()), expectedVal)); } else { returnType = Double.class; @@ -391,7 +391,7 @@ "Setting Expected Type: " + returnType.getCanonicalName()); pass = (ExprEval.compareClass(result, returnType) - && ExprEval.compareValue(((BigDecimal) result).doubleValue(), + && ExprEval.compareValue(Double.valueOf(((BigDecimal) result).doubleValue()), expectedVal)); } else { returnType = Double.class; @@ -583,7 +583,7 @@ pass = (ExprEval.compareClass(result, returnType) && ExprEval.compareValue(result, - ((Long) expectedVal).doubleValue())); + Double.valueOf(((Long) expectedVal).doubleValue()))); } else { returnType = Long.class; logger.log(Logger.Level.INFO, @@ -677,7 +677,7 @@ pass = (ExprEval.compareClass(result, returnType) && ExprEval.compareValue(result, - ((Integer) expectedVal).doubleValue())); + Double.valueOf(((Integer) expectedVal).doubleValue()))); } else { returnType = Long.class; logger.log(Logger.Level.INFO, @@ -685,7 +685,7 @@ pass = (ExprEval.compareClass(result, returnType) && ExprEval.compareValue(result, - ((Integer) expectedVal).longValue())); + Long.valueOf(((Integer) expectedVal).longValue()))); } } catch (RuntimeException re) { @@ -770,14 +770,14 @@ pass = (ExprEval.compareClass(result, returnType) && ExprEval.compareValue(result, - ((Short) expectedVal).doubleValue())); + Double.valueOf(((Short) expectedVal).doubleValue()))); } else { returnType = Long.class; logger.log(Logger.Level.INFO, "Setting Expected Type: " + returnType.getCanonicalName()); pass = (ExprEval.compareClass(result, returnType) && ExprEval - .compareValue(result, ((Short) expectedVal).longValue())); + .compareValue(result, Long.valueOf(((Short) expectedVal).longValue()))); } } catch (RuntimeException re) { @@ -861,14 +861,14 @@ pass = (ExprEval.compareClass(result, returnType) && ExprEval.compareValue(result, - ((Byte) expectedVal).doubleValue())); + Double.valueOf(((Byte) expectedVal).doubleValue()))); } else { returnType = Long.class; logger.log(Logger.Level.INFO, "Setting Expected Type: " + returnType.getCanonicalName()); pass = (ExprEval.compareClass(result, returnType) && ExprEval - .compareValue(result, ((Byte) expectedVal).longValue())); + .compareValue(result, Long.valueOf(((Byte) expectedVal).longValue()))); } } catch (RuntimeException re) { @@ -909,8 +909,7 @@ boolean pass = false; - NameValuePair values[] = NameValuePair.buildNameValuePair(testValOne, - testValTwo); + NameValuePair values[] = NameValuePair.buildNameValuePair(Boolean.valueOf(testValOne), testValTwo); try { logger.log(Logger.Level.INFO, @@ -927,7 +926,7 @@ * them. (NEW to EL 3.0) */ if ("+=".equals(operator)) { - pass = Validator.runConcatenationTest(testValOne, result, testValTwo); + pass = Validator.runConcatenationTest(Boolean.valueOf(testValOne), result, testValTwo); } else { logger.log(Logger.Level.INFO, "result is " + result.toString()); @@ -984,7 +983,7 @@ // ------------------------- private methods - private static Boolean runConcatenationTest(Object testVal, Object result, + private static boolean runConcatenationTest(Object testVal, Object result, Object testNum) { Class<String> returnType = String.class;
diff --git a/tck/src/main/java/com/sun/ts/tests/el/spec/binaryoperator/ELClientIT.java b/tck/src/main/java/com/sun/ts/tests/el/spec/binaryoperator/ELClientIT.java index dcd55a9..22ffeb4 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/spec/binaryoperator/ELClientIT.java +++ b/tck/src/main/java/com/sun/ts/tests/el/spec/binaryoperator/ELClientIT.java
@@ -447,7 +447,7 @@ // For each float in validate List. for (Iterator<?> it = TestNum.getFloatList().iterator(); it.hasNext();) { Float testValue = (Float) it.next(); - expectedResult = testValue + Float.valueOf("1.0"); + expectedResult = Float.valueOf(testValue.floatValue() + Float.valueOf("1.0").floatValue()); Validator.testFloat(testValue, expectedResult, "+"); } @@ -471,7 +471,7 @@ // For each float in validate List. for (Iterator<?> it = TestNum.getFloatList().iterator(); it.hasNext();) { Float testValue = (Float) it.next(); - expectedResult = testValue - Float.valueOf("1.0"); + expectedResult = Float.valueOf(testValue.floatValue() - Float.valueOf("1.0").floatValue()); Validator.testFloat(testValue, expectedResult, "-"); } @@ -495,7 +495,7 @@ // For each float in validate List. for (Iterator<?> it = TestNum.getFloatList().iterator(); it.hasNext();) { Float testValue = (Float) it.next(); - expectedResult = testValue * Float.valueOf("1.0"); + expectedResult = Float.valueOf(testValue.floatValue() * Float.valueOf("1.0").floatValue()); Validator.testFloat(testValue, expectedResult, "*"); } @@ -519,7 +519,7 @@ // For each float in validate List. for (Iterator<?> it = TestNum.getFloatList().iterator(); it.hasNext();) { Float testValue = (Float) it.next(); - expectedResult = testValue / Float.valueOf("1.0"); + expectedResult = Float.valueOf(testValue.floatValue() / Float.valueOf("1.0").floatValue()); Validator.testFloat(testValue, expectedResult, "/"); } @@ -543,7 +543,7 @@ // For each float in validate List. for (Iterator<?> it = TestNum.getFloatList().iterator(); it.hasNext();) { Float testValue = (Float) it.next(); - expectedResult = testValue % Float.valueOf("1.0"); + expectedResult = Float.valueOf(testValue.floatValue() % Float.valueOf("1.0").floatValue()); Validator.testFloat(testValue, expectedResult, "%"); } @@ -1144,11 +1144,11 @@ @Test public void elBooleanAndTest() throws Exception { - Validator.testBoolean(true, "true", true, "&&"); - Validator.testBoolean(true, true, true, "&&"); + Validator.testBoolean(true, "true", Boolean.TRUE, "&&"); + Validator.testBoolean(true, Boolean.TRUE, Boolean.TRUE, "&&"); - Validator.testBoolean(true, "false", false, "and"); - Validator.testBoolean(true, false, false, "and"); + Validator.testBoolean(true, "false", Boolean.FALSE, "and"); + Validator.testBoolean(true, Boolean.FALSE, Boolean.FALSE, "and"); } @@ -1165,11 +1165,11 @@ @Test public void elBooleanOrTest() throws Exception { - Validator.testBoolean(false, "false", false, "||"); - Validator.testBoolean(true, "false", true, "or"); + Validator.testBoolean(false, "false", Boolean.FALSE, "||"); + Validator.testBoolean(true, "false", Boolean.TRUE, "or"); - Validator.testBoolean(true, false, true, "||"); - Validator.testBoolean(true, true, true, "or"); + Validator.testBoolean(true, Boolean.FALSE, Boolean.TRUE, "||"); + Validator.testBoolean(true, Boolean.TRUE, Boolean.TRUE, "or"); }
diff --git a/tck/src/main/java/com/sun/ts/tests/el/spec/coercion/ELClientIT.java b/tck/src/main/java/com/sun/ts/tests/el/spec/coercion/ELClientIT.java index ea2576c..5132837 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/spec/coercion/ELClientIT.java +++ b/tck/src/main/java/com/sun/ts/tests/el/spec/coercion/ELClientIT.java
@@ -497,14 +497,14 @@ Class<?> expectedClass = String.class; - Boolean boo = false; // result1 - Byte bite = 0; // result2 - Character funny = '1'; // result3 - Short tee = 2; // result4 - Integer i = 3; // result5 - Long rope = 4L; // result6 - Float ter = 5.5f; // result7 - Double down = 6.5d; // result8 + Boolean boo = Boolean.FALSE; // result1 + Byte bite = Byte.valueOf((byte) 0); // result2 + Character funny = Character.valueOf('1'); // result3 + Short tee = Short.valueOf((short) 2); // result4 + Integer i = Integer.valueOf(3); // result5 + Long rope = Long.valueOf(4L); // result6 + Float ter = Float.valueOf(5.5f); // result7 + Double down = Double.valueOf(6.5d); // result8 try { // Boolean to String @@ -616,20 +616,20 @@ Class<?> expectedClass = Character.class; - Byte bite = 7; - Character funny = '1'; - Short tee = 2; - Integer i = 3; - Long rope = 4L; - Float ter = 5f; - Double down = 6.5d; + Byte bite = Byte.valueOf((byte) 7); + Character funny = Character.valueOf('1'); + Short tee = Short.valueOf((short) 2); + Integer i = Integer.valueOf(3); + Long rope = Long.valueOf(4L); + Float ter = Float.valueOf(5f); + Double down = Double.valueOf(6.5d); try { // String to Character result1 = ExprEval.evaluateValueExpression("${'STRING'}", null, expectedClass); pass1 = (ExprEval.compareClass(result1, expectedClass) - && ExprEval.compareValue(result1, 'S')); + && ExprEval.compareValue(result1, Character.valueOf('S'))); // Byte to Character result2 = ExprEval.evaluateValueExpression("${" + bite + "}", null, @@ -1365,10 +1365,10 @@ expectedValue = Double.valueOf(DOUBLE); } else if ("BigInteger".equals(name)) { testValue = BIGINT; - expectedValue = BigInteger.valueOf(Long.valueOf(BIGINT)); + expectedValue = BigInteger.valueOf(Long.parseLong(BIGINT)); } else if ("BigDecimal".equals(name)) { testValue = BIGDEC; - expectedValue = BigDecimal.valueOf(Double.valueOf(BIGDEC)); + expectedValue = BigDecimal.valueOf(Double.parseDouble(BIGDEC)); } else { // Default Values, this should never been utilized. testValue = "0"; @@ -1420,33 +1420,33 @@ name = expectedClass.getSimpleName(); if ("Byte".equals(name)) { - testValue = '1'; + testValue = Character.valueOf('1'); expectedValue = Byte.valueOf("1"); } else if ("Short".equals(name)) { - testValue = '2'; + testValue = Character.valueOf('2'); expectedValue = Short.valueOf("2"); } else if ("Integer".equals(name)) { - testValue = '3'; + testValue = Character.valueOf('3'); expectedValue = Integer.valueOf(3); } else if ("Long".equals(name)) { - testValue = '4'; + testValue = Character.valueOf('4'); expectedValue = Long.valueOf(4L); } else if ("Float".equals(name)) { - testValue = '5'; + testValue = Character.valueOf('5'); expectedValue = Float.valueOf(5f); } else if ("Double".equals(name)) { - testValue = '6'; + testValue = Character.valueOf('6'); expectedValue = Double.valueOf(6d); } else if ("BigInteger".equals(name)) { - testValue = '7'; + testValue = Character.valueOf('7'); expectedValue = BigInteger.valueOf(7); } else if ("BigDecimal".equals(name)) { - testValue = '8'; + testValue = Character.valueOf('8'); expectedValue = BigDecimal.valueOf(8); } else { - // Default Values, this should never been utilized. - testValue = '0'; - expectedValue = '1'; + // Default Values, these should never be utilized. + testValue = Character.valueOf('0'); + expectedValue = Character.valueOf('1'); } try { @@ -1496,16 +1496,16 @@ if ("Byte".equals(name)) { testValue = numberTable.get(testClass); - expectedValue = BigInteger.valueOf(Long.valueOf(BYTE)); + expectedValue = BigInteger.valueOf(Long.parseLong(BYTE)); } else if ("Short".equals(name)) { testValue = numberTable.get(testClass); - expectedValue = BigInteger.valueOf(Long.valueOf(SHORT)); + expectedValue = BigInteger.valueOf(Long.parseLong(SHORT)); } else if ("Integer".equals(name)) { testValue = numberTable.get(testClass); - expectedValue = BigInteger.valueOf(Long.valueOf(INTEGER)); + expectedValue = BigInteger.valueOf(Long.parseLong(INTEGER)); } else if ("Long".equals(name)) { testValue = numberTable.get(testClass); - expectedValue = BigInteger.valueOf(Long.valueOf(LONG)); + expectedValue = BigInteger.valueOf(Long.parseLong(LONG)); } else if ("Float".equals(name)) { testValue = numberTable.get(testClass); expectedValue = BigInteger.valueOf(Float.valueOf(FLOAT).longValue()); @@ -1514,15 +1514,15 @@ expectedValue = BigInteger.valueOf(Double.valueOf(DOUBLE).longValue()); } else if ("BigInteger".equals(name)) { testValue = numberTable.get(testClass); - expectedValue = BigInteger.valueOf(Long.valueOf(BIGINT)); + expectedValue = BigInteger.valueOf(Long.parseLong(BIGINT)); } else if ("BigDecimal".equals(name)) { testValue = numberTable.get(testClass); - expectedValue = BigDecimal.valueOf(Double.valueOf(BIGDEC)) + expectedValue = BigDecimal.valueOf(Double.valueOf(BIGDEC).longValue()) .toBigInteger(); } else { // Default Values, this should never been utilized. testValue = "0"; - expectedValue = BigInteger.valueOf(Long.valueOf("1")); + expectedValue = BigInteger.valueOf(Long.parseLong("1")); } try { @@ -1571,32 +1571,32 @@ if ("Byte".equals(name)) { testValue = numberTable.get(testClass); - expectedValue = BigDecimal.valueOf(Double.valueOf(BYTE)); + expectedValue = BigDecimal.valueOf(Double.parseDouble(BYTE)); } else if ("Short".equals(name)) { testValue = numberTable.get(testClass); - expectedValue = BigDecimal.valueOf(Double.valueOf(SHORT)); + expectedValue = BigDecimal.valueOf(Double.parseDouble(SHORT)); } else if ("Integer".equals(name)) { testValue = numberTable.get(testClass); - expectedValue = BigDecimal.valueOf(Double.valueOf(INTEGER)); + expectedValue = BigDecimal.valueOf(Double.parseDouble(INTEGER)); } else if ("Long".equals(name)) { testValue = numberTable.get(testClass); - expectedValue = BigDecimal.valueOf(Double.valueOf(LONG)); + expectedValue = BigDecimal.valueOf(Double.parseDouble(LONG)); } else if ("Float".equals(name)) { testValue = numberTable.get(testClass); expectedValue = BigDecimal.valueOf(Float.valueOf(FLOAT).doubleValue()); } else if ("Double".equals(name)) { testValue = numberTable.get(testClass); - expectedValue = BigDecimal.valueOf(Double.valueOf(DOUBLE)); + expectedValue = BigDecimal.valueOf(Double.parseDouble(DOUBLE)); } else if ("BigInteger".equals(name)) { testValue = numberTable.get(testClass); - expectedValue = BigDecimal.valueOf(Double.valueOf(BIGINT)); + expectedValue = BigDecimal.valueOf(Double.parseDouble(BIGINT)); } else if ("BigDecimal".equals(name)) { testValue = numberTable.get(testClass); - expectedValue = BigDecimal.valueOf(Double.valueOf(BIGDEC)); + expectedValue = BigDecimal.valueOf(Double.parseDouble(BIGDEC)); } else { // Default Values, this should never been utilized. testValue = "0"; - expectedValue = BigDecimal.valueOf(Double.valueOf("1")); + expectedValue = BigDecimal.valueOf(Double.parseDouble("1")); } try { @@ -1937,8 +1937,7 @@ numberTable.put(Long.class, Long.valueOf(LONG)); numberTable.put(Float.class, Float.valueOf(FLOAT)); numberTable.put(Double.class, Double.valueOf(DOUBLE)); - numberTable.put(BigInteger.class, BigInteger.valueOf(Long.valueOf(BIGINT))); - numberTable.put(BigDecimal.class, - BigDecimal.valueOf(Double.valueOf(BIGDEC))); + numberTable.put(BigInteger.class, BigInteger.valueOf(Long.parseLong(BIGINT))); + numberTable.put(BigDecimal.class, BigDecimal.valueOf(Double.parseDouble(BIGDEC))); } }
diff --git a/tck/src/main/java/com/sun/ts/tests/el/spec/collectionoperators/ELClientIT.java b/tck/src/main/java/com/sun/ts/tests/el/spec/collectionoperators/ELClientIT.java index a811f85..b490f0a 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/spec/collectionoperators/ELClientIT.java +++ b/tck/src/main/java/com/sun/ts/tests/el/spec/collectionoperators/ELClientIT.java
@@ -256,10 +256,10 @@ buildELContext(); testIterable("anyMatch_True", - "products.stream().anyMatch(p->p.unitPrice >= 10)", true); + "products.stream().anyMatch(p->p.unitPrice >= 10)", Boolean.TRUE); testIterable("anyMatch_False", - "products.stream().anyMatch(p->p.unitPrice == 100)", false); + "products.stream().anyMatch(p->p.unitPrice == 100)", Boolean.FALSE); } // End elCollectionAnyMatchTest() @@ -278,10 +278,10 @@ buildELContext(); testIterable("noneMatch_False", - "products.stream().noneMatch(p->p.unitPrice >= 10)", false); + "products.stream().noneMatch(p->p.unitPrice >= 10)", Boolean.FALSE); testIterable("noneMatch_True", - "products.stream().noneMatch(p->p.unitPrice == 100)", true); + "products.stream().noneMatch(p->p.unitPrice == 100)", Boolean.TRUE); } // End elCollectionNoneMatchTest() @@ -300,10 +300,10 @@ buildELContext(); testIterable("allMatch_true", - "products.stream().allMatch(p->p.unitPrice >= 1)", true); + "products.stream().allMatch(p->p.unitPrice >= 1)", Boolean.TRUE); testIterable("allMatch_false", - "products.stream().allMatch(p->p.unitPrice == 100)", false); + "products.stream().allMatch(p->p.unitPrice == 100)", Boolean.FALSE); } // End elCollectionAllMatchTest()
diff --git a/tck/src/main/java/com/sun/ts/tests/el/spec/concatoperator/ELClientIT.java b/tck/src/main/java/com/sun/ts/tests/el/spec/concatoperator/ELClientIT.java index 3271ac8..a9269f7 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/spec/concatoperator/ELClientIT.java +++ b/tck/src/main/java/com/sun/ts/tests/el/spec/concatoperator/ELClientIT.java
@@ -255,7 +255,7 @@ * the '+=' operator! */ Validator.testBoolean(false, "true", null, "+="); - Validator.testBoolean(false, true, null, "+="); + Validator.testBoolean(false, Boolean.TRUE, null, "+="); }
diff --git a/tck/src/main/java/com/sun/ts/tests/el/spec/conditionaloperator/ELClientIT.java b/tck/src/main/java/com/sun/ts/tests/el/spec/conditionaloperator/ELClientIT.java index 7c6be35..9447732 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/spec/conditionaloperator/ELClientIT.java +++ b/tck/src/main/java/com/sun/ts/tests/el/spec/conditionaloperator/ELClientIT.java
@@ -96,7 +96,7 @@ boolean pass = false; NameValuePair value[] = NameValuePair.buildConditionalNameValue(testVal, - true, false); + Boolean.TRUE, Boolean.FALSE); try { for (boolean tf : deferred) { @@ -106,7 +106,7 @@ logger.log(Logger.Level.TRACE, "result is " + result.toString()); pass = (ExprEval.compareClass(result, Boolean.class) - && ExprEval.compareValue((Boolean) result, expectedResult)); + && ExprEval.compareValue((Boolean) result, Boolean.valueOf(expectedResult))); if (!pass) throw new Exception("TEST FAILED: pass = false"); @@ -121,8 +121,8 @@ boolean pass = false; - NameValuePair value[] = NameValuePair.buildConditionalNameValue(testVal, - true, false); + NameValuePair value[] = NameValuePair.buildConditionalNameValue(Boolean.valueOf(testVal), + Boolean.TRUE, Boolean.FALSE); try { for (boolean tf : deferred) { @@ -132,7 +132,7 @@ logger.log(Logger.Level.TRACE, "result is " + result.toString()); pass = (ExprEval.compareClass(result, Boolean.class) - && ExprEval.compareValue((Boolean) result, expectedResult)); + && ExprEval.compareValue((Boolean) result, Boolean.valueOf(expectedResult))); if (!pass) throw new Exception("TEST FAILED: pass = false");
diff --git a/tck/src/main/java/com/sun/ts/tests/el/spec/emptyoperator/ELClientIT.java b/tck/src/main/java/com/sun/ts/tests/el/spec/emptyoperator/ELClientIT.java index 9a78d9e..b902a21 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/spec/emptyoperator/ELClientIT.java +++ b/tck/src/main/java/com/sun/ts/tests/el/spec/emptyoperator/ELClientIT.java
@@ -84,7 +84,7 @@ } pass = (ExprEval.compareClass(result, Boolean.class) - && ExprEval.compareValue((Boolean) result, expectedResult)); + && ExprEval.compareValue((Boolean) result, Boolean.valueOf(expectedResult))); if (!pass) throw new Exception("TEST FAILED: pass = false"); @@ -193,7 +193,7 @@ logger.log(Logger.Level.TRACE, "result is " + result.toString()); pass = (ExprEval.compareClass(result, Boolean.class) - && ExprEval.compareValue((Boolean) result, expectedResult)); + && ExprEval.compareValue((Boolean) result, Boolean.valueOf(expectedResult))); if (!pass) throw new Exception("TEST FAILED: pass = false");
diff --git a/tck/src/main/java/com/sun/ts/tests/el/spec/language/ELClientIT.java b/tck/src/main/java/com/sun/ts/tests/el/spec/language/ELClientIT.java index 5101264..b22de12 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/spec/language/ELClientIT.java +++ b/tck/src/main/java/com/sun/ts/tests/el/spec/language/ELClientIT.java
@@ -416,7 +416,7 @@ Boolean.class); pass = (ExprEval.compareClass(expr, Boolean.class) - && ExprEval.compareValue(expr, true)); + && ExprEval.compareValue(expr, Boolean.TRUE)); } catch (Exception e) { ELTestUtil.printStackTrace(e);
diff --git a/tck/src/main/java/com/sun/ts/tests/el/spec/literal/ELClientIT.java b/tck/src/main/java/com/sun/ts/tests/el/spec/literal/ELClientIT.java index 665d9e9..faff314 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/spec/literal/ELClientIT.java +++ b/tck/src/main/java/com/sun/ts/tests/el/spec/literal/ELClientIT.java
@@ -124,7 +124,7 @@ for (Iterator<Integer> it = ilist.iterator(); it.hasNext();) { Integer tInteger = it.next(); - expectedResult = Long.valueOf(tInteger); + expectedResult = Long.valueOf(tInteger.longValue()); // test "$" symbol try { @@ -180,7 +180,7 @@ for (Iterator<Float> it = flist.iterator(); it.hasNext();) { Float tFloat = it.next(); - expectedResult = Float.valueOf(tFloat); + expectedResult = tFloat; // test "$" symbol try { @@ -392,10 +392,10 @@ private List<Integer> getIntegerList() { List<Integer> integerList = new ArrayList<>(); - integerList.add(1); - integerList.add(-2); - integerList.add(2147483647); - integerList.add(-2147483647); + integerList.add(Integer.valueOf(1)); + integerList.add(Integer.valueOf(-2)); + integerList.add(Integer.valueOf(2147483647)); + integerList.add(Integer.valueOf(-2147483647)); return integerList; }
diff --git a/tck/src/main/java/com/sun/ts/tests/el/spec/operatorprecedence/ELClientIT.java b/tck/src/main/java/com/sun/ts/tests/el/spec/operatorprecedence/ELClientIT.java index 1644b01..049b9f8 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/spec/operatorprecedence/ELClientIT.java +++ b/tck/src/main/java/com/sun/ts/tests/el/spec/operatorprecedence/ELClientIT.java
@@ -143,19 +143,19 @@ @Test public void elMultiPreRelationalTest() throws Exception { - this.testOrderPrecedence("{6 > 5 * 2}", false); - this.testOrderPrecedence("{3 * 2 < 8}", true); - this.testOrderPrecedence("{6 >= 5 * 2}", false); - this.testOrderPrecedence("{6 * 2 <= 12}", true); - this.testOrderPrecedence("{5 * 1 gt 6}", false); - this.testOrderPrecedence("{6 lt 5 * 2}", true); - this.testOrderPrecedence("{5 * 1 ge 6}", false); - this.testOrderPrecedence("{6 le 5 * 2}", true); + this.testOrderPrecedence("{6 > 5 * 2}", Boolean.FALSE); + this.testOrderPrecedence("{3 * 2 < 8}", Boolean.TRUE); + this.testOrderPrecedence("{6 >= 5 * 2}", Boolean.FALSE); + this.testOrderPrecedence("{6 * 2 <= 12}", Boolean.TRUE); + this.testOrderPrecedence("{5 * 1 gt 6}", Boolean.FALSE); + this.testOrderPrecedence("{6 lt 5 * 2}", Boolean.TRUE); + this.testOrderPrecedence("{5 * 1 ge 6}", Boolean.FALSE); + this.testOrderPrecedence("{6 le 5 * 2}", Boolean.TRUE); - this.testOrderPrecedence("{5 == 5 * 2}", false); - this.testOrderPrecedence("{5 * 2 != 10}", false); - this.testOrderPrecedence("{10 eq 5 * 2}", true); - this.testOrderPrecedence("{15 * 1 ne 1}", true); + this.testOrderPrecedence("{5 == 5 * 2}", Boolean.FALSE); + this.testOrderPrecedence("{5 * 2 != 10}", Boolean.FALSE); + this.testOrderPrecedence("{10 eq 5 * 2}", Boolean.TRUE); + this.testOrderPrecedence("{15 * 1 ne 1}", Boolean.TRUE); } @@ -179,19 +179,19 @@ public void elDivPreRelationalTest() throws Exception { for (String s : DIVOPER) { - this.testOrderPrecedence("{3 > 4 " + s + " 2}", true); - this.testOrderPrecedence("{12 " + s + " 2 < 5}", false); - this.testOrderPrecedence("{4 >= 6 " + s + " 24}", true); - this.testOrderPrecedence("{16 " + s + " 2 <= 5}", false); - this.testOrderPrecedence("{6 gt 5 " + s + " 2}", true); - this.testOrderPrecedence("{12 " + s + " 1 lt 5}", false); - this.testOrderPrecedence("{6 ge 5 " + s + " 2}", true); - this.testOrderPrecedence("{50 " + s + " 2 le 5}", false); + this.testOrderPrecedence("{3 > 4 " + s + " 2}", Boolean.TRUE); + this.testOrderPrecedence("{12 " + s + " 2 < 5}", Boolean.FALSE); + this.testOrderPrecedence("{4 >= 6 " + s + " 24}", Boolean.TRUE); + this.testOrderPrecedence("{16 " + s + " 2 <= 5}", Boolean.FALSE); + this.testOrderPrecedence("{6 gt 5 " + s + " 2}", Boolean.TRUE); + this.testOrderPrecedence("{12 " + s + " 1 lt 5}", Boolean.FALSE); + this.testOrderPrecedence("{6 ge 5 " + s + " 2}", Boolean.TRUE); + this.testOrderPrecedence("{50 " + s + " 2 le 5}", Boolean.FALSE); - this.testOrderPrecedence("{1 == 2 " + s + " 2}", true); - this.testOrderPrecedence("{10 " + s + " 5 != 5}", true); - this.testOrderPrecedence("{5 eq 5 " + s + " 2}", false); - this.testOrderPrecedence("{2 ne 4 " + s + " 2}", false); + this.testOrderPrecedence("{1 == 2 " + s + " 2}", Boolean.TRUE); + this.testOrderPrecedence("{10 " + s + " 5 != 5}", Boolean.TRUE); + this.testOrderPrecedence("{5 eq 5 " + s + " 2}", Boolean.FALSE); + this.testOrderPrecedence("{2 ne 4 " + s + " 2}", Boolean.FALSE); } } @@ -216,19 +216,19 @@ public void elModPreRelationalTest() throws Exception { for (String s : MODOPER) { - this.testOrderPrecedence("{4 " + s + " 15 > 1}", true); - this.testOrderPrecedence("{5 < 6 " + s + " 2}", false); - this.testOrderPrecedence("{6 " + s + " 29 >= 5}", true); - this.testOrderPrecedence("{6 <= 5 " + s + " 2}", false); - this.testOrderPrecedence("{3 " + s + " 8 gt 1}", true); - this.testOrderPrecedence("{6 lt 5 " + s + " 2}", false); - this.testOrderPrecedence("{8 " + s + " 5 ge 2}", true); - this.testOrderPrecedence("{6 le 5 " + s + " 2}", false); + this.testOrderPrecedence("{4 " + s + " 15 > 1}", Boolean.TRUE); + this.testOrderPrecedence("{5 < 6 " + s + " 2}", Boolean.FALSE); + this.testOrderPrecedence("{6 " + s + " 29 >= 5}", Boolean.TRUE); + this.testOrderPrecedence("{6 <= 5 " + s + " 2}", Boolean.FALSE); + this.testOrderPrecedence("{3 " + s + " 8 gt 1}", Boolean.TRUE); + this.testOrderPrecedence("{6 lt 5 " + s + " 2}", Boolean.FALSE); + this.testOrderPrecedence("{8 " + s + " 5 ge 2}", Boolean.TRUE); + this.testOrderPrecedence("{6 le 5 " + s + " 2}", Boolean.FALSE); - this.testOrderPrecedence("{3 " + s + " 2 == 1}", true); - this.testOrderPrecedence("{5 != 5 " + s + " 2}", true); - this.testOrderPrecedence("{6 " + s + " 2 eq 5}", false); - this.testOrderPrecedence("{2 ne 5 " + s + " 3}", false); + this.testOrderPrecedence("{3 " + s + " 2 == 1}", Boolean.TRUE); + this.testOrderPrecedence("{5 != 5 " + s + " 2}", Boolean.TRUE); + this.testOrderPrecedence("{6 " + s + " 2 eq 5}", Boolean.FALSE); + this.testOrderPrecedence("{2 ne 5 " + s + " 3}", Boolean.FALSE); } } @@ -247,8 +247,8 @@ public void elMultiEqualPreAndTest() throws Exception { for (String a : ANDOPER) { - this.testOrderPrecedence("{10 == 5 * 2 " + a + " 6 * 2 == 15}", false); - this.testOrderPrecedence("{10 == 5 * 2 " + a + " 6 * 2 == 12}", true); + this.testOrderPrecedence("{10 == 5 * 2 " + a + " 6 * 2 == 15}", Boolean.FALSE); + this.testOrderPrecedence("{10 == 5 * 2 " + a + " 6 * 2 == 12}", Boolean.TRUE); } } @@ -269,9 +269,9 @@ for (String d : DIVOPER) { for (String a : ANDOPER) { this.testOrderPrecedence( - "{12 " + d + " 2 == 6 " + a + " 10 " + d + " 2 == 5}", true); + "{12 " + d + " 2 == 6 " + a + " 10 " + d + " 2 == 5}", Boolean.TRUE); this.testOrderPrecedence( - "{12 " + d + " 3 == 6 " + a + " 10 " + d + " 2 == 5}", false); + "{12 " + d + " 3 == 6 " + a + " 10 " + d + " 2 == 5}", Boolean.FALSE); } } @@ -293,9 +293,9 @@ for (String m : MODOPER) { for (String a : ANDOPER) { this.testOrderPrecedence( - "{15 " + m + " 4 == 3 " + a + " 3 " + m + " 3 == 0}", true); + "{15 " + m + " 4 == 3 " + a + " 3 " + m + " 3 == 0}", Boolean.TRUE); this.testOrderPrecedence( - "{15 " + m + " 3 == 3 " + a + " 3 " + m + " 3 == 0}", false); + "{15 " + m + " 3 == 3 " + a + " 3 " + m + " 3 == 0}", Boolean.FALSE); } } @@ -315,9 +315,9 @@ public void elMultiEqualOrCondTest() throws Exception { for (String o : OROPER) { - this.testOrderPrecedence("{10 == 5 * 2 " + o + " 6 * 2 == 15}", true); - this.testOrderPrecedence("{10 == 5 * 5 " + o + " 6 * 2 == 12}", true); - this.testOrderPrecedence("{10 == 5 * 5 " + o + " 6 * 6 == 12}", false); + this.testOrderPrecedence("{10 == 5 * 2 " + o + " 6 * 2 == 15}", Boolean.TRUE); + this.testOrderPrecedence("{10 == 5 * 5 " + o + " 6 * 2 == 12}", Boolean.TRUE); + this.testOrderPrecedence("{10 == 5 * 5 " + o + " 6 * 6 == 12}", Boolean.FALSE); } } @@ -338,11 +338,11 @@ for (String d : DIVOPER) { for (String o : OROPER) { this.testOrderPrecedence( - "{12 " + d + " 2 == 6 " + o + " 10 " + d + " 5 == 5}", true); + "{12 " + d + " 2 == 6 " + o + " 10 " + d + " 5 == 5}", Boolean.TRUE); this.testOrderPrecedence( - "{12 " + d + " 3 == 6 " + o + " 10 " + d + " 2 == 5}", true); + "{12 " + d + " 3 == 6 " + o + " 10 " + d + " 2 == 5}", Boolean.TRUE); this.testOrderPrecedence( - "{12 " + d + " 3 == 6 " + o + " 10 " + d + " 5 == 5}", false); + "{12 " + d + " 3 == 6 " + o + " 10 " + d + " 5 == 5}", Boolean.FALSE); } } @@ -364,11 +364,11 @@ for (String m : MODOPER) { for (String o : OROPER) { this.testOrderPrecedence( - "{15 " + m + " 4 == 3 " + o + " 4 " + m + " 3 == 0}", true); + "{15 " + m + " 4 == 3 " + o + " 4 " + m + " 3 == 0}", Boolean.TRUE); this.testOrderPrecedence( - "{15 " + m + " 3 == 3 " + o + " 3 " + m + " 3 == 0}", true); + "{15 " + m + " 3 == 3 " + o + " 3 " + m + " 3 == 0}", Boolean.TRUE); this.testOrderPrecedence( - "{15 " + m + " 3 == 3 " + o + " 8 " + m + " 3 == 0}", false); + "{15 " + m + " 3 == 3 " + o + " 8 " + m + " 3 == 0}", Boolean.FALSE); } } } @@ -387,8 +387,8 @@ public void elMultiEqualPreCondTest() throws Exception { // These tests are designed to return the false if correct. - this.testOrderPrecedence("{5 * 2 == 10 ? false : true}", false); - this.testOrderPrecedence("{5 * 5 == 10 ? false : true}", true); + this.testOrderPrecedence("{5 * 2 == 10 ? false : true}", Boolean.FALSE); + this.testOrderPrecedence("{5 * 5 == 10 ? false : true}", Boolean.TRUE); } @@ -407,8 +407,8 @@ // These tests are designed to return the false if correct. for (String d : DIVOPER) { - this.testOrderPrecedence("{20 " + d + " 2 == 10 ? false : true}", false); - this.testOrderPrecedence("{24 " + d + " 2 == 10 ? false : true}", true); + this.testOrderPrecedence("{20 " + d + " 2 == 10 ? false : true}", Boolean.FALSE); + this.testOrderPrecedence("{24 " + d + " 2 == 10 ? false : true}", Boolean.TRUE); } } @@ -426,8 +426,8 @@ public void elModEqualPreCondTest() throws Exception { for (String m : MODOPER) { - this.testOrderPrecedence("{21 " + m + " 2 == 1 ? false : true}", false); - this.testOrderPrecedence("{15 " + m + " 3 == 3 ? false : true}", true); + this.testOrderPrecedence("{21 " + m + " 2 == 1 ? false : true}", Boolean.FALSE); + this.testOrderPrecedence("{15 " + m + " 3 == 3 ? false : true}", Boolean.TRUE); } }
diff --git a/tck/src/main/java/com/sun/ts/tests/el/spec/relationaloperator/ELClientIT.java b/tck/src/main/java/com/sun/ts/tests/el/spec/relationaloperator/ELClientIT.java index 6af26d3..5188a3e 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/spec/relationaloperator/ELClientIT.java +++ b/tck/src/main/java/com/sun/ts/tests/el/spec/relationaloperator/ELClientIT.java
@@ -324,13 +324,13 @@ public void elBigDecimalLessThanTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(BigDecimal.valueOf(10.531), false, "<"); + this.testOperatorBoolean(BigDecimal.valueOf(10.531), Boolean.FALSE, "<"); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(BigDecimal.valueOf(1.0000), false, "lt"); + this.testOperatorBoolean(BigDecimal.valueOf(1.0000), Boolean.FALSE, "lt"); // value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(BigDecimal.valueOf(0.531), true, "lt"); + this.testOperatorBoolean(BigDecimal.valueOf(0.531), Boolean.TRUE, "lt"); } @@ -351,13 +351,13 @@ public void elBigDecimalLessThanEqualTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(BigDecimal.valueOf(10.531), false, "<="); + this.testOperatorBoolean(BigDecimal.valueOf(10.531), Boolean.FALSE, "<="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(BigDecimal.valueOf(1.0000), true, "le"); + this.testOperatorBoolean(BigDecimal.valueOf(1.0000), Boolean.TRUE, "le"); // Value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(BigDecimal.valueOf(-10.531), true, "<="); + this.testOperatorBoolean(BigDecimal.valueOf(-10.531), Boolean.TRUE, "<="); } /** @@ -377,13 +377,13 @@ public void elBigDecimalGreaterThanTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(BigDecimal.valueOf(10.531), true, ">"); + this.testOperatorBoolean(BigDecimal.valueOf(10.531), Boolean.TRUE, ">"); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(BigDecimal.valueOf(1.0000), false, ">"); + this.testOperatorBoolean(BigDecimal.valueOf(1.0000), Boolean.FALSE, ">"); // value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(BigDecimal.valueOf(0.531), false, "gt"); + this.testOperatorBoolean(BigDecimal.valueOf(0.531), Boolean.FALSE, "gt"); } @@ -404,13 +404,13 @@ public void elBigDecimalGreaterThanEqualTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(BigDecimal.valueOf(10.531), true, ">="); + this.testOperatorBoolean(BigDecimal.valueOf(10.531), Boolean.TRUE, ">="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(BigDecimal.valueOf(1.0000), true, "ge"); + this.testOperatorBoolean(BigDecimal.valueOf(1.0000), Boolean.TRUE, "ge"); // value passed in is smaller than the COMPARATOR. - this.testOperatorBoolean(BigDecimal.valueOf(-1.0000), false, "ge"); + this.testOperatorBoolean(BigDecimal.valueOf(-1.0000), Boolean.FALSE, "ge"); } @@ -431,10 +431,10 @@ public void elBigDecimalEqualToTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(BigDecimal.valueOf(10.531), false, "=="); + this.testOperatorBoolean(BigDecimal.valueOf(10.531), Boolean.FALSE, "=="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(BigDecimal.valueOf(1), true, "eq"); + this.testOperatorBoolean(BigDecimal.valueOf(1), Boolean.TRUE, "eq"); } @@ -455,10 +455,10 @@ public void elBigDecimalNotEqualToTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(BigDecimal.valueOf(10.531), true, "!="); + this.testOperatorBoolean(BigDecimal.valueOf(10.531), Boolean.TRUE, "!="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(BigDecimal.valueOf(1), false, "ne"); + this.testOperatorBoolean(BigDecimal.valueOf(1), Boolean.FALSE, "ne"); } @@ -478,13 +478,13 @@ public void elFloatLessThanTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Float.valueOf(10f), false, "<"); + this.testOperatorBoolean(Float.valueOf(10f), Boolean.FALSE, "<"); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Float.valueOf(1f), false, "<"); + this.testOperatorBoolean(Float.valueOf(1f), Boolean.FALSE, "<"); // value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Float.valueOf(-10f), true, "lt"); + this.testOperatorBoolean(Float.valueOf(-10f), Boolean.TRUE, "lt"); } @@ -504,13 +504,13 @@ public void elFloatLessThanEqualTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Float.valueOf(10f), false, "<="); + this.testOperatorBoolean(Float.valueOf(10f), Boolean.FALSE, "<="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Float.valueOf(1f), true, "le"); + this.testOperatorBoolean(Float.valueOf(1f), Boolean.TRUE, "le"); // Value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Float.valueOf(-10f), true, "<="); + this.testOperatorBoolean(Float.valueOf(-10f), Boolean.TRUE, "<="); } /** @@ -529,13 +529,13 @@ public void elFloatGreaterThanTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Float.valueOf(10531f), true, ">"); + this.testOperatorBoolean(Float.valueOf(10531f), Boolean.TRUE, ">"); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Float.valueOf(1f), false, ">"); + this.testOperatorBoolean(Float.valueOf(1f), Boolean.FALSE, ">"); // value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Float.valueOf(-531f), false, "gt"); + this.testOperatorBoolean(Float.valueOf(-531f), Boolean.FALSE, "gt"); } @@ -555,13 +555,13 @@ public void elFloatGreaterThanEqualTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Float.valueOf(10531f), true, ">="); + this.testOperatorBoolean(Float.valueOf(10531f), Boolean.TRUE, ">="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Float.valueOf(1f), true, "ge"); + this.testOperatorBoolean(Float.valueOf(1f), Boolean.TRUE, "ge"); // value passed in is smaller than the COMPARATOR. - this.testOperatorBoolean(Float.valueOf(-1f), false, "ge"); + this.testOperatorBoolean(Float.valueOf(-1f), Boolean.FALSE, "ge"); } @@ -581,10 +581,10 @@ public void elFloatEqualToTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Float.valueOf(10531), false, "=="); + this.testOperatorBoolean(Float.valueOf(10531), Boolean.FALSE, "=="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Float.valueOf(1), true, "eq"); + this.testOperatorBoolean(Float.valueOf(1), Boolean.TRUE, "eq"); } @@ -604,10 +604,10 @@ public void elFloatNotEqualToTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Float.valueOf(10531), true, "!="); + this.testOperatorBoolean(Float.valueOf(10531), Boolean.TRUE, "!="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Float.valueOf(1), false, "ne"); + this.testOperatorBoolean(Float.valueOf(1), Boolean.FALSE, "ne"); } @@ -626,13 +626,13 @@ public void elDoubleLessThanTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Double.valueOf(2.5), false, "<"); + this.testOperatorBoolean(Double.valueOf(2.5), Boolean.FALSE, "<"); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Double.valueOf(1.0), false, "lt"); + this.testOperatorBoolean(Double.valueOf(1.0), Boolean.FALSE, "lt"); // value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Double.valueOf(-2.5), true, "lt"); + this.testOperatorBoolean(Double.valueOf(-2.5), Boolean.TRUE, "lt"); } @@ -651,13 +651,13 @@ public void elDoubleLessThanEqualTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Double.valueOf(2.5), false, "<="); + this.testOperatorBoolean(Double.valueOf(2.5), Boolean.FALSE, "<="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Double.valueOf(1.0), true, "le"); + this.testOperatorBoolean(Double.valueOf(1.0), Boolean.TRUE, "le"); // Value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Double.valueOf(-1.5), true, "<="); + this.testOperatorBoolean(Double.valueOf(-1.5), Boolean.TRUE, "<="); } /** @@ -675,13 +675,13 @@ public void elDoubleGreaterThanTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Double.valueOf(10.5), true, ">"); + this.testOperatorBoolean(Double.valueOf(10.5), Boolean.TRUE, ">"); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Double.valueOf(1.0), false, "gt"); + this.testOperatorBoolean(Double.valueOf(1.0), Boolean.FALSE, "gt"); // value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Double.valueOf(-10.5), false, "gt"); + this.testOperatorBoolean(Double.valueOf(-10.5), Boolean.FALSE, "gt"); } @@ -700,13 +700,13 @@ public void elDoubleGreaterThanEqualTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Double.valueOf(10.0), true, ">="); + this.testOperatorBoolean(Double.valueOf(10.0), Boolean.TRUE, ">="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Double.valueOf(1.0), true, "ge"); + this.testOperatorBoolean(Double.valueOf(1.0), Boolean.TRUE, "ge"); // value passed in is smaller than the COMPARATOR. - this.testOperatorBoolean(Double.valueOf(-10.0), false, "ge"); + this.testOperatorBoolean(Double.valueOf(-10.0), Boolean.FALSE, "ge"); } @@ -725,10 +725,10 @@ public void elDoubleEqualToTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Double.valueOf(10531), false, "=="); + this.testOperatorBoolean(Double.valueOf(10531), Boolean.FALSE, "=="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Double.valueOf(1.00), true, "eq"); + this.testOperatorBoolean(Double.valueOf(1.00), Boolean.TRUE, "eq"); } @@ -747,10 +747,10 @@ public void elDoubleNotEqualToTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Double.valueOf(10531), true, "!="); + this.testOperatorBoolean(Double.valueOf(10531), Boolean.TRUE, "!="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Double.valueOf(1), false, "ne"); + this.testOperatorBoolean(Double.valueOf(1), Boolean.FALSE, "ne"); } @@ -769,13 +769,13 @@ public void elBigIntegerLessThanTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(BigInteger.valueOf(10531), false, "<"); + this.testOperatorBoolean(BigInteger.valueOf(10531), Boolean.FALSE, "<"); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(BigInteger.valueOf(1), false, "lt"); + this.testOperatorBoolean(BigInteger.valueOf(1), Boolean.FALSE, "lt"); // value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(BigInteger.valueOf(-10531), true, "lt"); + this.testOperatorBoolean(BigInteger.valueOf(-10531), Boolean.TRUE, "lt"); } @@ -794,13 +794,13 @@ public void elBigIntegerLessThanEqualTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(BigInteger.valueOf(10531), false, "<="); + this.testOperatorBoolean(BigInteger.valueOf(10531), Boolean.FALSE, "<="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(BigInteger.valueOf(1), true, "le"); + this.testOperatorBoolean(BigInteger.valueOf(1), Boolean.TRUE, "le"); // Value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(BigInteger.valueOf(-10531), true, "<="); + this.testOperatorBoolean(BigInteger.valueOf(-10531), Boolean.TRUE, "<="); } /** @@ -818,13 +818,13 @@ public void elBigIntegerGreaterThanTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(BigInteger.valueOf(10531), true, ">"); + this.testOperatorBoolean(BigInteger.valueOf(10531), Boolean.TRUE, ">"); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(BigInteger.valueOf(1), false, "gt"); + this.testOperatorBoolean(BigInteger.valueOf(1), Boolean.FALSE, "gt"); // value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(BigInteger.valueOf(-10531), false, "gt"); + this.testOperatorBoolean(BigInteger.valueOf(-10531), Boolean.FALSE, "gt"); } @@ -843,13 +843,13 @@ public void elBigIntegerGreaterThanEqualTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(BigInteger.valueOf(10531), true, ">="); + this.testOperatorBoolean(BigInteger.valueOf(10531), Boolean.TRUE, ">="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(BigInteger.valueOf(1), true, "ge"); + this.testOperatorBoolean(BigInteger.valueOf(1), Boolean.TRUE, "ge"); // value passed in is smaller than the COMPARATOR. - this.testOperatorBoolean(BigInteger.valueOf(-10531), false, "ge"); + this.testOperatorBoolean(BigInteger.valueOf(-10531), Boolean.FALSE, "ge"); } @@ -868,10 +868,10 @@ public void elBigIntegerEqualToTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(BigInteger.valueOf(10531), false, "=="); + this.testOperatorBoolean(BigInteger.valueOf(10531), Boolean.FALSE, "=="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(BigInteger.valueOf(1), true, "eq"); + this.testOperatorBoolean(BigInteger.valueOf(1), Boolean.TRUE, "eq"); } @@ -890,10 +890,10 @@ public void elBigIntegerNotEqualToTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(BigInteger.valueOf(10531), true, "!="); + this.testOperatorBoolean(BigInteger.valueOf(10531), Boolean.TRUE, "!="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(BigInteger.valueOf(1), false, "ne"); + this.testOperatorBoolean(BigInteger.valueOf(1), Boolean.FALSE, "ne"); } @@ -911,13 +911,13 @@ public void elLongLessThanTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Long.valueOf(25000), false, "<"); + this.testOperatorBoolean(Long.valueOf(25000), Boolean.FALSE, "<"); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Long.valueOf(1), false, "<"); + this.testOperatorBoolean(Long.valueOf(1), Boolean.FALSE, "<"); // value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Long.valueOf(-25000), true, "lt"); + this.testOperatorBoolean(Long.valueOf(-25000), Boolean.TRUE, "lt"); } @@ -935,13 +935,13 @@ public void elLongLessThanEqualTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Long.valueOf(25000), false, "<="); + this.testOperatorBoolean(Long.valueOf(25000), Boolean.FALSE, "<="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Long.valueOf(1), true, "le"); + this.testOperatorBoolean(Long.valueOf(1), Boolean.TRUE, "le"); // Value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Long.valueOf(-25000), true, "<="); + this.testOperatorBoolean(Long.valueOf(-25000), Boolean.TRUE, "<="); } /** @@ -958,13 +958,13 @@ public void elLongGreaterThanTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Long.valueOf(10531), true, ">"); + this.testOperatorBoolean(Long.valueOf(10531), Boolean.TRUE, ">"); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Long.valueOf(1), false, ">"); + this.testOperatorBoolean(Long.valueOf(1), Boolean.FALSE, ">"); // value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Long.valueOf(-10531), false, "gt"); + this.testOperatorBoolean(Long.valueOf(-10531), Boolean.FALSE, "gt"); } @@ -982,13 +982,13 @@ public void elLongGreaterThanEqualTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Long.valueOf(25000), true, ">="); + this.testOperatorBoolean(Long.valueOf(25000), Boolean.TRUE, ">="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Long.valueOf(1), true, "ge"); + this.testOperatorBoolean(Long.valueOf(1), Boolean.TRUE, "ge"); // value passed in is smaller than the COMPARATOR. - this.testOperatorBoolean(Long.valueOf(-25000), false, "ge"); + this.testOperatorBoolean(Long.valueOf(-25000), Boolean.FALSE, "ge"); } @@ -1006,10 +1006,10 @@ public void elLongEqualToTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Long.valueOf(25000), false, "=="); + this.testOperatorBoolean(Long.valueOf(25000), Boolean.FALSE, "=="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Long.valueOf(1), true, "eq"); + this.testOperatorBoolean(Long.valueOf(1), Boolean.TRUE, "eq"); } @@ -1027,10 +1027,10 @@ public void elLongNotEqualToTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Long.valueOf(25000), true, "!="); + this.testOperatorBoolean(Long.valueOf(25000), Boolean.TRUE, "!="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Long.valueOf(1), false, "ne"); + this.testOperatorBoolean(Long.valueOf(1), Boolean.FALSE, "ne"); } @@ -1048,13 +1048,13 @@ public void elIntegerLessThanTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Integer.valueOf(25), false, "<"); + this.testOperatorBoolean(Integer.valueOf(25), Boolean.FALSE, "<"); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Integer.valueOf(1), false, "lt"); + this.testOperatorBoolean(Integer.valueOf(1), Boolean.FALSE, "lt"); // value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Integer.valueOf(-25), true, "lt"); + this.testOperatorBoolean(Integer.valueOf(-25), Boolean.TRUE, "lt"); } @@ -1072,13 +1072,13 @@ public void elIntegerLessThanEqualTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Integer.valueOf(25), false, "<="); + this.testOperatorBoolean(Integer.valueOf(25), Boolean.FALSE, "<="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Integer.valueOf(1), true, "le"); + this.testOperatorBoolean(Integer.valueOf(1), Boolean.TRUE, "le"); // Value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Integer.valueOf(-25), true, "<="); + this.testOperatorBoolean(Integer.valueOf(-25), Boolean.TRUE, "<="); } /** @@ -1095,13 +1095,13 @@ public void elIntegerGreaterThanTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Integer.valueOf(105), true, ">"); + this.testOperatorBoolean(Integer.valueOf(105), Boolean.TRUE, ">"); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Integer.valueOf(1), false, "gt"); + this.testOperatorBoolean(Integer.valueOf(1), Boolean.FALSE, "gt"); // value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Integer.valueOf(-105), false, "gt"); + this.testOperatorBoolean(Integer.valueOf(-105), Boolean.FALSE, "gt"); } @@ -1119,13 +1119,13 @@ public void elIntegerGreaterThanEqualTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Integer.valueOf(250), true, ">="); + this.testOperatorBoolean(Integer.valueOf(250), Boolean.TRUE, ">="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Integer.valueOf(1), true, "ge"); + this.testOperatorBoolean(Integer.valueOf(1), Boolean.TRUE, "ge"); // value passed in is smaller than the COMPARATOR. - this.testOperatorBoolean(Integer.valueOf(-250), false, "ge"); + this.testOperatorBoolean(Integer.valueOf(-250), Boolean.FALSE, "ge"); } @@ -1143,10 +1143,10 @@ public void elIntegerEqualToTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Integer.valueOf(25), false, "=="); + this.testOperatorBoolean(Integer.valueOf(25), Boolean.FALSE, "=="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Integer.valueOf(1), true, "eq"); + this.testOperatorBoolean(Integer.valueOf(1), Boolean.TRUE, "eq"); } @@ -1164,10 +1164,10 @@ public void elIntegerNotEqualToTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Integer.valueOf(25), true, "!="); + this.testOperatorBoolean(Integer.valueOf(25), Boolean.TRUE, "!="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Integer.valueOf(1), false, "ne"); + this.testOperatorBoolean(Integer.valueOf(1), Boolean.FALSE, "ne"); } @@ -1185,13 +1185,13 @@ public void elShortLessThanTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Short.valueOf("2"), false, "<"); + this.testOperatorBoolean(Short.valueOf("2"), Boolean.FALSE, "<"); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Short.valueOf("1"), false, "<"); + this.testOperatorBoolean(Short.valueOf("1"), Boolean.FALSE, "<"); // value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Short.valueOf("-2"), true, "lt"); + this.testOperatorBoolean(Short.valueOf("-2"), Boolean.TRUE, "lt"); } @@ -1209,13 +1209,13 @@ public void elShortLessThanEqualTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Short.valueOf("2"), false, "<="); + this.testOperatorBoolean(Short.valueOf("2"), Boolean.FALSE, "<="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Short.valueOf("1"), true, "le"); + this.testOperatorBoolean(Short.valueOf("1"), Boolean.TRUE, "le"); // Value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Short.valueOf("-2"), true, "<="); + this.testOperatorBoolean(Short.valueOf("-2"), Boolean.TRUE, "<="); } /** @@ -1232,13 +1232,13 @@ public void elShortGreaterThanTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Short.valueOf("2"), true, ">"); + this.testOperatorBoolean(Short.valueOf("2"), Boolean.TRUE, ">"); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Short.valueOf("1"), false, ">"); + this.testOperatorBoolean(Short.valueOf("1"), Boolean.FALSE, ">"); // value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Short.valueOf("-2"), false, "gt"); + this.testOperatorBoolean(Short.valueOf("-2"), Boolean.FALSE, "gt"); } @@ -1256,13 +1256,13 @@ public void elShortGreaterThanEqualTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Short.valueOf("2"), true, ">="); + this.testOperatorBoolean(Short.valueOf("2"), Boolean.TRUE, ">="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Short.valueOf("1"), true, "ge"); + this.testOperatorBoolean(Short.valueOf("1"), Boolean.TRUE, "ge"); // value passed in is smaller than the COMPARATOR. - this.testOperatorBoolean(Short.valueOf("-2"), false, "ge"); + this.testOperatorBoolean(Short.valueOf("-2"), Boolean.FALSE, "ge"); } @@ -1280,10 +1280,10 @@ public void elShortEqualToTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Short.valueOf("2"), false, "=="); + this.testOperatorBoolean(Short.valueOf("2"), Boolean.FALSE, "=="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Short.valueOf("1"), true, "eq"); + this.testOperatorBoolean(Short.valueOf("1"), Boolean.TRUE, "eq"); } @@ -1301,10 +1301,10 @@ public void elShortNotEqualToTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Short.valueOf("2"), true, "!="); + this.testOperatorBoolean(Short.valueOf("2"), Boolean.TRUE, "!="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Short.valueOf("1"), false, "ne"); + this.testOperatorBoolean(Short.valueOf("1"), Boolean.FALSE, "ne"); } @@ -1321,13 +1321,13 @@ public void elByteLessThanTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Byte.valueOf("2"), false, "<"); + this.testOperatorBoolean(Byte.valueOf("2"), Boolean.FALSE, "<"); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Byte.valueOf("1"), false, "lt"); + this.testOperatorBoolean(Byte.valueOf("1"), Boolean.FALSE, "lt"); // value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Byte.valueOf("-2"), true, "lt"); + this.testOperatorBoolean(Byte.valueOf("-2"), Boolean.TRUE, "lt"); } @@ -1344,13 +1344,13 @@ public void elByteLessThanEqualTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Byte.valueOf("2"), false, "<="); + this.testOperatorBoolean(Byte.valueOf("2"), Boolean.FALSE, "<="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Byte.valueOf("1"), true, "le"); + this.testOperatorBoolean(Byte.valueOf("1"), Boolean.TRUE, "le"); // Value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Byte.valueOf("-2"), true, "<="); + this.testOperatorBoolean(Byte.valueOf("-2"), Boolean.TRUE, "<="); } /** @@ -1366,13 +1366,13 @@ public void elByteGreaterThanTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Byte.valueOf("2"), true, ">"); + this.testOperatorBoolean(Byte.valueOf("2"), Boolean.TRUE, ">"); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Byte.valueOf("1"), false, "gt"); + this.testOperatorBoolean(Byte.valueOf("1"), Boolean.FALSE, "gt"); // value passed in is smaller than COMPARATOR. - this.testOperatorBoolean(Byte.valueOf("-2"), false, "gt"); + this.testOperatorBoolean(Byte.valueOf("-2"), Boolean.FALSE, "gt"); } @@ -1389,13 +1389,13 @@ public void elByteGreaterThanEqualTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Byte.valueOf("2"), true, ">="); + this.testOperatorBoolean(Byte.valueOf("2"), Boolean.TRUE, ">="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Byte.valueOf("1"), true, "ge"); + this.testOperatorBoolean(Byte.valueOf("1"), Boolean.TRUE, "ge"); // value passed in is smaller than the COMPARATOR. - this.testOperatorBoolean(Byte.valueOf("-2"), false, "ge"); + this.testOperatorBoolean(Byte.valueOf("-2"), Boolean.FALSE, "ge"); } @@ -1412,10 +1412,10 @@ public void elByteEqualToTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Byte.valueOf("2"), false, "=="); + this.testOperatorBoolean(Byte.valueOf("2"), Boolean.FALSE, "=="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Byte.valueOf("1"), true, "eq"); + this.testOperatorBoolean(Byte.valueOf("1"), Boolean.TRUE, "eq"); } @@ -1432,10 +1432,10 @@ public void elByteNotEqualToTest() throws Exception { // Value passed in is larger than COMPARATOR. - this.testOperatorBoolean(Byte.valueOf("2"), true, "!="); + this.testOperatorBoolean(Byte.valueOf("2"), Boolean.TRUE, "!="); // value passed in is equal to the COMPARATOR. - this.testOperatorBoolean(Byte.valueOf("1"), false, "ne"); + this.testOperatorBoolean(Byte.valueOf("1"), Boolean.FALSE, "ne"); } @@ -1452,13 +1452,13 @@ public void elStringLessThanTest() throws Exception { // Value A is less than value B. (true) - this.testOperatorBoolean("Alpha", DT, true, "<"); + this.testOperatorBoolean("Alpha", DT, Boolean.TRUE, "<"); // Value A is less than value B. (false) - this.testOperatorBoolean("Beta", DT, false, "lt"); + this.testOperatorBoolean("Beta", DT, Boolean.FALSE, "lt"); - // Value A is less than value B. (true) - this.testOperatorBoolean("Gamma", DT, false, "lt"); + // Value A is less than value B. (false) + this.testOperatorBoolean("Gamma", DT, Boolean.FALSE, "lt"); } @@ -1475,13 +1475,13 @@ public void elStringLessThanEqualTest() throws Exception { // Value A is less than or equal to value B. (false) - this.testOperatorBoolean("Gamma", DT, false, "<="); + this.testOperatorBoolean("Gamma", DT, Boolean.FALSE, "<="); // Value A is less than or equal to value B. (true) - this.testOperatorBoolean("Beta", DT, true, "le"); + this.testOperatorBoolean("Beta", DT, Boolean.TRUE, "le"); // Value A is less than or equal to value B. (true) - this.testOperatorBoolean("Alpha", DT, true, "<="); + this.testOperatorBoolean("Alpha", DT, Boolean.TRUE, "<="); } /** @@ -1496,14 +1496,14 @@ @Test public void elStringGreaterThanTest() throws Exception { - // Value A is greater than value B. (false) - this.testOperatorBoolean("Gamma", DT, true, ">"); + // Value A is greater than value B. (true) + this.testOperatorBoolean("Gamma", DT, Boolean.TRUE, ">"); // Value A greater than value B. (false) - this.testOperatorBoolean("Beta", DT, false, "gt"); + this.testOperatorBoolean("Beta", DT, Boolean.FALSE, "gt"); // Value A is greater than value B. (false) - this.testOperatorBoolean("Alpha", DT, false, "gt"); + this.testOperatorBoolean("Alpha", DT, Boolean.FALSE, "gt"); } @@ -1520,13 +1520,13 @@ public void elStringGreaterThanEqualTest() throws Exception { // Value A is greater than or equal to value B. (true) - this.testOperatorBoolean("Gamma", DT, true, ">="); + this.testOperatorBoolean("Gamma", DT, Boolean.TRUE, ">="); // Value A is greater than or equal to value B. (true) - this.testOperatorBoolean("Beta", DT, true, "ge"); + this.testOperatorBoolean("Beta", DT, Boolean.TRUE, "ge"); // Value A is greater than or equal to value B. (false) - this.testOperatorBoolean("Alpha", DT, false, "ge"); + this.testOperatorBoolean("Alpha", DT, Boolean.FALSE, "ge"); } @@ -1543,10 +1543,10 @@ public void elStringEqualToTest() throws Exception { // Value A is equal to value B. (true) - this.testOperatorBoolean("Beta", DT, true, "=="); + this.testOperatorBoolean("Beta", DT, Boolean.TRUE, "=="); // Value A is smaller than value B. (false) - this.testOperatorBoolean("Alpha", DT, false, "eq"); + this.testOperatorBoolean("Alpha", DT, Boolean.FALSE, "eq"); } @@ -1563,10 +1563,10 @@ public void elStringNotEqualToTest() throws Exception { // Value A is not equal to value B. (true) - this.testOperatorBoolean("Alpha", DT, true, "!="); + this.testOperatorBoolean("Alpha", DT, Boolean.TRUE, "!="); // Value A is not equal to value B. (false) - this.testOperatorBoolean("Beta", DT, false, "ne"); + this.testOperatorBoolean("Beta", DT, Boolean.FALSE, "ne"); } @@ -1582,13 +1582,13 @@ public void elOtherLessThanTest() throws Exception { // Value A is less than value B. (true) - this.testOperatorBoolean(DT, NT, true, "<"); + this.testOperatorBoolean(DT, NT, Boolean.TRUE, "<"); // Value A is less than value B. (false) - this.testOperatorBoolean(DT, DT, false, "lt"); + this.testOperatorBoolean(DT, DT, Boolean.FALSE, "lt"); // Value A is less than value B. (false) - this.testOperatorBoolean(NT, DT, false, "lt"); + this.testOperatorBoolean(NT, DT, Boolean.FALSE, "lt"); } @@ -1604,13 +1604,13 @@ public void elOtherLessThanEqualTest() throws Exception { // Value A is less than or equal to value B. (false) - this.testOperatorBoolean(NT, DT, false, "<="); + this.testOperatorBoolean(NT, DT, Boolean.FALSE, "<="); // Value A is less than or equal to value B. (true) - this.testOperatorBoolean(DT, DT, true, "le"); + this.testOperatorBoolean(DT, DT, Boolean.TRUE, "le"); // Value A is less than or equal to value B. (true) - this.testOperatorBoolean(DT, NT, true, "<="); + this.testOperatorBoolean(DT, NT, Boolean.TRUE, "<="); } /** @@ -1625,13 +1625,13 @@ public void elOtherGreaterThanTest() throws Exception { // Value A is greater than value B. (true) - this.testOperatorBoolean(NT, DT, true, ">"); + this.testOperatorBoolean(NT, DT, Boolean.TRUE, ">"); // Value A greater than value B. (false) - this.testOperatorBoolean(DT, DT, false, "gt"); + this.testOperatorBoolean(DT, DT, Boolean.FALSE, "gt"); // Value A is greater than value B. (false) - this.testOperatorBoolean(DT, NT, false, "gt"); + this.testOperatorBoolean(DT, NT, Boolean.FALSE, "gt"); } @@ -1647,13 +1647,13 @@ public void elOtherGreaterThanEqualTest() throws Exception { // Value A is greater than or equal to value B. (true) - this.testOperatorBoolean(NT, DT, true, ">="); + this.testOperatorBoolean(NT, DT, Boolean.TRUE, ">="); // Value A is greater than or equal to value B. (true) - this.testOperatorBoolean(DT, DT, true, "ge"); + this.testOperatorBoolean(DT, DT, Boolean.TRUE, "ge"); // Value A is greater than or equal to value B. (false) - this.testOperatorBoolean(DT, NT, false, "ge"); + this.testOperatorBoolean(DT, NT, Boolean.FALSE, "ge"); } @@ -1669,10 +1669,10 @@ public void elOtherEqualToTest() throws Exception { // Value A is equal to value B. (true) - this.testOperatorBoolean(DT, DT, true, "=="); + this.testOperatorBoolean(DT, DT, Boolean.TRUE, "=="); // Value A is smaller than value B. (false) - this.testOperatorBoolean(DT, NT, false, "eq"); + this.testOperatorBoolean(DT, NT, Boolean.FALSE, "eq"); } @@ -1688,10 +1688,10 @@ public void elOtherNotEqualToTest() throws Exception { // Value A is not equal to value B. (true) - this.testOperatorBoolean(DT, NT, true, "!="); + this.testOperatorBoolean(DT, NT, Boolean.TRUE, "!="); // Value A is not equal to value B. (false) - this.testOperatorBoolean(DT, DT, false, "ne"); + this.testOperatorBoolean(DT, DT, Boolean.FALSE, "ne"); } @@ -1708,10 +1708,10 @@ public void elBooleanEqualToTest() throws Exception { // Value A is equal to value B. (true) - this.testOperatorBoolean("true", true, true, "=="); + this.testOperatorBoolean("true", Boolean.TRUE, Boolean.TRUE, "=="); // Value A is smaller than value B. (false) - this.testOperatorBoolean("false", true, false, "eq"); + this.testOperatorBoolean("false", Boolean.TRUE, Boolean.FALSE, "eq"); } @@ -1728,10 +1728,10 @@ public void elBooleanNotEqualToTest() throws Exception { // Value A is not equal to value B. (true) - this.testOperatorBoolean("false", true, true, "!="); + this.testOperatorBoolean("false", Boolean.TRUE, Boolean.TRUE, "!="); // Value A is not equal to value B. (false) - this.testOperatorBoolean("false", false, false, "ne"); + this.testOperatorBoolean("false", Boolean.FALSE, Boolean.FALSE, "ne"); } @@ -1748,12 +1748,12 @@ public void elEnumEqualToTest() throws Exception { // Value A is equal to value B. (true) - this.testOperatorBoolean(TestEnum.APPLE, "APPLE", true, "=="); - this.testOperatorBoolean(TestEnum.PEAR, "PEAR", true, "eq"); + this.testOperatorBoolean(TestEnum.APPLE, "APPLE", Boolean.TRUE, "=="); + this.testOperatorBoolean(TestEnum.PEAR, "PEAR", Boolean.TRUE, "eq"); // Value A is not equal to value B. (false) - this.testOperatorBoolean(TestEnum.PEAR, "APPLE", false, "=="); - this.testOperatorBoolean(TestEnum.APPLE, "PEAR", false, "eq"); + this.testOperatorBoolean(TestEnum.PEAR, "APPLE", Boolean.FALSE, "=="); + this.testOperatorBoolean(TestEnum.APPLE, "PEAR", Boolean.FALSE, "eq"); } /** @@ -1769,12 +1769,12 @@ public void elEnumNotEqualToTest() throws Exception { // Value A is not equal to value B. (true) - this.testOperatorBoolean(TestEnum.APPLE, "PEAR", true, "!="); - this.testOperatorBoolean(TestEnum.PEAR, "APPLE", true, "ne"); + this.testOperatorBoolean(TestEnum.APPLE, "PEAR", Boolean.TRUE, "!="); + this.testOperatorBoolean(TestEnum.PEAR, "APPLE", Boolean.TRUE, "ne"); // Value A is not equal to value B. (false) - this.testOperatorBoolean(TestEnum.APPLE, "APPLE", false, "!="); - this.testOperatorBoolean(TestEnum.PEAR, "PEAR", false, "ne"); + this.testOperatorBoolean(TestEnum.APPLE, "APPLE", Boolean.FALSE, "!="); + this.testOperatorBoolean(TestEnum.PEAR, "PEAR", Boolean.FALSE, "ne"); } // ---------------------------------------------------------- private
diff --git a/tck/src/main/java/com/sun/ts/tests/el/spec/unaryoperator/ELClientIT.java b/tck/src/main/java/com/sun/ts/tests/el/spec/unaryoperator/ELClientIT.java index fd0bd09..deb4dee 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/spec/unaryoperator/ELClientIT.java +++ b/tck/src/main/java/com/sun/ts/tests/el/spec/unaryoperator/ELClientIT.java
@@ -271,7 +271,7 @@ byte num = 1; byte expectedResult = -1; - NameValuePair value[] = NameValuePair.buildUnaryNameValue(num); + NameValuePair value[] = NameValuePair.buildUnaryNameValue(Byte.valueOf(num)); try { for (boolean tf : deferred) { @@ -282,7 +282,7 @@ logger.log(Logger.Level.TRACE, "result is " + result.toString()); pass = (ExprEval.compareClass(result, Byte.class) - && ExprEval.compareValue(result, expectedResult)); + && ExprEval.compareValue(result, Byte.valueOf(expectedResult))); } if (!pass) @@ -311,7 +311,7 @@ short num = 1; short expectedResult = -1; - NameValuePair value[] = NameValuePair.buildUnaryNameValue(num); + NameValuePair value[] = NameValuePair.buildUnaryNameValue(Short.valueOf(num)); try { for (boolean tf : deferred) { @@ -322,7 +322,7 @@ logger.log(Logger.Level.TRACE, "result is " + result.toString()); pass = (ExprEval.compareClass(result, Short.class) - && ExprEval.compareValue(result, expectedResult)); + && ExprEval.compareValue(result, Short.valueOf(expectedResult))); } if (!pass) @@ -351,7 +351,7 @@ int num = 1; int expectedResult = -1; - NameValuePair value[] = NameValuePair.buildUnaryNameValue(num); + NameValuePair value[] = NameValuePair.buildUnaryNameValue(Integer.valueOf(num)); try { for (boolean tf : deferred) { @@ -362,7 +362,7 @@ logger.log(Logger.Level.TRACE, "result is " + result.toString()); pass = (ExprEval.compareClass(result, Integer.class) - && ExprEval.compareValue(result, expectedResult)); + && ExprEval.compareValue(result, Integer.valueOf(expectedResult))); } if (!pass) @@ -391,7 +391,7 @@ long num = 10000; long expectedResult = -10000; - NameValuePair value[] = NameValuePair.buildUnaryNameValue(num); + NameValuePair value[] = NameValuePair.buildUnaryNameValue(Long.valueOf(num)); try { for (boolean tf : deferred) { @@ -402,7 +402,7 @@ logger.log(Logger.Level.TRACE, "result is " + result.toString()); pass = (ExprEval.compareClass(result, Long.class) - && ExprEval.compareValue(result, expectedResult)); + && ExprEval.compareValue(result, Long.valueOf(expectedResult))); } if (!pass) @@ -431,7 +431,7 @@ float num = 10000f; float expectedResult = -10000f; - NameValuePair value[] = NameValuePair.buildUnaryNameValue(num); + NameValuePair value[] = NameValuePair.buildUnaryNameValue(Float.valueOf(num)); try { for (boolean tf : deferred) { @@ -442,7 +442,7 @@ logger.log(Logger.Level.TRACE, "result is " + result.toString()); pass = (ExprEval.compareClass(result, Float.class) - && ExprEval.compareValue((Float) result, expectedResult, 0)); + && ExprEval.compareValue((Float) result, Float.valueOf(expectedResult), 0)); } if (!pass) @@ -471,7 +471,7 @@ double num = 10000.0; double expectedResult = -10000.0; - NameValuePair value[] = NameValuePair.buildUnaryNameValue(num); + NameValuePair value[] = NameValuePair.buildUnaryNameValue(Double.valueOf(num)); try { for (boolean tf : deferred) { @@ -482,7 +482,7 @@ logger.log(Logger.Level.TRACE, "result is " + result.toString()); pass = (ExprEval.compareClass(result, Double.class) - && ExprEval.compareValue(result, expectedResult)); + && ExprEval.compareValue(result, Double.valueOf(expectedResult))); } if (!pass) @@ -545,7 +545,7 @@ logger.log(Logger.Level.TRACE, "result is " + result.toString()); pass = (ExprEval.compareClass(result, Boolean.class) - && ExprEval.compareValue((Boolean) result, expectedResult)); + && ExprEval.compareValue((Boolean) result, Boolean.valueOf(expectedResult))); if (!pass) throw new Exception("TEST FAILED: pass = false");