Unused code
diff --git a/tck/src/main/java/com/sun/ts/tests/el/common/api/expression/ExpressionTest.java b/tck/src/main/java/com/sun/ts/tests/el/common/api/expression/ExpressionTest.java index a0f3797..7590dc2 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/common/api/expression/ExpressionTest.java +++ b/tck/src/main/java/com/sun/ts/tests/el/common/api/expression/ExpressionTest.java
@@ -260,7 +260,7 @@ // getMethodInfo() try { - MethodInfo minfo = mexp.getMethodInfo(context); + mexp.getMethodInfo(context); } catch (Exception e) { pass = false; buf.append("getMethodInfo() threw an unexpected exception" + NLINE);
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 b91a4b4..4bb3870 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
@@ -33,19 +33,10 @@ private static final Logger logger = System.getLogger(Validator.class.getName()); - private static Validator instance = null; - protected Validator() { // Exists only to defeat instantiation. } - private Validator getInstance() { - if (instance == null) { - instance = new Validator(); - } - return instance; - } - /** * This method is used to validate an expression that have at least one * BigDecimal in it. We pass in one of the operands(testVal), the other
diff --git a/tck/src/main/java/com/sun/ts/tests/el/signaturetest/PackageList.java b/tck/src/main/java/com/sun/ts/tests/el/signaturetest/PackageList.java index 1bb86c0..f8f72b5 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/signaturetest/PackageList.java +++ b/tck/src/main/java/com/sun/ts/tests/el/signaturetest/PackageList.java
@@ -17,11 +17,9 @@ package com.sun.ts.tests.el.signaturetest; import java.io.BufferedReader; -import java.io.BufferedWriter; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; -import java.io.FileWriter; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -62,8 +60,6 @@ // Any line in the packageFile starting with this character is a comment private static final char COMMENT_CHAR = '#'; - private static final String BACKUP_EXT = ".bak"; - // File containing the list of packages and sub-packages private File packageFile; @@ -220,130 +216,6 @@ } /** - * Extract the package name from the specified string. The specified string - * should have the form: "package jakarta.ejb;" - * - * @param packageLine - * The string containing the package name. - * - * @return String The extracted package name. - * - * @throws Exception - * if the specified string does not conform to the expected format. - */ - private String parsePackageName(String packageLine) throws Exception { - - // sig test framework doesn't have the concept of package entries - // as the ApiCheck signature format does. - // Instead, we need to parse an entry similar to this: - // CLSS public jakarta.some.package.SomeClass - - return packageLine.substring(packageLine.lastIndexOf(' ') + 1, - packageLine.lastIndexOf('.')); - } - - /** - * Reads the package names from the signature file. Each package name that is - * read is added to this classes internal tree set. - * - * @throws Exception - * if there is an error opening or reading the signature file. - */ - private void readPkgsFromSigFile() throws Exception { - BufferedReader in = new BufferedReader(new FileReader(sigFile)); - String line; - String trimLine; - try { - while ((line = in.readLine()) != null) { - trimLine = line.trim(); - if (trimLine.startsWith("CLSS")) { - packageNames.add(parsePackageName(trimLine)); - } - } - } finally { - try { - in.close(); - } catch (Exception e) { - } - } - } - - /** - * Removes the existing package list file. The package list file is actually - * moved to a backup file if it exists. The old backup is lost. - * - * @throws Exception - * if there is an error moving the current package list file to a - * backup file. - */ - private void removePkgFile() throws Exception { - File backupPkgFile = new File(packageFile.getPath() + BACKUP_EXT); - if (backupPkgFile.exists() && backupPkgFile.isFile()) { - backupPkgFile.delete(); - } - if (packageFile.isFile() && packageFile.exists()) { - File copyPackageFile = new File(packageFile.getPath()); - copyPackageFile.renameTo(backupPkgFile); - } - } - - /** - * Write a simple header to the package list file to explain what the file is. - * - * @param out - * The BufferedWriter to dump the header to. - * - * @throws Exception - * if there is any errors writing the header to the specified - * BufferedWriter. - */ - private void writeHeader(BufferedWriter out) throws Exception { - out.write(COMMENT_CHAR); - out.write(COMMENT_CHAR); - out.newLine(); - out.write(COMMENT_CHAR + " This file contains a list of all the packages"); - out.newLine(); - out.write(COMMENT_CHAR + " contained in the signature files for this"); - out.newLine(); - out.write( - COMMENT_CHAR + " deliverable. This file is used to exclude valid"); - out.newLine(); - out.write(COMMENT_CHAR + " sub-packages from being verified when their"); - out.newLine(); - out.write(COMMENT_CHAR + " parent package's signature is checked."); - out.newLine(); - out.write(COMMENT_CHAR); - out.write(COMMENT_CHAR); - out.newLine(); - out.newLine(); - } - - /** - * Write the list of package names out to a package list file. - * - * @throws Exception - * if there is an error creating and writting the package list file. - */ - private void writePkgFile() throws Exception { - BufferedWriter out = null; - try { - out = new BufferedWriter(new FileWriter(packageFile)); - writeHeader(out); - for (Iterator<String> i = packageNames.iterator(); i.hasNext();) { - String packageName = i.next(); - out.write(packageName); - out.newLine(); - System.out - .println("PackageList.writePkgFile() \"" + packageName + "\""); - } - } finally { - if (out != null) { - out.close(); - } - } - } - - /** * Returns the list of sub-packages that exist in the specified package name. * * @param pkgName
diff --git a/tck/src/main/java/com/sun/ts/tests/el/signaturetest/SigTest.java b/tck/src/main/java/com/sun/ts/tests/el/signaturetest/SigTest.java index ff0b2b7..87190d5 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/signaturetest/SigTest.java +++ b/tck/src/main/java/com/sun/ts/tests/el/signaturetest/SigTest.java
@@ -114,8 +114,8 @@ * @throws Exception * When an error occurs executing the signature tests. */ - public void signatureTest(String mapFile, String packageFile, Properties mapFileAsProps, String[] packages) - throws Exception { + public void signatureTest(String mapFile, String packageFile, @SuppressWarnings("unused") Properties mapFileAsProps, + String[] packages) throws Exception { SigTestResult results = null; String repositoryDir = System.getProperty("java.io.tmpdir");
diff --git a/tck/src/main/java/com/sun/ts/tests/el/signaturetest/SigTestDriver.java b/tck/src/main/java/com/sun/ts/tests/el/signaturetest/SigTestDriver.java index f38b288..1341689 100644 --- a/tck/src/main/java/com/sun/ts/tests/el/signaturetest/SigTestDriver.java +++ b/tck/src/main/java/com/sun/ts/tests/el/signaturetest/SigTestDriver.java
@@ -39,8 +39,6 @@ private static final String PACKAGE_FLAG = "-Package"; - private static final String PACKAGE_NO_SUBS_FLAG = "-PackageWithoutSubpackages"; - private static final String API_VERSION_FLAG = "-ApiVersion"; private static final String EXCLUDE_FLAG = "-Exclude"; @@ -50,15 +48,9 @@ private static final String CHECKVALUE_FLAG = "-CheckValue"; // only valid w/ // -static - private static final String NO_CHECKVALUE_FLAG = "-NoCheckValue"; - private static final String SMODE_FLAG = "-mode"; // requires arg of bin or // src - private static final String DEBUG_FLAG = "-Debug"; - - private static final String FORMATPLAIN_FLAG = "-FormatPlain"; - private static final String EXCLUDE_JDK_CLASS_FLAG = "-IgnoreJDKClass"; @Override
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 a9269f7..2b7e103 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
@@ -25,12 +25,9 @@ import java.math.BigInteger; import java.util.Iterator; -import com.sun.ts.tests.el.common.util.ELTestUtil; import com.sun.ts.tests.el.common.util.TestNum; import com.sun.ts.tests.el.common.util.Validator; -import jakarta.el.ELProcessor; - import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -258,39 +255,4 @@ Validator.testBoolean(false, Boolean.TRUE, null, "+="); } - - // ------------------------------------------------------- private methods - private void logLine(String s) { - logger.log(Logger.Level.TRACE, s); - } - - /** - * Test a query for the correct value. - * - * @param name - * The Name of the test - * @param query - * The EL query string - * @param expected - * The expected result of the query. - */ - private void testQuery(String name, String query, String expected) - throws Exception { - ELProcessor elp = new ELProcessor(); - - logLine("=== Testing " + name + " ==="); - logLine(query); - - logLine(" = returns ="); - Object ret = elp.eval(query); - - if (!expected.equals(ret.toString())) { - - throw new Exception( - ELTestUtil.FAIL + " Unexpected Value!" + ELTestUtil.NL + "Expected: " - + expected + ELTestUtil.NL + "Received: " + ret.toString()); - - } - } - }
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 049b9f8..87e97cb 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
@@ -46,8 +46,6 @@ private static final String[] OROPER = { "||", "or" }; - private final boolean[] deferred = { true, false }; - @AfterEach public void cleanup() throws Exception { logger.log(Logger.Level.INFO, "Cleanup method called");