diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index fc541a58f..6c3ca8918 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -8,11 +8,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Set up JDK 11 - uses: actions/setup-java@v1 + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 + distribution: temurin + cache: 'maven' - name: Set up Maven run: mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.2.0:wrapper "-Dmaven=3.9.4" diff --git a/tck/tck-runtime/pom.xml b/tck/tck-runtime/pom.xml index 9002d5b22..ae5587b64 100644 --- a/tck/tck-runtime/pom.xml +++ b/tck/tck-runtime/pom.xml @@ -49,6 +49,11 @@ jakarta.annotation-api 2.1.1 + + jakarta.tck + sigtest-maven-plugin + 2.1 + org.jboss.shrinkwrap.resolver shrinkwrap-resolver-api-maven @@ -110,6 +115,24 @@ src/main/resources + + + jakarta.tck + sigtest-maven-plugin + 2.1 + + + + generate + + + + + 17 + jakarta.servlet,jakarta.servlet.annotation,jakarta.servlet.descriptor,jakarta.servlet.http + + + diff --git a/tck/tck-runtime/src/main/java/servlet/tck/signature/PackageList.java b/tck/tck-runtime/src/main/java/servlet/tck/signature/PackageList.java new file mode 100644 index 000000000..a5683e989 --- /dev/null +++ b/tck/tck-runtime/src/main/java/servlet/tck/signature/PackageList.java @@ -0,0 +1,263 @@ +/* + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package servlet.tck.signature; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; + +/** + * This class represents a package list file. A package list file is used in + * conjunction with a set of signature files to execute API signature tests. + * Users specify which set of package APIs are verified. Each package's + * signature is verified independently. As such all valid sub-packages must be + * excluded while a package's signature is being verified. This allows API check + * to determine incompatible additional packages included in a distribution. + *

+ * This class builds a package list file when signatures are recorded and + * provides an API to provide valid sub-package lists when signatures are played + * back (verified). + *

+ * In record mode, this class reads the existing package list file, if one + * exists, and removes the package (as well as sub-packages) that are currently + * being recorded. All package names read from the existing package list file + * are held in a tree set which sorts the package names and keeps duplicate + * package names from ocurring. The user can then instruct this class to write + * out the package list file. At this point this class reads the currently + * recorded signature file and extracts each package names and adds it to the + * tree set. After this step the previous package list file is saved as a backup + * and the new package list file is written to disk. + *

+ * In playback mode, this class reads the contents of the package list file and + * stores each package name in a tree set. Users can then invoke the + * getSubPackages method to retrieve the valid sub-packages for any given + * package. This is done by simply examining the package names in the tree set + * and returning any package name that starts with the parent package name and a + * trailing period character. + */ +class PackageList { + + // Any line in the packageFile starting with this character is a comment + private static final char COMMENT_CHAR = '#'; + + // File containing the list of packages and sub-packages + private File packageFile; + + // Signature file where the package signatures were recorded + private File sigFile; + + // Name of the package being recorded + private String additionalPackageName; + + // Name of packages and sub-packages in the + private Set packageNames = new TreeSet<>(); + + /** + * Creates an instance of the PackageList class. The PackageList instance + * reads the specified package file and populates it's internal state with the + * package names found in this file. Users should use this c'tor when playing + * back signature files. Users can init the PackageList instance then use the + * "String[] getSubPackages(String packageName)" method to get the list of + * valid sub-packages for every package who's signature is being verified. + * + * @param packageFileName + * The name of the file that contains the package list. This file + * contains the names of all the packages that exist across all the + * signature files that makeup this deliverable. This file is used to + * generate a list of valid sub-packages that must be exclued when + * testing theor parent package's signature. + * + * @throws Exception + * when the packageFileName does not exist. + */ + public PackageList(String packageFileName) throws Exception { + packageFile = new File(packageFileName); + if (packageFile.exists() && packageFile.isFile()) { + extractExistingPackageNames(); + } else { + throw new FileNotFoundException(packageFileName); + } + } + + /** + * Creates an instance of the PackageList class. The PackageList instance + * reads the contents of the packageFileName and stores it in it's internal + * state. Next, any packages whos name starts with the specified packageName + * are removed from the internal package list. This is done because this is + * the package being recorded and we need to remove any previously recorded + * package names in case any sub-packages have been removed since the last + * time the signatures were recorded. Users should use this c'tor when they + * are recording signature files never during playback. + * + * @param packageName + * The name of the package whos signatures are being recorded (along + * with sub-packages). + * @param sigFileName + * The name of the file that contains the recored signatures. + * @param packageFileName + * The name of the file that contains the package list. This file + * contains the names of all the packages that exist across all the + * signature files that makeup this deliverable. This file is used to + * generate a list of valid sub-packages that must be exclued when + * testing their parent package's signature. + * + * @throws Exception + * when an error occurs reading the packageFileName or the + * sigFileName does not exist. + */ + public PackageList(String packageName, String sigFileName, + String packageFileName) throws Exception { + this.additionalPackageName = packageName; + sigFile = new File(sigFileName); + if (!sigFile.exists() || !sigFile.isFile()) { + throw new FileNotFoundException(sigFileName); + } + packageFile = new File(packageFileName); + if (packageFile.exists() && packageFile.isFile()) { + extractExistingPackageNames(); + removeExistingPackage(); + } + } + + /** + * Read the package names stored in the package list file. Each package name + * found in the package list file is added to the internal tree set. + * + * @throws Exception + * if there is an error opening or reading the package list file. + */ + private void extractExistingPackageNames() throws Exception { + BufferedReader in = new BufferedReader(new FileReader(packageFile)); + String line; + String trimLine; + try { + while ((line = in.readLine()) != null) { + trimLine = line.trim(); + if (isComment(trimLine) || "".equals(trimLine)) { + continue; + } + packageNames.add(trimLine); + } + } finally { + try { + in.close(); + } catch (Exception e) { + } + } + } + + /** + * Returns true if the specified string starts with a comment character as + * denoted by the COMMENT_CHAR constant. + * + * @param line + * Determins of this line is a comment line + * + * @return boolean True if the specified line is a comment line else false. + */ + private boolean isComment(String line) { + if (line == null) { + return false; + } + String theLine = line.trim(); + if (theLine.length() > 0) { + return (theLine.charAt(0) == COMMENT_CHAR); + } + + return false; + } + + /** + * Removes package names from the package list file. The packages that are + * removed are the ones currently being recorded. The packages being recorded + * is denoted by this.additionalPackageName. This includes any sub-packages of + * the additionalPackageName. This step is necessary in the cases where a + * sub-package has been removed from a parent package in between signature + * recordings. + */ + private void removeExistingPackage() { + String delPackage = this.additionalPackageName; + String packageName; + List delPkgs = new ArrayList<>(); + // iterate over package set and find package names to remove + for (Iterator i = packageNames.iterator(); i.hasNext();) { + packageName = i.next(); + if (packageName.startsWith(delPackage)) { + delPkgs.add(packageName); + } + } + // actually remove the package names from the set + for (int i = 0; i < delPkgs.size(); i++) { + packageName = delPkgs.get(i); + packageNames.remove(packageName); + System.out.println( + "PackageList.removeExistingPackage() \"" + packageName + "\""); + } + } + + /** + * Returns the list of sub-packages that exist in the specified package name. + * + * @param pkgName + * The name of the package we want the sub-package list for. + * + * @return String[] The sub-packages that live under the specified parent + * package. + */ + public String[] getSubPackages(String pkgName) { + List result = new ArrayList<>(); + String subPackageName = pkgName + "."; + for (Iterator i = packageNames.iterator(); i.hasNext();) { + String packageName = i.next(); + if (packageName.startsWith(subPackageName)) { + result.add(packageName); + } + } + return result.toArray(new String[0]); + } + + /** + * Returns the list of sub-packages that exist in the specified package name. + * The returned string matches the API check format of specifying multiple + * packages with a single string. Each package name is separated with the "+" + * character. + * + * @param pkgName + * The name of the package we want the sub-package list for. + * + * @return String The sub-packages that live under the specified parent + * package. + */ + public String getSubPackagesFormatted(String pkgName) { + StringBuffer formattedResult = new StringBuffer(); + String[] result = getSubPackages(pkgName); + for (int i = 0; i < result.length; i++) { + formattedResult.append(result[i]); + if (i < (result.length - 1)) { + formattedResult.append("+"); + } + } + return formattedResult.toString(); + } + +} // end class PackageList diff --git a/tck/tck-runtime/src/main/java/servlet/tck/signature/ServletSigTest.java b/tck/tck-runtime/src/main/java/servlet/tck/signature/ServletSigTest.java new file mode 100644 index 000000000..bbf115e8b --- /dev/null +++ b/tck/tck-runtime/src/main/java/servlet/tck/signature/ServletSigTest.java @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2007, 2024 Oracle and/or its affiliates and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package servlet.tck.signature; + +import java.io.IOException; +import java.io.InputStream; +import java.io.File; + +import org.junit.jupiter.api.Test; + +import java.util.Properties; +import java.lang.System.Logger; + +/* + * This class is a simple example of a signature test that extends the + * SigTest framework class. This signature test is run outside of the + * EE containers. + */ +public class ServletSigTest extends SigTest { + + private static final Logger logger = System.getLogger(ServletSigTest.class.getName()); + + public ServletSigTest(){ + setup(); + } + + /***** Abstract Method Implementation *****/ + + /** + * Returns a list of strings where each string represents a package name. Each + * package name will have it's signature tested by the signature test + * framework. + * + * @return String[] The names of the packages whose signatures should be + * verified. + */ + @Override + protected String[] getPackages() { + return new String[] { + "jakarta.servlet", + "jakarta.servlet.annotation", + "jakarta.servlet.descriptor", + "jakarta.servlet.http" }; + } + + + /* + * The following comments are specified in the base class that defines the + * signature tests. This is done so the test finders will find the right class + * to run. The implementation of these methods is inherited from the super + * class which is part of the signature test framework. + */ + + // NOTE: If the API under test is not part of your testing runtime + // environment, you may use the property sigTestClasspath to specify + // where the API under test lives. This should almost never be used. + // Normally the API under test should be specified in the classpath + // of the VM running the signature tests. Use either the first + // comment or the one below it depending on which properties your + // signature tests need. Please do not use both comments. + + /* + * @testName: signatureTest + * + * @assertion: An EL container must implement the required classes and APIs + * specified in the EL Specification. + * + * @test_Strategy: Using reflection, gather the implementation specific + * classes and APIs. Compare these results with the expected (required) + * classes and APIs. + * + */ + @Test + public void signatureTest() throws Exception { + + logger.log(Logger.Level.INFO, "$$$ SigTestIT.signatureTest() called"); + String mapFile = null; + String packageFile = null; + Properties mapFileAsProps = null; + String[] packages = getPackages(); + String apiPackage = "jakarta.servlet"; + + try { + + InputStream inStreamMapfile = ServletSigTest.class.getClassLoader().getResourceAsStream("servlet/tck/signature/sig-test.map"); + File mFile = writeStreamToTempFile(inStreamMapfile, "sig-test", ".map"); + mapFile = mFile.getCanonicalPath(); + logger.log(Logger.Level.INFO, "mapFile location is :"+mapFile); + + InputStream inStreamPackageFile = ServletSigTest.class.getClassLoader().getResourceAsStream("servlet/tck/signature/sig-test-pkg-list.txt"); + File pFile = writeStreamToTempFile(inStreamPackageFile, "sig-test-pkg-list", ".txt"); + packageFile = pFile.getCanonicalPath(); + logger.log(Logger.Level.INFO, "packageFile location is :"+packageFile); + + mapFileAsProps = getSigTestDriver().loadMapFile(mapFile); + String packageVersion = mapFileAsProps.getProperty(apiPackage); + logger.log(Logger.Level.INFO, "Package version from mapfile :"+packageVersion); + + InputStream inStreamSigFile = ServletSigTest.class.getClassLoader().getResourceAsStream("servlet/tck/signature/jakarta.servlet.sig_"+packageVersion); + File sigFile = writeStreamToSigFile(inStreamSigFile, apiPackage, packageVersion); + logger.log(Logger.Level.INFO, "signature File location is :"+sigFile.getCanonicalPath()); + + } catch(IOException ex) { + logger.log(Logger.Level.ERROR, "Exception while creating temp files :"+ex); + } + + super.signatureTest(mapFile, packageFile, mapFileAsProps, packages); + } + + + /* + * Call the parent class's cleanup method. + */ + + /* + * define which sig driver we will use + */ + @Override + protected SignatureTestDriver getSigTestDriver() { + driver = SignatureTestDriverFactory + .getInstance(SignatureTestDriverFactory.SIG_TEST); + + return driver; + + } // END getSigTestDriver +} diff --git a/tck/tck-runtime/src/main/java/servlet/tck/signature/SigTest.java b/tck/tck-runtime/src/main/java/servlet/tck/signature/SigTest.java new file mode 100644 index 000000000..fa2ffcf6c --- /dev/null +++ b/tck/tck-runtime/src/main/java/servlet/tck/signature/SigTest.java @@ -0,0 +1,242 @@ +/* + * Copyright (c) 2007, 2024 Oracle and/or its affiliates and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package servlet.tck.signature; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; + +import java.util.Properties; + +import java.lang.System.Logger; + +/** + * This class should be extended by TCK developers that wish to create a set of + * signature tests that run outside of any Java EE container. Developers must + * implement the getPackages method to specify which packages are to be tested + * by the signature test framework. + */ +public abstract class SigTest { + + private static final Logger logger = System.getLogger(SigTest.class.getName()); + + protected SignatureTestDriver driver; + + /** + *

+ * Returns a {@link SignatureTestDriver} appropriate for the particular TCK + * (using API check or the Signature Test Framework). + *

+ * + *

+ * The default implementation of this method will return a + * {@link SignatureTestDriver} that will use API Check. TCK developers can + * override this to return the desired {@link SignatureTestDriver} for their + * TCK. + */ + protected SignatureTestDriver getSigTestDriver() { + + if (driver == null) { + driver = SignatureTestDriverFactory.getInstance(SignatureTestDriverFactory.SIG_TEST); + } + + return driver; + + } // END getSigTestDriver + + + /** + * Returns the list of packages that must be tested by the signature test + * framework. TCK developers must implement this method in their signature + * test sub-class. + * + * @return String A list of packages that the developer wishes to test using + * the signature test framework. + */ + protected abstract String[] getPackages(); + + /** + * Returns an array of individual classes that must be tested by the signature + * test framwork. TCK developers may override this method when this + * functionality is needed. Most will only need package level granularity. + * + * @return an Array of Strings containing the individual classes the framework + * should test. The default implementation of this method returns a + * zero-length array. + */ + protected String[] getClasses() { + + return new String[] {}; + + } // END getClasses + + protected SigTestData testInfo; + + /** + * Called by the test framework to initialize this test. The method simply + * retrieves some state information that is necessary to run the test when + * when the test framework invokes the run method (actually the test1 method). + * + * @param args + * List of arguments passed to this test. + * @param p + * Properties specified by the test user and passed to this test via + * the test framework. + */ + public void setup() { + try { + logger.log(Logger.Level.TRACE, "$$$ SigTest.setup() called"); + this.testInfo = new SigTestData(); + logger.log(Logger.Level.TRACE, "$$$ SigTest.setup() complete"); + } catch (Exception e) { + logger.log(Logger.Level.ERROR, "Unexpected exception " + e.getMessage()); + } + } + + /** + * Called by the test framework to run this test. This method utilizes the + * state information set in the setup method to run the signature tests. All + * signature test code resides in the utility class so it can be reused by the + * signature test framework base classes. + * + * @throws Exception + * When an error occurs executing the signature tests. + */ + 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"); + String[] classes = getClasses(); + String testClasspath = testInfo.getTestClasspath(); + + // If testing with Java 9+, extract the JDK's modules so they can be used + // on the testcase's classpath. + + String jimageDir = testInfo.getJImageDir(); + File f = new File(jimageDir); + f.mkdirs(); + + String javaHome = System.getProperty("java.home"); + logger.log(Logger.Level.INFO, "Executing JImage"); + + try { + ProcessBuilder pb = new ProcessBuilder(javaHome + "/bin/jimage", "extract", "--dir=" + jimageDir, javaHome + "/lib/modules"); + logger.log(Logger.Level.INFO, javaHome + "/bin/jimage extract --dir=" + jimageDir + " " + javaHome + "/lib/modules"); + pb.redirectErrorStream(true); + Process proc = pb.start(); + BufferedReader out = new BufferedReader(new InputStreamReader(proc.getInputStream())); + String line = null; + while ((line = out.readLine()) != null) { + logger.log(Logger.Level.INFO, line); + } + + int rc = proc.waitFor(); + logger.log(Logger.Level.INFO,"JImage RC = " + rc); + out.close(); + } catch (Exception e) { + logger.log(Logger.Level.INFO, "Exception while executing JImage! Some tests may fail."); + e.printStackTrace(); + } + + + try { + results = getSigTestDriver().executeSigTest(packageFile, mapFile, + repositoryDir, packages, classes, testClasspath); + logger.log(Logger.Level.INFO,results.toString()); + if (!results.passed()) { + logger.log(Logger.Level.TRACE, "results.passed() returned false"); + throw new Exception(); + } + logger.log(Logger.Level.TRACE, "$$$ SigTest.test1() returning"); + } catch (Exception e) { + if (results != null && !results.passed()) { + throw new Exception("SigTest.test1() failed!, diffs found"); + } else { + logger.log(Logger.Level.ERROR, "Unexpected exception " + e.getMessage()); + throw new Exception("test failed with an unexpected exception", e); + } + } + } + + public File writeStreamToTempFile(InputStream inputStream, String tempFilePrefix, String tempFileSuffix) throws IOException { + FileOutputStream outputStream = null; + try { + File file = File.createTempFile(tempFilePrefix, tempFileSuffix); + file.deleteOnExit(); + outputStream = new FileOutputStream(file); + byte[] buffer = new byte[1024]; + while (true) { + int bytesRead = inputStream.read(buffer); + if (bytesRead == -1) { + break; + } + outputStream.write(buffer, 0, bytesRead); + } + return file; + } + finally { + if (outputStream != null) { + outputStream.close(); + } + } + } + + public File writeStreamToSigFile(InputStream inputStream, String apiPackage, String packageVersion) throws IOException { + FileOutputStream outputStream = null; + String tmpdir = System.getProperty("java.io.tmpdir"); + try { + File sigfile = new File(tmpdir+ File.separator + apiPackage + ".sig_"+packageVersion); + if(sigfile.exists()){ + sigfile.delete(); + logger.log(Logger.Level.INFO, "Existing signature file deleted to create new one"); + } + if(!sigfile.createNewFile()){ + logger.log(Logger.Level.ERROR, "signature file is not created"); + } + outputStream = new FileOutputStream(sigfile); + byte[] buffer = new byte[1024]; + while (true) { + int bytesRead = inputStream.read(buffer); + if (bytesRead == -1) { + break; + } + outputStream.write(buffer, 0, bytesRead); + } + return sigfile; + } + + finally { + if (outputStream != null) { + outputStream.close(); + } + } + } + + /** + * Called by the test framework to cleanup any outstanding state. + * + */ + public void cleanup() { + logger.log(Logger.Level.TRACE, "$$$ SigTest.cleanup()"); + } + +} // end class SigTest diff --git a/tck/tck-runtime/src/main/java/servlet/tck/signature/SigTestData.java b/tck/tck-runtime/src/main/java/servlet/tck/signature/SigTestData.java new file mode 100644 index 000000000..1fcd52fc0 --- /dev/null +++ b/tck/tck-runtime/src/main/java/servlet/tck/signature/SigTestData.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package servlet.tck.signature; + +import java.util.Properties; + +/** + * This class holds the data passed to a signature test invocation during the + * setup phase. This allows us to keep the passed data separate and reuse the + * data between the signature test framework base classes. + */ +public class SigTestData { + + private Properties props; + + public SigTestData() { + this.props = System.getProperties(); + } + + public String getTestClasspath() { + return props.getProperty("sigTestClasspath", ""); + } + + public String getProperty(String prop) { + return props.getProperty(prop); + } + + public String getJImageDir() { + return props.getProperty("jimage.dir", ""); + } +} // end class SigTestData diff --git a/tck/tck-runtime/src/main/java/servlet/tck/signature/SigTestDriver.java b/tck/tck-runtime/src/main/java/servlet/tck/signature/SigTestDriver.java new file mode 100644 index 000000000..1c74b26c5 --- /dev/null +++ b/tck/tck-runtime/src/main/java/servlet/tck/signature/SigTestDriver.java @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package servlet.tck.signature; + +import java.io.ByteArrayOutputStream; +import java.io.PrintWriter; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; +import java.lang.System.Logger; + + +/** + *

+ * Wrapper for the Sig Test framework. + *

+ */ +public class SigTestDriver extends SignatureTestDriver { + + private static final Logger logger = System.getLogger(SigTestDriver.class.getName()); + + private static final String CLASSPATH_FLAG = "-Classpath"; + + private static final String FILENAME_FLAG = "-FileName"; + + private static final String PACKAGE_FLAG = "-Package"; + + private static final String API_VERSION_FLAG = "-ApiVersion"; + + private static final String EXCLUDE_FLAG = "-Exclude"; + + private static final String STATIC_FLAG = "-Static"; + + private static final String CHECKVALUE_FLAG = "-CheckValue"; // only valid w/ + // -static + + private static final String SMODE_FLAG = "-mode"; // requires arg of bin or + // src + + private static final String EXCLUDE_JDK_CLASS_FLAG = "-IgnoreJDKClass"; + + private static String[] excludeJdkClasses = { + "java.util.Map", + "java.lang.Object", + "java.io.ByteArrayInputStream", + "java.io.InputStream", + "java.lang.Deprecated", + "java.io.Writer", + "java.io.OutputStream", + "java.util.List", + "java.util.Collection", + "java.lang.instrument.IllegalClassFormatException", + "javax.transaction.xa.XAException", + "java.lang.annotation.Repeatable", + "java.lang.InterruptedException", + "java.lang.CloneNotSupportedException", + "java.lang.Throwable", + "java.lang.Thread", + "java.lang.Enum" + }; + + + @Override + protected String[] createTestArguments(String packageListFile, String mapFile, + String signatureRepositoryDir, String packageOrClassUnderTest, + String classpath, boolean bStaticMode) throws Exception { + + SignatureFileInfo info = getSigFileInfo(packageOrClassUnderTest, mapFile, + signatureRepositoryDir); + + PackageList packageList = new PackageList(packageListFile); + String[] subPackages = packageList.getSubPackages(packageOrClassUnderTest); + + List command = new ArrayList<>(); + + if (bStaticMode) { + // static mode allows finer level of constants checking + // -CheckValue says to check the actual const values + logger.log(Logger.Level.TRACE, "Setting static mode flag to allow constant checking."); + command.add(STATIC_FLAG); + command.add(CHECKVALUE_FLAG); + + // specifying "-mode src" allows stricter 2 way verification of constant + // vals + // (note that using "-mode bin" mode is less strict) + command.add(SMODE_FLAG); + // command.add("bin"); + command.add("src"); + } else { + logger.log(Logger.Level.TRACE, "Not Setting static mode flag to allow constant checking."); + } + + // if (TestUtil.harnessDebug) { + // command.add(DEBUG_FLAG); + // } + command.add("-Verbose"); + + command.add(FILENAME_FLAG); + command.add(info.getFile()); + + command.add(CLASSPATH_FLAG); + command.add(classpath); + + command.add(PACKAGE_FLAG); + command.add(packageOrClassUnderTest); + + for (int i = 0; i < subPackages.length; i++) { + command.add(EXCLUDE_FLAG); + command.add(subPackages[i]); + } + + for(String jdkClassName:excludeJdkClasses) { + command.add(EXCLUDE_JDK_CLASS_FLAG); + command.add(jdkClassName); + } + + + command.add(API_VERSION_FLAG); + command.add(info.getVersion()); + + return command.toArray(new String[0]); + + } // END createTestArguments + + @Override + protected boolean runSignatureTest(String packageOrClassName, + String[] testArguments) throws Exception { + + Class sigTestClass = Class + .forName("com.sun.tdk.signaturetest.SignatureTest"); + Object sigTestInstance = sigTestClass.getDeclaredConstructor().newInstance(); + + ByteArrayOutputStream output = new ByteArrayOutputStream(); + + // do some logging to help with troubleshooting + logger.log(Logger.Level.TRACE, + "\nCalling: com.sun.tdk.signaturetest.SignatureTest() with following args:"); + for (int ii = 0; ii < testArguments.length; ii++) { + logger.log(Logger.Level.TRACE, " testArguments[" + ii + "] = " + testArguments[ii]); + } + + Method runMethod = sigTestClass.getDeclaredMethod("run", + new Class[] { String[].class, PrintWriter.class, PrintWriter.class }); + runMethod.invoke(sigTestInstance, + new Object[] { testArguments, new PrintWriter(output, true), null }); + + String rawMessages = output.toString(); + + // currently, there is no way to determine if there are error msgs in + // the rawmessages, so we will always dump this and call it a status. + logger.log(Logger.Level.INFO, "********** Status Report '" + packageOrClassName + "' **********\n"); + logger.log(Logger.Level.INFO, rawMessages); + + return sigTestInstance.toString().substring(7).startsWith("Passed."); + } // END runSignatureTest + + +} diff --git a/tck/tck-runtime/src/main/java/servlet/tck/signature/SigTestResult.java b/tck/tck-runtime/src/main/java/servlet/tck/signature/SigTestResult.java new file mode 100644 index 000000000..4011f81e1 --- /dev/null +++ b/tck/tck-runtime/src/main/java/servlet/tck/signature/SigTestResult.java @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package servlet.tck.signature; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +public class SigTestResult implements Serializable { + + private static final long serialVersionUID = 1L; + + private static final String NL = System.getProperty("line.separator", "\n"); + + private List failedPkgs = new ArrayList<>(); + + private List passedPkgs = new ArrayList<>(); + + private List failedClasses = new ArrayList<>(); + + private List passedClasses = new ArrayList<>(); + + // ---------------------------------------------------------- Public Methods + + public synchronized boolean passed() { + + return (failedPkgs.size() == 0 && failedClasses.size() == 0); + + } // end passed + + public synchronized void addFailedPkg(String pkg) { + + failedPkgs.add(pkg); + + } // END addFailedPkg + + public synchronized void addPassedPkg(String pkg) { + + passedPkgs.add(pkg); + + } // END addPassedPkg + + public synchronized void addFailedClass(String className) { + + failedClasses.add(className); + + } // END addFailedClass + + public synchronized void addPassedClass(String className) { + + passedClasses.add(className); + + } // END addPassedClass + + @Override + public String toString() { + + String delim = "******************************************************" + + NL; + if (!pkgsTested() && !classesTested()) { + return (delim + "******** No packages or classes were tested **********" + + NL + delim); + } + StringBuffer buf = new StringBuffer(); + buf.append(delim); + buf.append(delim); + if (passed()) { + buf.append("All package signatures passed.").append(NL); + } else { + buf.append("Some signatures failed.").append(NL); + if (failedPkgs.size() > 0) { + buf.append("\tFailed packages listed below: ").append(NL); + formatList(failedPkgs, buf); + } + if (failedClasses.size() > 0) { + buf.append("\tFailed classes listed below: ").append(NL); + formatList(failedClasses, buf); + } + } + if (passedPkgs.size() > 0) { + buf.append("\tPassed packages listed below: ").append(NL); + formatList(passedPkgs, buf); + } + if (passedClasses.size() > 0) { + buf.append("\tPassed classes listed below: ").append(NL); + formatList(passedClasses, buf); + } + buf.append("\t"); + buf.append(delim); + buf.append(delim); + return buf.toString(); + + } // END toString + + // --------------------------------------------------------- Private Methods + + private synchronized void formatList(List list, StringBuffer buf) { + + synchronized (this) { + for (int i = 0; i < list.size(); i++) { + String pkg = list.get(i); + buf.append("\t\t").append(pkg).append(NL); + } + } + + } // END formatList + + private synchronized boolean pkgsTested() { + + return (failedPkgs.size() != 0 || passedPkgs.size() != 0); + + } // END pkgsTested + + private synchronized boolean classesTested() { + + return (failedClasses.size() != 0 || passedClasses.size() != 0); + + } // END classesTested + +} // end class SigTestResult diff --git a/tck/tck-runtime/src/main/java/servlet/tck/signature/SignatureTestDriver.java b/tck/tck-runtime/src/main/java/servlet/tck/signature/SignatureTestDriver.java new file mode 100644 index 000000000..19d76dc18 --- /dev/null +++ b/tck/tck-runtime/src/main/java/servlet/tck/signature/SignatureTestDriver.java @@ -0,0 +1,447 @@ +/* + * Copyright (c) 2007, 2024 Oracle and/or its affiliates and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package servlet.tck.signature; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Enumeration; +import java.util.Properties; + +import java.lang.System.Logger; + +/** + * Allows the sigtest framework to be extended using different signature test + * implementations (e.g. ApiCheck, or SigTest) + */ +public abstract class SignatureTestDriver { + + private static final Logger logger = System.getLogger(SignatureTestDriver.class.getName()); + + private static final String SIG_FILE_EXT = ".sig"; + + private static final String SIG_FILE_VER_SEP = "_"; + + // ---------------------------------------------------------- Public Methods + + /** + *

+ * Execute the signature test. By default, this method passes the result of + * {@link #createTestArguments(String, String, String, String, String)} and + * passes the result to {@link #runSignatureTest(String, String[])}. + * + * @param packageListFile + * - file containing the packages/classes that are to be verified + * @param mapFile + * sig-test.map file + * @param signatureRepositoryDir + * directory containing the recorded signatures + * @param packagesUnderTest + * packages, defined by the test client, that should be tested + * @param classesUnderTest + * classes, defined by the test client, that should be tested + * @param classpath + * The location of the API being verified. Normally the checked API + * will be available in the test environment and testClasspath will + * be null. In some rare cases the tested API may not be part of the + * test environment and will have to specified using this parameter. + * + * @return a {@link SigTestResult} containing the result of the test execution + */ + public SigTestResult executeSigTest(String packageListFile, String mapFile, + String signatureRepositoryDir, String[] packagesUnderTest, + String[] classesUnderTest, String classpath) + throws Exception { + + SigTestResult result = new SigTestResult(); + + if (packagesUnderTest != null && packagesUnderTest.length > 0) { + logger.log(Logger.Level.INFO, "********** BEGIN PACKAGE LEVEL SIGNATURE " + + "VALIDATION **********\n\n"); + for (int i = 0; i < packagesUnderTest.length; i++) { + + String packageName = packagesUnderTest[i]; + + logger.log(Logger.Level.INFO, "********** BEGIN VALIDATE PACKAGE '" + + packagesUnderTest[i] + "' **********\n"); + + logger.log(Logger.Level.INFO, + "********** VALIDATE IN STATIC MODE - TO CHECK CONSANT VALUES ****"); + logger.log(Logger.Level.INFO, "Static mode supports checks of static constants values "); + + String[] args = createTestArguments(packageListFile, mapFile, + signatureRepositoryDir, packageName, classpath, true); + dumpTestArguments(args); + + if (runSignatureTest(packageName, args)) { + logger.log(Logger.Level.INFO, "********** Package '" + packageName + + "' - PASSED (STATIC MODE) **********"); + result.addPassedPkg(packageName + "(static mode)"); + } else { + result.addFailedPkg(packageName + "(static mode)"); + logger.log(Logger.Level.INFO, "********** Package '" + packageName + + "' - FAILED (STATIC MODE) **********"); + } + + logger.log(Logger.Level.INFO, "\n\n"); + logger.log(Logger.Level.INFO, "********** VALIDATE IN REFLECTIVE MODE ****"); + logger.log(Logger.Level.INFO, + "Reflective mode supports verification within containers (ie ejb, servlet, etc)"); + + String[] args2 = createTestArguments(packageListFile, mapFile, + signatureRepositoryDir, packageName, classpath, false); + dumpTestArguments(args2); + + if (runSignatureTest(packageName, args2)) { + logger.log(Logger.Level.INFO, "********** Package '" + packageName + + "' - PASSED (REFLECTION MODE) **********"); + result.addPassedPkg(packageName + "(reflection mode)"); + } else { + result.addFailedPkg(packageName + "(reflection mode)"); + logger.log(Logger.Level.INFO, "********** Package '" + packageName + + "' - FAILED (REFLECTION MODE) **********"); + } + + logger.log(Logger.Level.INFO, "********** END VALIDATE PACKAGE '" + + packagesUnderTest[i] + "' **********\n"); + + logger.log(Logger.Level.INFO, "\n"); + logger.log(Logger.Level.INFO, "\n"); + + } + } + + if (classesUnderTest != null && classesUnderTest.length > 0) { + logger.log(Logger.Level.INFO, "********** BEGIN CLASS LEVEL SIGNATURE " + + "VALIDATION **********\n\n"); + + for (int i = 0; i < classesUnderTest.length; i++) { + + String className = classesUnderTest[i]; + + logger.log(Logger.Level.INFO, "********** BEGIN VALIDATE CLASS '" + + classesUnderTest[i] + "' **********\n"); + + logger.log(Logger.Level.INFO, + "********** VALIDATE IN STATIC MODE - TO CHECK CONSANT VALUES ****"); + logger.log(Logger.Level.INFO, "Static mode supports checks of static constants values "); + + String[] args = createTestArguments(packageListFile, mapFile, + signatureRepositoryDir, className, classpath, true); + dumpTestArguments(args); + + if (runSignatureTest(className, args)) { + logger.log(Logger.Level.INFO, "********** Class '" + className + + "' - PASSED (STATIC MODE) **********"); + result.addPassedClass(className + "(static mode)"); + } else { + logger.log(Logger.Level.INFO, "********** Class '" + className + + "' - FAILED (STATIC MODE) **********"); + result.addFailedClass(className + "(static mode)"); + } + + logger.log(Logger.Level.INFO, "\n\n"); + logger.log(Logger.Level.INFO, "********** VALIDATE IN REFLECTIVE MODE ****"); + logger.log(Logger.Level.INFO, + "Reflective mode supports verification within containers (ie ejb, servlet, etc)"); + + String[] args2 = createTestArguments(packageListFile, mapFile, + signatureRepositoryDir, className, classpath, false); + dumpTestArguments(args2); + + if (runSignatureTest(className, args2)) { + logger.log(Logger.Level.INFO, "********** Class '" + className + + "' - PASSED (REFLECTION MODE) **********"); + result.addPassedClass(className + "(reflection mode)"); + } else { + logger.log(Logger.Level.INFO, "********** Class '" + className + + "' - FAILED (REFLECTION MODE) **********"); + result.addFailedClass(className + "(reflection mode)"); + } + + logger.log(Logger.Level.INFO, "********** END VALIDATE CLASS '" + classesUnderTest[i] + + "' **********\n"); + + logger.log(Logger.Level.INFO, "\n"); + logger.log(Logger.Level.INFO, "\n"); + + } + } + + return result; + + } // END executeSigTest + + // ------------------------------------------------------- Protected Methods + + /** + * Using a common set of information, create arguments that are appropriate to + * be used with the underlying signature test framework. + * + * @param packageListFile + * - file containing the packages/classes that are to be verified + * @param mapFile + * sig-test.map file + * @param signatureRepositoryDir + * directory containing the recorded signatures + * @param packageOrClassUnderTest + * the class or package + * @param classpath + * The location of the API being verified. Normally the checked API + * will be available in the test environment and testClasspath will + * be null. In some rare cases the tested API may not be part of the + * test environment and will have to specified using this parameter. + */ + protected abstract String[] createTestArguments(String packageListFile, + String mapFile, String signatureRepositoryDir, + String packageOrClassUnderTest, String classpath, boolean bStaticMode) + throws Exception; + + /** + * Invoke the underlying signature test framework for the specified package or + * class. + * + * @param packageOrClassName + * the package or class to be validated + * @param testArguments + * the arguments necessary to invoke the signature test framework + * + * @return true if the test passed, otherwise false + */ + protected abstract boolean runSignatureTest(String packageOrClassName, + String[] testArguments) throws Exception; + + + /** + * Loads the specified file into a Properties object provided the specified + * file exists and is a regular file. The call to new FileInputStream verifies + * that the specfied file is a regular file and exists. + * + * @param mapFile + * the path and name of the map file to be loaded + * + * @return Properties The Properties object initialized with the contents of + * the specified file + * + * @throws java.io.IOException + * If the specified map file does not exist or is not a regular + * file, can also be thrown if there is an error creating an input + * stream from the specified file. + */ + public Properties loadMapFile(String mapFile) + throws IOException, FileNotFoundException { + + FileInputStream in = null; + try { + File map = new File(mapFile); + Properties props = new Properties(); + in = new FileInputStream(map); + props.load(in); + return props; + } finally { + try { + if (in != null) { + in.close(); + } + } catch (Throwable t) { + // do nothing + } + } + + } // END loadMapFile + + /** + * This method will attempt to build a fully-qualified filename in the format + * of respositoryDir + baseName + + * .sig_ + version. + * + * @param baseName + * the base portion of the signature filename + * @param repositoryDir + * the directory in which the signatures are stored + * @param version + * the version of the signature file + * @throws FileNotFoundException + * if the file cannot be validated as existing and is in fact a file + * @return a valid, fully qualified filename, appropriate for the system the + * test is being run on + */ + protected String getSigFileName(String baseName, String repositoryDir, + String version) throws FileNotFoundException { + + String sigFile; + if (repositoryDir.endsWith(File.separator)) { + sigFile = repositoryDir + baseName + SIG_FILE_EXT + SIG_FILE_VER_SEP + + version; + } else { + sigFile = repositoryDir + File.separator + baseName + SIG_FILE_EXT + + SIG_FILE_VER_SEP + version; + } + + File testFile = new File(sigFile); + + if (!testFile.exists() && !testFile.isFile()) { + throw new FileNotFoundException( + "Signature file \"" + sigFile + "\" does not exist."); + } + + // we are actually requiring this normalizeFileName call to get + // things working on Windows. Without this, if we just return the + // testFile; we will fail on windows. (Solaris works either way) + // IMPORTANT UPDATE!! (4/5/2011) + // in sigtest 2.2: they stopped supporting the normalized version which + // created a string filename = + // "file://com/sun/ts/tests/signaturetest/foo.sig" + // so now use file path and name only. + // return normalizeFileName(testFile); + return testFile.toString(); + + } // END getSigFileName + + + /** + * Returns the name and path to the signature file that contains the specified + * package's signatures. + * + * @param packageName + * The package under test + * @param mapFile + * The name of the file that maps package names to versions + * @param repositoryDir + * The directory that conatisn all signature files + * + * @return String The path and name of the siganture file that contains the + * specified package's signatures + * + * @throws Exception + * if the determined signature file is not a regular file or does + * not exist + */ + protected SignatureFileInfo getSigFileInfo(String packageName, String mapFile, + String repositoryDir) throws Exception { + + String originalPackage = packageName; + String name = null; + String version = null; + Properties props = loadMapFile(mapFile); + + while (true) { + boolean packageFound = false; + for (Enumeration e = props.propertyNames(); e.hasMoreElements();) { + name = (String) (e.nextElement()); + if (name.equals(packageName)) { + version = props.getProperty(name); + packageFound = true; + break; + } // end if + } // end for + + if (packageFound) { + break; + } + + /* + * If we get here we did not find a package name in the properties file + * that matches the package name under test. So we look for a package name + * in the properties file that could be the parent package for the package + * under test. We do this by removing the specified packages last package + * name section. So jakarta.ejb.spi would become jakarta.ejb + */ + int index = packageName.lastIndexOf("."); + if (index <= 0) { + throw new Exception("Package \"" + originalPackage + + "\" not specified in mapping file \"" + mapFile + "\"."); + } + packageName = packageName.substring(0, index); + } // end while + + /* Return the expected name of the signature file */ + + return new SignatureFileInfo(getSigFileName(name, repositoryDir, version), + version); + + } // END getSigFileInfo + + // --------------------------------------------------------- Private Methods + + /** + * Prints the specified list of parameters to the message log. Used for + * debugging purposes only. + * + * @param params + * The list of parameters to dump. + */ + private static void dumpTestArguments(String[] params) { + + if (params != null && params.length > 0) { + logger.log(Logger.Level.TRACE, "----------------- BEGIN SIG PARAM DUMP -----------------"); + for (int i = 0; i < params.length; i++) { + logger.log(Logger.Level.TRACE, " Param[" + i + "]: " + params[i]); + } + logger.log(Logger.Level.TRACE, "------------------ END SIG PARAM DUMP ------------------"); + } + + } // END dumpTestArguments + + // ----------------------------------------------------------- Inner Classes + + /** + * A simple data structure containing the fully qualified path to the + * signature file as well as the version being tested. + */ + protected static class SignatureFileInfo { + + private String file; + + private String version; + + // -------------------------------------------------------- Constructors + + public SignatureFileInfo(String file, String version) { + + if (file == null) { + throw new IllegalArgumentException("'file' argument cannot be null"); + } + + if (version == null) { + throw new IllegalArgumentException("'version' argument cannot be null"); + } + + this.file = file; + this.version = version; + + } // END SignatureFileInfo + + // ------------------------------------------------------ Public Methods + + public String getFile() { + + return file; + + } // END getFileIncludingPath + + public String getVersion() { + + return version; + + } // END getVersion + + } + +} // END SigTestDriver diff --git a/tck/tck-runtime/src/main/java/servlet/tck/signature/SignatureTestDriverFactory.java b/tck/tck-runtime/src/main/java/servlet/tck/signature/SignatureTestDriverFactory.java new file mode 100644 index 000000000..b9e34cfd2 --- /dev/null +++ b/tck/tck-runtime/src/main/java/servlet/tck/signature/SignatureTestDriverFactory.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package servlet.tck.signature; + +/** + *

+ * Factory to obtain SignatureTestDriver implementations. + *

+ */ +public class SignatureTestDriverFactory { + + /** + *

+ * Identifier for the driver that uses the Signature Test framwork for + * signature validation. + *

+ */ + public static final String SIG_TEST = "sigtest"; + + // ------------------------------------------------------------ Constructors + + // Access via factory method + private SignatureTestDriverFactory() { + } // END SignatureTestDriverFactory + + // ---------------------------------------------------------- Public Methods + + /** + *

+ * Obtain a {@link SignatureTestDriver} instance based on the + * type argument. + * + * @param type + * the driver type to create + * @return a {@link SignatureTestDriver} implementation + */ + public static SignatureTestDriver getInstance(String type) { + + if (type == null || type.length() == 0) { + throw new IllegalArgumentException("Type was null or empty"); + } + + if (SIG_TEST.equals(type)) { + return new SigTestDriver(); + } else { + throw new IllegalArgumentException("Unknown Type: '" + type + '\''); + } + + } // END getInstance + +} // END SignatureTestDriverFactory diff --git a/tck/tck-runtime/src/main/resources/servlet/tck/signature/jakarta.servlet.sig_6.1 b/tck/tck-runtime/src/main/resources/servlet/tck/signature/jakarta.servlet.sig_6.1 new file mode 100644 index 000000000..de165d810 --- /dev/null +++ b/tck/tck-runtime/src/main/resources/servlet/tck/signature/jakarta.servlet.sig_6.1 @@ -0,0 +1,1232 @@ +#Signature file v4.1 +#Version 6.1 + +CLSS public abstract interface jakarta.servlet.AsyncContext +fld public final static java.lang.String ASYNC_CONTEXT_PATH = "jakarta.servlet.async.context_path" +fld public final static java.lang.String ASYNC_MAPPING = "jakarta.servlet.async.mapping" +fld public final static java.lang.String ASYNC_PATH_INFO = "jakarta.servlet.async.path_info" +fld public final static java.lang.String ASYNC_QUERY_STRING = "jakarta.servlet.async.query_string" +fld public final static java.lang.String ASYNC_REQUEST_URI = "jakarta.servlet.async.request_uri" +fld public final static java.lang.String ASYNC_SERVLET_PATH = "jakarta.servlet.async.servlet_path" +meth public abstract <%0 extends jakarta.servlet.AsyncListener> {%%0} createListener(java.lang.Class<{%%0}>) throws jakarta.servlet.ServletException +meth public abstract boolean hasOriginalRequestAndResponse() +meth public abstract jakarta.servlet.ServletRequest getRequest() +meth public abstract jakarta.servlet.ServletResponse getResponse() +meth public abstract long getTimeout() +meth public abstract void addListener(jakarta.servlet.AsyncListener) +meth public abstract void addListener(jakarta.servlet.AsyncListener,jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse) +meth public abstract void complete() +meth public abstract void dispatch() +meth public abstract void dispatch(jakarta.servlet.ServletContext,java.lang.String) +meth public abstract void dispatch(java.lang.String) +meth public abstract void setTimeout(long) +meth public abstract void start(java.lang.Runnable) + +CLSS public jakarta.servlet.AsyncEvent +cons public init(jakarta.servlet.AsyncContext) +cons public init(jakarta.servlet.AsyncContext,jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse) +cons public init(jakarta.servlet.AsyncContext,jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse,java.lang.Throwable) +cons public init(jakarta.servlet.AsyncContext,java.lang.Throwable) +meth public jakarta.servlet.AsyncContext getAsyncContext() +meth public jakarta.servlet.ServletRequest getSuppliedRequest() +meth public jakarta.servlet.ServletResponse getSuppliedResponse() +meth public java.lang.Throwable getThrowable() +supr java.lang.Object +hfds context,request,response,throwable + +CLSS public abstract interface jakarta.servlet.AsyncListener +intf java.util.EventListener +meth public abstract void onComplete(jakarta.servlet.AsyncEvent) throws java.io.IOException +meth public abstract void onError(jakarta.servlet.AsyncEvent) throws java.io.IOException +meth public abstract void onStartAsync(jakarta.servlet.AsyncEvent) throws java.io.IOException +meth public abstract void onTimeout(jakarta.servlet.AsyncEvent) throws java.io.IOException + +CLSS public final !enum jakarta.servlet.DispatcherType +fld public final static jakarta.servlet.DispatcherType ASYNC +fld public final static jakarta.servlet.DispatcherType ERROR +fld public final static jakarta.servlet.DispatcherType FORWARD +fld public final static jakarta.servlet.DispatcherType INCLUDE +fld public final static jakarta.servlet.DispatcherType REQUEST +meth public static jakarta.servlet.DispatcherType valueOf(java.lang.String) +meth public static jakarta.servlet.DispatcherType[] values() +supr java.lang.Enum + +CLSS public abstract interface jakarta.servlet.Filter +meth public abstract void doFilter(jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse,jakarta.servlet.FilterChain) throws jakarta.servlet.ServletException,java.io.IOException +meth public void destroy() +meth public void init(jakarta.servlet.FilterConfig) throws jakarta.servlet.ServletException + +CLSS public abstract interface jakarta.servlet.FilterChain +meth public abstract void doFilter(jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse) throws jakarta.servlet.ServletException,java.io.IOException + +CLSS public abstract interface jakarta.servlet.FilterConfig +meth public abstract jakarta.servlet.ServletContext getServletContext() +meth public abstract java.lang.String getFilterName() +meth public abstract java.lang.String getInitParameter(java.lang.String) +meth public abstract java.util.Enumeration getInitParameterNames() + +CLSS public abstract interface jakarta.servlet.FilterRegistration +innr public abstract interface static Dynamic +intf jakarta.servlet.Registration +meth public abstract !varargs void addMappingForServletNames(java.util.EnumSet,boolean,java.lang.String[]) +meth public abstract !varargs void addMappingForUrlPatterns(java.util.EnumSet,boolean,java.lang.String[]) +meth public abstract java.util.Collection getServletNameMappings() +meth public abstract java.util.Collection getUrlPatternMappings() + +CLSS public abstract interface static jakarta.servlet.FilterRegistration$Dynamic + outer jakarta.servlet.FilterRegistration +intf jakarta.servlet.FilterRegistration +intf jakarta.servlet.Registration$Dynamic + +CLSS public abstract jakarta.servlet.GenericFilter +cons public init() +intf jakarta.servlet.Filter +intf jakarta.servlet.FilterConfig +intf java.io.Serializable +meth public jakarta.servlet.FilterConfig getFilterConfig() +meth public jakarta.servlet.ServletContext getServletContext() +meth public java.lang.String getFilterName() +meth public java.lang.String getInitParameter(java.lang.String) +meth public java.util.Enumeration getInitParameterNames() +meth public void init() throws jakarta.servlet.ServletException +meth public void init(jakarta.servlet.FilterConfig) throws jakarta.servlet.ServletException +supr java.lang.Object +hfds LSTRING_FILE,config,lStrings,serialVersionUID + +CLSS public abstract jakarta.servlet.GenericServlet +cons public init() +intf jakarta.servlet.Servlet +intf jakarta.servlet.ServletConfig +intf java.io.Serializable +meth public abstract void service(jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse) throws jakarta.servlet.ServletException,java.io.IOException +meth public jakarta.servlet.ServletConfig getServletConfig() +meth public jakarta.servlet.ServletContext getServletContext() +meth public java.lang.String getInitParameter(java.lang.String) +meth public java.lang.String getServletInfo() +meth public java.lang.String getServletName() +meth public java.util.Enumeration getInitParameterNames() +meth public void destroy() +meth public void init() throws jakarta.servlet.ServletException +meth public void init(jakarta.servlet.ServletConfig) throws jakarta.servlet.ServletException +meth public void log(java.lang.String) +meth public void log(java.lang.String,java.lang.Throwable) +supr java.lang.Object +hfds LSTRING_FILE,config,lStrings,serialVersionUID + +CLSS public jakarta.servlet.HttpConstraintElement +cons public !varargs init(jakarta.servlet.annotation.ServletSecurity$EmptyRoleSemantic,jakarta.servlet.annotation.ServletSecurity$TransportGuarantee,java.lang.String[]) +cons public !varargs init(jakarta.servlet.annotation.ServletSecurity$TransportGuarantee,java.lang.String[]) +cons public init() +cons public init(jakarta.servlet.annotation.ServletSecurity$EmptyRoleSemantic) +meth public jakarta.servlet.annotation.ServletSecurity$EmptyRoleSemantic getEmptyRoleSemantic() +meth public jakarta.servlet.annotation.ServletSecurity$TransportGuarantee getTransportGuarantee() +meth public java.lang.String[] getRolesAllowed() +supr java.lang.Object +hfds emptyRoleSemantic,rolesAllowed,transportGuarantee + +CLSS public jakarta.servlet.HttpMethodConstraintElement +cons public init(java.lang.String) +cons public init(java.lang.String,jakarta.servlet.HttpConstraintElement) +meth public java.lang.String getMethodName() +supr jakarta.servlet.HttpConstraintElement +hfds methodName + +CLSS public jakarta.servlet.MultipartConfigElement +cons public init(jakarta.servlet.annotation.MultipartConfig) +cons public init(java.lang.String) +cons public init(java.lang.String,long,long,int) +meth public int getFileSizeThreshold() +meth public java.lang.String getLocation() +meth public long getMaxFileSize() +meth public long getMaxRequestSize() +supr java.lang.Object +hfds fileSizeThreshold,location,maxFileSize,maxRequestSize + +CLSS public abstract interface jakarta.servlet.ReadListener +intf java.util.EventListener +meth public abstract void onAllDataRead() throws java.io.IOException +meth public abstract void onDataAvailable() throws java.io.IOException +meth public abstract void onError(java.lang.Throwable) + +CLSS public abstract interface jakarta.servlet.Registration +innr public abstract interface static Dynamic +meth public abstract boolean setInitParameter(java.lang.String,java.lang.String) +meth public abstract java.lang.String getClassName() +meth public abstract java.lang.String getInitParameter(java.lang.String) +meth public abstract java.lang.String getName() +meth public abstract java.util.Map getInitParameters() +meth public abstract java.util.Set setInitParameters(java.util.Map) + +CLSS public abstract interface static jakarta.servlet.Registration$Dynamic + outer jakarta.servlet.Registration +intf jakarta.servlet.Registration +meth public abstract void setAsyncSupported(boolean) + +CLSS public abstract interface jakarta.servlet.RequestDispatcher +fld public final static java.lang.String ERROR_EXCEPTION = "jakarta.servlet.error.exception" +fld public final static java.lang.String ERROR_EXCEPTION_TYPE = "jakarta.servlet.error.exception_type" +fld public final static java.lang.String ERROR_MESSAGE = "jakarta.servlet.error.message" +fld public final static java.lang.String ERROR_METHOD = "jakarta.servlet.error.method" +fld public final static java.lang.String ERROR_QUERY_STRING = "jakarta.servlet.error.query_string" +fld public final static java.lang.String ERROR_REQUEST_URI = "jakarta.servlet.error.request_uri" +fld public final static java.lang.String ERROR_SERVLET_NAME = "jakarta.servlet.error.servlet_name" +fld public final static java.lang.String ERROR_STATUS_CODE = "jakarta.servlet.error.status_code" +fld public final static java.lang.String FORWARD_CONTEXT_PATH = "jakarta.servlet.forward.context_path" +fld public final static java.lang.String FORWARD_MAPPING = "jakarta.servlet.forward.mapping" +fld public final static java.lang.String FORWARD_PATH_INFO = "jakarta.servlet.forward.path_info" +fld public final static java.lang.String FORWARD_QUERY_STRING = "jakarta.servlet.forward.query_string" +fld public final static java.lang.String FORWARD_REQUEST_URI = "jakarta.servlet.forward.request_uri" +fld public final static java.lang.String FORWARD_SERVLET_PATH = "jakarta.servlet.forward.servlet_path" +fld public final static java.lang.String INCLUDE_CONTEXT_PATH = "jakarta.servlet.include.context_path" +fld public final static java.lang.String INCLUDE_MAPPING = "jakarta.servlet.include.mapping" +fld public final static java.lang.String INCLUDE_PATH_INFO = "jakarta.servlet.include.path_info" +fld public final static java.lang.String INCLUDE_QUERY_STRING = "jakarta.servlet.include.query_string" +fld public final static java.lang.String INCLUDE_REQUEST_URI = "jakarta.servlet.include.request_uri" +fld public final static java.lang.String INCLUDE_SERVLET_PATH = "jakarta.servlet.include.servlet_path" +meth public abstract void forward(jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void include(jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse) throws jakarta.servlet.ServletException,java.io.IOException + +CLSS public abstract interface jakarta.servlet.Servlet +meth public abstract jakarta.servlet.ServletConfig getServletConfig() +meth public abstract java.lang.String getServletInfo() +meth public abstract void destroy() +meth public abstract void init(jakarta.servlet.ServletConfig) throws jakarta.servlet.ServletException +meth public abstract void service(jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse) throws jakarta.servlet.ServletException,java.io.IOException + +CLSS public abstract interface jakarta.servlet.ServletConfig +meth public abstract jakarta.servlet.ServletContext getServletContext() +meth public abstract java.lang.String getInitParameter(java.lang.String) +meth public abstract java.lang.String getServletName() +meth public abstract java.util.Enumeration getInitParameterNames() + +CLSS public abstract interface jakarta.servlet.ServletConnection +meth public abstract boolean isSecure() +meth public abstract java.lang.String getConnectionId() +meth public abstract java.lang.String getProtocol() +meth public abstract java.lang.String getProtocolConnectionId() + +CLSS public abstract interface jakarta.servlet.ServletContainerInitializer +meth public abstract void onStartup(java.util.Set>,jakarta.servlet.ServletContext) throws jakarta.servlet.ServletException + +CLSS public abstract interface jakarta.servlet.ServletContext +fld public final static java.lang.String ORDERED_LIBS = "jakarta.servlet.context.orderedLibs" +fld public final static java.lang.String TEMPDIR = "jakarta.servlet.context.tempdir" +meth public abstract !varargs void declareRoles(java.lang.String[]) +meth public abstract <%0 extends jakarta.servlet.Filter> {%%0} createFilter(java.lang.Class<{%%0}>) throws jakarta.servlet.ServletException +meth public abstract <%0 extends jakarta.servlet.Servlet> {%%0} createServlet(java.lang.Class<{%%0}>) throws jakarta.servlet.ServletException +meth public abstract <%0 extends java.util.EventListener> void addListener({%%0}) +meth public abstract <%0 extends java.util.EventListener> {%%0} createListener(java.lang.Class<{%%0}>) throws jakarta.servlet.ServletException +meth public abstract boolean setInitParameter(java.lang.String,java.lang.String) +meth public abstract int getEffectiveMajorVersion() +meth public abstract int getEffectiveMinorVersion() +meth public abstract int getMajorVersion() +meth public abstract int getMinorVersion() +meth public abstract int getSessionTimeout() +meth public abstract jakarta.servlet.FilterRegistration getFilterRegistration(java.lang.String) +meth public abstract jakarta.servlet.FilterRegistration$Dynamic addFilter(java.lang.String,jakarta.servlet.Filter) +meth public abstract jakarta.servlet.FilterRegistration$Dynamic addFilter(java.lang.String,java.lang.Class) +meth public abstract jakarta.servlet.FilterRegistration$Dynamic addFilter(java.lang.String,java.lang.String) +meth public abstract jakarta.servlet.RequestDispatcher getNamedDispatcher(java.lang.String) +meth public abstract jakarta.servlet.RequestDispatcher getRequestDispatcher(java.lang.String) +meth public abstract jakarta.servlet.ServletContext getContext(java.lang.String) +meth public abstract jakarta.servlet.ServletRegistration getServletRegistration(java.lang.String) +meth public abstract jakarta.servlet.ServletRegistration$Dynamic addJspFile(java.lang.String,java.lang.String) +meth public abstract jakarta.servlet.ServletRegistration$Dynamic addServlet(java.lang.String,jakarta.servlet.Servlet) +meth public abstract jakarta.servlet.ServletRegistration$Dynamic addServlet(java.lang.String,java.lang.Class) +meth public abstract jakarta.servlet.ServletRegistration$Dynamic addServlet(java.lang.String,java.lang.String) +meth public abstract jakarta.servlet.SessionCookieConfig getSessionCookieConfig() +meth public abstract jakarta.servlet.descriptor.JspConfigDescriptor getJspConfigDescriptor() +meth public abstract java.io.InputStream getResourceAsStream(java.lang.String) +meth public abstract java.lang.ClassLoader getClassLoader() +meth public abstract java.lang.Object getAttribute(java.lang.String) +meth public abstract java.lang.String getContextPath() +meth public abstract java.lang.String getInitParameter(java.lang.String) +meth public abstract java.lang.String getMimeType(java.lang.String) +meth public abstract java.lang.String getRealPath(java.lang.String) +meth public abstract java.lang.String getRequestCharacterEncoding() +meth public abstract java.lang.String getResponseCharacterEncoding() +meth public abstract java.lang.String getServerInfo() +meth public abstract java.lang.String getServletContextName() +meth public abstract java.lang.String getVirtualServerName() +meth public abstract java.net.URL getResource(java.lang.String) throws java.net.MalformedURLException +meth public abstract java.util.Enumeration getAttributeNames() +meth public abstract java.util.Enumeration getInitParameterNames() +meth public abstract java.util.Map getFilterRegistrations() +meth public abstract java.util.Map getServletRegistrations() +meth public abstract java.util.Set getDefaultSessionTrackingModes() +meth public abstract java.util.Set getEffectiveSessionTrackingModes() +meth public abstract java.util.Set getResourcePaths(java.lang.String) +meth public abstract void addListener(java.lang.Class) +meth public abstract void addListener(java.lang.String) +meth public abstract void log(java.lang.String) +meth public abstract void log(java.lang.String,java.lang.Throwable) +meth public abstract void removeAttribute(java.lang.String) +meth public abstract void setAttribute(java.lang.String,java.lang.Object) +meth public abstract void setRequestCharacterEncoding(java.lang.String) +meth public abstract void setResponseCharacterEncoding(java.lang.String) +meth public abstract void setSessionTimeout(int) +meth public abstract void setSessionTrackingModes(java.util.Set) +meth public void setRequestCharacterEncoding(java.nio.charset.Charset) +meth public void setResponseCharacterEncoding(java.nio.charset.Charset) + +CLSS public jakarta.servlet.ServletContextAttributeEvent +cons public init(jakarta.servlet.ServletContext,java.lang.String,java.lang.Object) +meth public java.lang.Object getValue() +meth public java.lang.String getName() +supr jakarta.servlet.ServletContextEvent +hfds name,serialVersionUID,value + +CLSS public abstract interface jakarta.servlet.ServletContextAttributeListener +intf java.util.EventListener +meth public void attributeAdded(jakarta.servlet.ServletContextAttributeEvent) +meth public void attributeRemoved(jakarta.servlet.ServletContextAttributeEvent) +meth public void attributeReplaced(jakarta.servlet.ServletContextAttributeEvent) + +CLSS public jakarta.servlet.ServletContextEvent +cons public init(jakarta.servlet.ServletContext) +meth public jakarta.servlet.ServletContext getServletContext() +supr java.util.EventObject +hfds serialVersionUID + +CLSS public abstract interface jakarta.servlet.ServletContextListener +intf java.util.EventListener +meth public void contextDestroyed(jakarta.servlet.ServletContextEvent) +meth public void contextInitialized(jakarta.servlet.ServletContextEvent) + +CLSS public jakarta.servlet.ServletException +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +meth public java.lang.Throwable getRootCause() +supr java.lang.Exception +hfds rootCause,serialVersionUID + +CLSS public abstract jakarta.servlet.ServletInputStream +cons protected init() +meth public abstract boolean isFinished() +meth public abstract boolean isReady() +meth public abstract void setReadListener(jakarta.servlet.ReadListener) +meth public byte[] readAllBytes() throws java.io.IOException +meth public byte[] readNBytes(int) throws java.io.IOException +meth public int read(java.nio.ByteBuffer) throws java.io.IOException +meth public int readLine(byte[],int,int) throws java.io.IOException +meth public int readNBytes(byte[],int,int) throws java.io.IOException +supr java.io.InputStream + +CLSS public abstract jakarta.servlet.ServletOutputStream +cons protected init() +meth public abstract boolean isReady() +meth public abstract void setWriteListener(jakarta.servlet.WriteListener) +meth public void close() throws java.io.IOException +meth public void print(boolean) throws java.io.IOException +meth public void print(char) throws java.io.IOException +meth public void print(double) throws java.io.IOException +meth public void print(float) throws java.io.IOException +meth public void print(int) throws java.io.IOException +meth public void print(java.lang.String) throws java.io.IOException +meth public void print(long) throws java.io.IOException +meth public void println() throws java.io.IOException +meth public void println(boolean) throws java.io.IOException +meth public void println(char) throws java.io.IOException +meth public void println(double) throws java.io.IOException +meth public void println(float) throws java.io.IOException +meth public void println(int) throws java.io.IOException +meth public void println(java.lang.String) throws java.io.IOException +meth public void println(long) throws java.io.IOException +meth public void write(java.nio.ByteBuffer) throws java.io.IOException +supr java.io.OutputStream +hfds LSTRING_FILE,lStrings + +CLSS public abstract interface jakarta.servlet.ServletRegistration +innr public abstract interface static Dynamic +intf jakarta.servlet.Registration +meth public abstract !varargs java.util.Set addMapping(java.lang.String[]) +meth public abstract java.lang.String getRunAsRole() +meth public abstract java.util.Collection getMappings() + +CLSS public abstract interface static jakarta.servlet.ServletRegistration$Dynamic + outer jakarta.servlet.ServletRegistration +intf jakarta.servlet.Registration$Dynamic +intf jakarta.servlet.ServletRegistration +meth public abstract java.util.Set setServletSecurity(jakarta.servlet.ServletSecurityElement) +meth public abstract void setLoadOnStartup(int) +meth public abstract void setMultipartConfig(jakarta.servlet.MultipartConfigElement) +meth public abstract void setRunAsRole(java.lang.String) + +CLSS public abstract interface jakarta.servlet.ServletRequest +meth public abstract boolean isAsyncStarted() +meth public abstract boolean isAsyncSupported() +meth public abstract boolean isSecure() +meth public abstract int getContentLength() +meth public abstract int getLocalPort() +meth public abstract int getRemotePort() +meth public abstract int getServerPort() +meth public abstract jakarta.servlet.AsyncContext getAsyncContext() +meth public abstract jakarta.servlet.AsyncContext startAsync() +meth public abstract jakarta.servlet.AsyncContext startAsync(jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse) +meth public abstract jakarta.servlet.DispatcherType getDispatcherType() +meth public abstract jakarta.servlet.RequestDispatcher getRequestDispatcher(java.lang.String) +meth public abstract jakarta.servlet.ServletConnection getServletConnection() +meth public abstract jakarta.servlet.ServletContext getServletContext() +meth public abstract jakarta.servlet.ServletInputStream getInputStream() throws java.io.IOException +meth public abstract java.io.BufferedReader getReader() throws java.io.IOException +meth public abstract java.lang.Object getAttribute(java.lang.String) +meth public abstract java.lang.String getCharacterEncoding() +meth public abstract java.lang.String getContentType() +meth public abstract java.lang.String getLocalAddr() +meth public abstract java.lang.String getLocalName() +meth public abstract java.lang.String getParameter(java.lang.String) +meth public abstract java.lang.String getProtocol() +meth public abstract java.lang.String getProtocolRequestId() +meth public abstract java.lang.String getRemoteAddr() +meth public abstract java.lang.String getRemoteHost() +meth public abstract java.lang.String getRequestId() +meth public abstract java.lang.String getScheme() +meth public abstract java.lang.String getServerName() +meth public abstract java.lang.String[] getParameterValues(java.lang.String) +meth public abstract java.util.Enumeration getAttributeNames() +meth public abstract java.util.Enumeration getParameterNames() +meth public abstract java.util.Enumeration getLocales() +meth public abstract java.util.Locale getLocale() +meth public abstract java.util.Map getParameterMap() +meth public abstract long getContentLengthLong() +meth public abstract void removeAttribute(java.lang.String) +meth public abstract void setAttribute(java.lang.String,java.lang.Object) +meth public abstract void setCharacterEncoding(java.lang.String) throws java.io.UnsupportedEncodingException +meth public void setCharacterEncoding(java.nio.charset.Charset) + +CLSS public jakarta.servlet.ServletRequestAttributeEvent +cons public init(jakarta.servlet.ServletContext,jakarta.servlet.ServletRequest,java.lang.String,java.lang.Object) +meth public java.lang.Object getValue() +meth public java.lang.String getName() +supr jakarta.servlet.ServletRequestEvent +hfds name,serialVersionUID,value + +CLSS public abstract interface jakarta.servlet.ServletRequestAttributeListener +intf java.util.EventListener +meth public void attributeAdded(jakarta.servlet.ServletRequestAttributeEvent) +meth public void attributeRemoved(jakarta.servlet.ServletRequestAttributeEvent) +meth public void attributeReplaced(jakarta.servlet.ServletRequestAttributeEvent) + +CLSS public jakarta.servlet.ServletRequestEvent +cons public init(jakarta.servlet.ServletContext,jakarta.servlet.ServletRequest) +meth public jakarta.servlet.ServletContext getServletContext() +meth public jakarta.servlet.ServletRequest getServletRequest() +supr java.util.EventObject +hfds request,serialVersionUID + +CLSS public abstract interface jakarta.servlet.ServletRequestListener +intf java.util.EventListener +meth public void requestDestroyed(jakarta.servlet.ServletRequestEvent) +meth public void requestInitialized(jakarta.servlet.ServletRequestEvent) + +CLSS public jakarta.servlet.ServletRequestWrapper +cons public init(jakarta.servlet.ServletRequest) +intf jakarta.servlet.ServletRequest +meth public boolean isAsyncStarted() +meth public boolean isAsyncSupported() +meth public boolean isSecure() +meth public boolean isWrapperFor(jakarta.servlet.ServletRequest) +meth public boolean isWrapperFor(java.lang.Class) +meth public int getContentLength() +meth public int getLocalPort() +meth public int getRemotePort() +meth public int getServerPort() +meth public jakarta.servlet.AsyncContext getAsyncContext() +meth public jakarta.servlet.AsyncContext startAsync() +meth public jakarta.servlet.AsyncContext startAsync(jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse) +meth public jakarta.servlet.DispatcherType getDispatcherType() +meth public jakarta.servlet.RequestDispatcher getRequestDispatcher(java.lang.String) +meth public jakarta.servlet.ServletConnection getServletConnection() +meth public jakarta.servlet.ServletContext getServletContext() +meth public jakarta.servlet.ServletInputStream getInputStream() throws java.io.IOException +meth public jakarta.servlet.ServletRequest getRequest() +meth public java.io.BufferedReader getReader() throws java.io.IOException +meth public java.lang.Object getAttribute(java.lang.String) +meth public java.lang.String getCharacterEncoding() +meth public java.lang.String getContentType() +meth public java.lang.String getLocalAddr() +meth public java.lang.String getLocalName() +meth public java.lang.String getParameter(java.lang.String) +meth public java.lang.String getProtocol() +meth public java.lang.String getProtocolRequestId() +meth public java.lang.String getRemoteAddr() +meth public java.lang.String getRemoteHost() +meth public java.lang.String getRequestId() +meth public java.lang.String getScheme() +meth public java.lang.String getServerName() +meth public java.lang.String[] getParameterValues(java.lang.String) +meth public java.util.Enumeration getAttributeNames() +meth public java.util.Enumeration getParameterNames() +meth public java.util.Enumeration getLocales() +meth public java.util.Locale getLocale() +meth public java.util.Map getParameterMap() +meth public long getContentLengthLong() +meth public void removeAttribute(java.lang.String) +meth public void setAttribute(java.lang.String,java.lang.Object) +meth public void setCharacterEncoding(java.lang.String) throws java.io.UnsupportedEncodingException +meth public void setCharacterEncoding(java.nio.charset.Charset) +meth public void setRequest(jakarta.servlet.ServletRequest) +supr java.lang.Object +hfds request + +CLSS public abstract interface jakarta.servlet.ServletResponse +meth public abstract boolean isCommitted() +meth public abstract int getBufferSize() +meth public abstract jakarta.servlet.ServletOutputStream getOutputStream() throws java.io.IOException +meth public abstract java.io.PrintWriter getWriter() throws java.io.IOException +meth public abstract java.lang.String getCharacterEncoding() +meth public abstract java.lang.String getContentType() +meth public abstract java.util.Locale getLocale() +meth public abstract void flushBuffer() throws java.io.IOException +meth public abstract void reset() +meth public abstract void resetBuffer() +meth public abstract void setBufferSize(int) +meth public abstract void setCharacterEncoding(java.lang.String) +meth public abstract void setContentLength(int) +meth public abstract void setContentLengthLong(long) +meth public abstract void setContentType(java.lang.String) +meth public abstract void setLocale(java.util.Locale) +meth public void setCharacterEncoding(java.nio.charset.Charset) + +CLSS public jakarta.servlet.ServletResponseWrapper +cons public init(jakarta.servlet.ServletResponse) +intf jakarta.servlet.ServletResponse +meth public boolean isCommitted() +meth public boolean isWrapperFor(jakarta.servlet.ServletResponse) +meth public boolean isWrapperFor(java.lang.Class) +meth public int getBufferSize() +meth public jakarta.servlet.ServletOutputStream getOutputStream() throws java.io.IOException +meth public jakarta.servlet.ServletResponse getResponse() +meth public java.io.PrintWriter getWriter() throws java.io.IOException +meth public java.lang.String getCharacterEncoding() +meth public java.lang.String getContentType() +meth public java.util.Locale getLocale() +meth public void flushBuffer() throws java.io.IOException +meth public void reset() +meth public void resetBuffer() +meth public void setBufferSize(int) +meth public void setCharacterEncoding(java.lang.String) +meth public void setCharacterEncoding(java.nio.charset.Charset) +meth public void setContentLength(int) +meth public void setContentLengthLong(long) +meth public void setContentType(java.lang.String) +meth public void setLocale(java.util.Locale) +meth public void setResponse(jakarta.servlet.ServletResponse) +supr java.lang.Object +hfds response + +CLSS public jakarta.servlet.ServletSecurityElement +cons public init() +cons public init(jakarta.servlet.HttpConstraintElement) +cons public init(jakarta.servlet.HttpConstraintElement,java.util.Collection) +cons public init(jakarta.servlet.annotation.ServletSecurity) +cons public init(java.util.Collection) +meth public java.util.Collection getHttpMethodConstraints() +meth public java.util.Collection getMethodNames() +supr jakarta.servlet.HttpConstraintElement +hfds methodConstraints,methodNames + +CLSS public abstract interface jakarta.servlet.SessionCookieConfig +meth public abstract boolean isHttpOnly() +meth public abstract boolean isSecure() +meth public abstract int getMaxAge() +meth public abstract java.lang.String getAttribute(java.lang.String) +meth public abstract java.lang.String getComment() + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="Servlet 6.0") +meth public abstract java.lang.String getDomain() +meth public abstract java.lang.String getName() +meth public abstract java.lang.String getPath() +meth public abstract java.util.Map getAttributes() +meth public abstract void setAttribute(java.lang.String,java.lang.String) +meth public abstract void setComment(java.lang.String) + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="Servlet 6.0") +meth public abstract void setDomain(java.lang.String) +meth public abstract void setHttpOnly(boolean) +meth public abstract void setMaxAge(int) +meth public abstract void setName(java.lang.String) +meth public abstract void setPath(java.lang.String) +meth public abstract void setSecure(boolean) + +CLSS public final !enum jakarta.servlet.SessionTrackingMode +fld public final static jakarta.servlet.SessionTrackingMode COOKIE +fld public final static jakarta.servlet.SessionTrackingMode SSL +fld public final static jakarta.servlet.SessionTrackingMode URL +meth public static jakarta.servlet.SessionTrackingMode valueOf(java.lang.String) +meth public static jakarta.servlet.SessionTrackingMode[] values() +supr java.lang.Enum + +CLSS public jakarta.servlet.UnavailableException +cons public init(java.lang.String) +cons public init(java.lang.String,int) +meth public boolean isPermanent() +meth public int getUnavailableSeconds() +supr jakarta.servlet.ServletException +hfds permanent,seconds,serialVersionUID + +CLSS public abstract interface jakarta.servlet.WriteListener +intf java.util.EventListener +meth public abstract void onError(java.lang.Throwable) +meth public abstract void onWritePossible() throws java.io.IOException + +CLSS public abstract interface !annotation jakarta.servlet.annotation.HandlesTypes + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.Class[] value() + +CLSS public abstract interface !annotation jakarta.servlet.annotation.HttpConstraint + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault jakarta.servlet.annotation.ServletSecurity$EmptyRoleSemantic value() +meth public abstract !hasdefault jakarta.servlet.annotation.ServletSecurity$TransportGuarantee transportGuarantee() +meth public abstract !hasdefault java.lang.String[] rolesAllowed() + +CLSS public abstract interface !annotation jakarta.servlet.annotation.HttpMethodConstraint + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault jakarta.servlet.annotation.ServletSecurity$EmptyRoleSemantic emptyRoleSemantic() +meth public abstract !hasdefault jakarta.servlet.annotation.ServletSecurity$TransportGuarantee transportGuarantee() +meth public abstract !hasdefault java.lang.String[] rolesAllowed() +meth public abstract java.lang.String value() + +CLSS public abstract interface !annotation jakarta.servlet.annotation.MultipartConfig + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault int fileSizeThreshold() +meth public abstract !hasdefault java.lang.String location() +meth public abstract !hasdefault long maxFileSize() +meth public abstract !hasdefault long maxRequestSize() + +CLSS public abstract interface !annotation jakarta.servlet.annotation.ServletSecurity + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Inherited() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +innr public final static !enum EmptyRoleSemantic +innr public final static !enum TransportGuarantee +intf java.lang.annotation.Annotation +meth public abstract !hasdefault jakarta.servlet.annotation.HttpConstraint value() +meth public abstract !hasdefault jakarta.servlet.annotation.HttpMethodConstraint[] httpMethodConstraints() + +CLSS public final static !enum jakarta.servlet.annotation.ServletSecurity$EmptyRoleSemantic + outer jakarta.servlet.annotation.ServletSecurity +fld public final static jakarta.servlet.annotation.ServletSecurity$EmptyRoleSemantic DENY +fld public final static jakarta.servlet.annotation.ServletSecurity$EmptyRoleSemantic PERMIT +meth public static jakarta.servlet.annotation.ServletSecurity$EmptyRoleSemantic valueOf(java.lang.String) +meth public static jakarta.servlet.annotation.ServletSecurity$EmptyRoleSemantic[] values() +supr java.lang.Enum + +CLSS public final static !enum jakarta.servlet.annotation.ServletSecurity$TransportGuarantee + outer jakarta.servlet.annotation.ServletSecurity +fld public final static jakarta.servlet.annotation.ServletSecurity$TransportGuarantee CONFIDENTIAL +fld public final static jakarta.servlet.annotation.ServletSecurity$TransportGuarantee NONE +meth public static jakarta.servlet.annotation.ServletSecurity$TransportGuarantee valueOf(java.lang.String) +meth public static jakarta.servlet.annotation.ServletSecurity$TransportGuarantee[] values() +supr java.lang.Enum + +CLSS public abstract interface !annotation jakarta.servlet.annotation.WebFilter + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault boolean asyncSupported() +meth public abstract !hasdefault jakarta.servlet.DispatcherType[] dispatcherTypes() +meth public abstract !hasdefault jakarta.servlet.annotation.WebInitParam[] initParams() +meth public abstract !hasdefault java.lang.String description() +meth public abstract !hasdefault java.lang.String displayName() +meth public abstract !hasdefault java.lang.String filterName() +meth public abstract !hasdefault java.lang.String largeIcon() +meth public abstract !hasdefault java.lang.String smallIcon() +meth public abstract !hasdefault java.lang.String[] servletNames() +meth public abstract !hasdefault java.lang.String[] urlPatterns() +meth public abstract !hasdefault java.lang.String[] value() + +CLSS public abstract interface !annotation jakarta.servlet.annotation.WebInitParam + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault java.lang.String description() +meth public abstract java.lang.String name() +meth public abstract java.lang.String value() + +CLSS public abstract interface !annotation jakarta.servlet.annotation.WebListener + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault java.lang.String value() + +CLSS public abstract interface !annotation jakarta.servlet.annotation.WebServlet + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault boolean asyncSupported() +meth public abstract !hasdefault int loadOnStartup() +meth public abstract !hasdefault jakarta.servlet.annotation.WebInitParam[] initParams() +meth public abstract !hasdefault java.lang.String description() +meth public abstract !hasdefault java.lang.String displayName() +meth public abstract !hasdefault java.lang.String largeIcon() +meth public abstract !hasdefault java.lang.String name() +meth public abstract !hasdefault java.lang.String smallIcon() +meth public abstract !hasdefault java.lang.String[] urlPatterns() +meth public abstract !hasdefault java.lang.String[] value() + +CLSS public abstract interface jakarta.servlet.descriptor.JspConfigDescriptor +meth public abstract java.util.Collection getJspPropertyGroups() +meth public abstract java.util.Collection getTaglibs() + +CLSS public abstract interface jakarta.servlet.descriptor.JspPropertyGroupDescriptor +meth public abstract java.lang.String getBuffer() +meth public abstract java.lang.String getDefaultContentType() +meth public abstract java.lang.String getDeferredSyntaxAllowedAsLiteral() +meth public abstract java.lang.String getElIgnored() +meth public abstract java.lang.String getErrorOnELNotFound() +meth public abstract java.lang.String getErrorOnUndeclaredNamespace() +meth public abstract java.lang.String getIsXml() +meth public abstract java.lang.String getPageEncoding() +meth public abstract java.lang.String getScriptingInvalid() +meth public abstract java.lang.String getTrimDirectiveWhitespaces() +meth public abstract java.util.Collection getIncludeCodas() +meth public abstract java.util.Collection getIncludePreludes() +meth public abstract java.util.Collection getUrlPatterns() + +CLSS public abstract interface jakarta.servlet.descriptor.TaglibDescriptor +meth public abstract java.lang.String getTaglibLocation() +meth public abstract java.lang.String getTaglibURI() + +CLSS public jakarta.servlet.http.Cookie +cons public init(java.lang.String,java.lang.String) +intf java.io.Serializable +intf java.lang.Cloneable +meth public boolean equals(java.lang.Object) +meth public boolean getSecure() +meth public boolean isHttpOnly() +meth public int getMaxAge() +meth public int getVersion() + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="Servlet 6.0") +meth public int hashCode() +meth public java.lang.Object clone() +meth public java.lang.String getAttribute(java.lang.String) +meth public java.lang.String getComment() + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="Servlet 6.0") +meth public java.lang.String getDomain() +meth public java.lang.String getName() +meth public java.lang.String getPath() +meth public java.lang.String getValue() +meth public java.lang.String toString() +meth public java.util.Map getAttributes() +meth public void setAttribute(java.lang.String,java.lang.String) +meth public void setComment(java.lang.String) + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="Servlet 6.0") +meth public void setDomain(java.lang.String) +meth public void setHttpOnly(boolean) +meth public void setMaxAge(int) +meth public void setPath(java.lang.String) +meth public void setSecure(boolean) +meth public void setValue(java.lang.String) +meth public void setVersion(int) + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="Servlet 6.0") +supr java.lang.Object +hfds DOMAIN,HTTP_ONLY,LSTRING_FILE,MAX_AGE,PATH,SECURE,TSPECIALS,attributes,lStrings,name,serialVersionUID,value + +CLSS public abstract jakarta.servlet.http.HttpFilter +cons public init() +meth protected void doFilter(jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse,jakarta.servlet.FilterChain) throws jakarta.servlet.ServletException,java.io.IOException +meth public void doFilter(jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse,jakarta.servlet.FilterChain) throws jakarta.servlet.ServletException,java.io.IOException +supr jakarta.servlet.GenericFilter +hfds serialVersionUID + +CLSS public abstract jakarta.servlet.http.HttpServlet +cons public init() +fld public final static java.lang.String LEGACY_DO_HEAD = "jakarta.servlet.http.legacyDoHead" + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="Servlet 6.0") +meth protected boolean isSensitiveHeader(java.lang.String) +meth protected long getLastModified(jakarta.servlet.http.HttpServletRequest) +meth protected void doDelete(jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse) throws jakarta.servlet.ServletException,java.io.IOException +meth protected void doGet(jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse) throws jakarta.servlet.ServletException,java.io.IOException +meth protected void doHead(jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse) throws jakarta.servlet.ServletException,java.io.IOException +meth protected void doOptions(jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse) throws jakarta.servlet.ServletException,java.io.IOException +meth protected void doPatch(jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse) throws jakarta.servlet.ServletException,java.io.IOException +meth protected void doPost(jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse) throws jakarta.servlet.ServletException,java.io.IOException +meth protected void doPut(jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse) throws jakarta.servlet.ServletException,java.io.IOException +meth protected void doTrace(jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse) throws jakarta.servlet.ServletException,java.io.IOException +meth protected void service(jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse) throws jakarta.servlet.ServletException,java.io.IOException +meth public void init(jakarta.servlet.ServletConfig) throws jakarta.servlet.ServletException +meth public void service(jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse) throws jakarta.servlet.ServletException,java.io.IOException +supr jakarta.servlet.GenericServlet +hfds HEADER_IFMODSINCE,HEADER_LASTMOD,LSTRING_FILE,METHOD_DELETE,METHOD_GET,METHOD_HEAD,METHOD_OPTIONS,METHOD_PATCH,METHOD_POST,METHOD_PUT,METHOD_TRACE,SENSITIVE_HTTP_HEADERS,lStrings,legacyHeadHandling,serialVersionUID + +CLSS public abstract interface jakarta.servlet.http.HttpServletMapping +meth public abstract jakarta.servlet.http.MappingMatch getMappingMatch() +meth public abstract java.lang.String getMatchValue() +meth public abstract java.lang.String getPattern() +meth public abstract java.lang.String getServletName() + +CLSS public abstract interface jakarta.servlet.http.HttpServletRequest +fld public final static java.lang.String BASIC_AUTH = "BASIC" +fld public final static java.lang.String CLIENT_CERT_AUTH = "CLIENT_CERT" +fld public final static java.lang.String DIGEST_AUTH = "DIGEST" +fld public final static java.lang.String FORM_AUTH = "FORM" +intf jakarta.servlet.ServletRequest +meth public abstract <%0 extends jakarta.servlet.http.HttpUpgradeHandler> {%%0} upgrade(java.lang.Class<{%%0}>) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract boolean authenticate(jakarta.servlet.http.HttpServletResponse) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract boolean isRequestedSessionIdFromCookie() +meth public abstract boolean isRequestedSessionIdFromURL() +meth public abstract boolean isRequestedSessionIdValid() +meth public abstract boolean isUserInRole(java.lang.String) +meth public abstract int getIntHeader(java.lang.String) +meth public abstract jakarta.servlet.http.Cookie[] getCookies() +meth public abstract jakarta.servlet.http.HttpSession getSession() +meth public abstract jakarta.servlet.http.HttpSession getSession(boolean) +meth public abstract jakarta.servlet.http.Part getPart(java.lang.String) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract java.lang.String changeSessionId() +meth public abstract java.lang.String getAuthType() +meth public abstract java.lang.String getContextPath() +meth public abstract java.lang.String getHeader(java.lang.String) +meth public abstract java.lang.String getMethod() +meth public abstract java.lang.String getPathInfo() +meth public abstract java.lang.String getPathTranslated() +meth public abstract java.lang.String getQueryString() +meth public abstract java.lang.String getRemoteUser() +meth public abstract java.lang.String getRequestURI() +meth public abstract java.lang.String getRequestedSessionId() +meth public abstract java.lang.String getServletPath() +meth public abstract java.lang.StringBuffer getRequestURL() +meth public abstract java.security.Principal getUserPrincipal() +meth public abstract java.util.Collection getParts() throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract java.util.Enumeration getHeaderNames() +meth public abstract java.util.Enumeration getHeaders(java.lang.String) +meth public abstract long getDateHeader(java.lang.String) +meth public abstract void login(java.lang.String,java.lang.String) throws jakarta.servlet.ServletException +meth public abstract void logout() throws jakarta.servlet.ServletException +meth public boolean isTrailerFieldsReady() +meth public jakarta.servlet.http.HttpServletMapping getHttpServletMapping() +meth public jakarta.servlet.http.PushBuilder newPushBuilder() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +meth public java.util.Map getTrailerFields() + +CLSS public jakarta.servlet.http.HttpServletRequestWrapper +cons public init(jakarta.servlet.http.HttpServletRequest) +intf jakarta.servlet.http.HttpServletRequest +meth public <%0 extends jakarta.servlet.http.HttpUpgradeHandler> {%%0} upgrade(java.lang.Class<{%%0}>) throws jakarta.servlet.ServletException,java.io.IOException +meth public boolean authenticate(jakarta.servlet.http.HttpServletResponse) throws jakarta.servlet.ServletException,java.io.IOException +meth public boolean isRequestedSessionIdFromCookie() +meth public boolean isRequestedSessionIdFromURL() +meth public boolean isRequestedSessionIdValid() +meth public boolean isTrailerFieldsReady() +meth public boolean isUserInRole(java.lang.String) +meth public int getIntHeader(java.lang.String) +meth public jakarta.servlet.http.Cookie[] getCookies() +meth public jakarta.servlet.http.HttpServletMapping getHttpServletMapping() +meth public jakarta.servlet.http.HttpSession getSession() +meth public jakarta.servlet.http.HttpSession getSession(boolean) +meth public jakarta.servlet.http.Part getPart(java.lang.String) throws jakarta.servlet.ServletException,java.io.IOException +meth public jakarta.servlet.http.PushBuilder newPushBuilder() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +meth public java.lang.String changeSessionId() +meth public java.lang.String getAuthType() +meth public java.lang.String getContextPath() +meth public java.lang.String getHeader(java.lang.String) +meth public java.lang.String getMethod() +meth public java.lang.String getPathInfo() +meth public java.lang.String getPathTranslated() +meth public java.lang.String getQueryString() +meth public java.lang.String getRemoteUser() +meth public java.lang.String getRequestURI() +meth public java.lang.String getRequestedSessionId() +meth public java.lang.String getServletPath() +meth public java.lang.StringBuffer getRequestURL() +meth public java.security.Principal getUserPrincipal() +meth public java.util.Collection getParts() throws jakarta.servlet.ServletException,java.io.IOException +meth public java.util.Enumeration getHeaderNames() +meth public java.util.Enumeration getHeaders(java.lang.String) +meth public java.util.Map getTrailerFields() +meth public long getDateHeader(java.lang.String) +meth public void login(java.lang.String,java.lang.String) throws jakarta.servlet.ServletException +meth public void logout() throws jakarta.servlet.ServletException +supr jakarta.servlet.ServletRequestWrapper + +CLSS public abstract interface jakarta.servlet.http.HttpServletResponse +fld public final static int SC_ACCEPTED = 202 +fld public final static int SC_BAD_GATEWAY = 502 +fld public final static int SC_BAD_REQUEST = 400 +fld public final static int SC_CONFLICT = 409 +fld public final static int SC_CONTINUE = 100 +fld public final static int SC_CREATED = 201 +fld public final static int SC_EXPECTATION_FAILED = 417 +fld public final static int SC_FORBIDDEN = 403 +fld public final static int SC_FOUND = 302 +fld public final static int SC_GATEWAY_TIMEOUT = 504 +fld public final static int SC_GONE = 410 +fld public final static int SC_HTTP_VERSION_NOT_SUPPORTED = 505 +fld public final static int SC_INTERNAL_SERVER_ERROR = 500 +fld public final static int SC_LENGTH_REQUIRED = 411 +fld public final static int SC_METHOD_NOT_ALLOWED = 405 +fld public final static int SC_MISDIRECTED_REQUEST = 421 +fld public final static int SC_MOVED_PERMANENTLY = 301 +fld public final static int SC_MOVED_TEMPORARILY = 302 +fld public final static int SC_MULTIPLE_CHOICES = 300 +fld public final static int SC_NON_AUTHORITATIVE_INFORMATION = 203 +fld public final static int SC_NOT_ACCEPTABLE = 406 +fld public final static int SC_NOT_FOUND = 404 +fld public final static int SC_NOT_IMPLEMENTED = 501 +fld public final static int SC_NOT_MODIFIED = 304 +fld public final static int SC_NO_CONTENT = 204 +fld public final static int SC_OK = 200 +fld public final static int SC_PARTIAL_CONTENT = 206 +fld public final static int SC_PAYMENT_REQUIRED = 402 +fld public final static int SC_PERMANENT_REDIRECT = 308 +fld public final static int SC_PRECONDITION_FAILED = 412 +fld public final static int SC_PROXY_AUTHENTICATION_REQUIRED = 407 +fld public final static int SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416 +fld public final static int SC_REQUEST_ENTITY_TOO_LARGE = 413 +fld public final static int SC_REQUEST_TIMEOUT = 408 +fld public final static int SC_REQUEST_URI_TOO_LONG = 414 +fld public final static int SC_RESET_CONTENT = 205 +fld public final static int SC_SEE_OTHER = 303 +fld public final static int SC_SERVICE_UNAVAILABLE = 503 +fld public final static int SC_SWITCHING_PROTOCOLS = 101 +fld public final static int SC_TEMPORARY_REDIRECT = 307 +fld public final static int SC_UNAUTHORIZED = 401 +fld public final static int SC_UNPROCESSABLE_CONTENT = 422 +fld public final static int SC_UNSUPPORTED_MEDIA_TYPE = 415 +fld public final static int SC_UPGRADE_REQUIRED = 426 +fld public final static int SC_USE_PROXY = 305 +intf jakarta.servlet.ServletResponse +meth public abstract boolean containsHeader(java.lang.String) +meth public abstract int getStatus() +meth public abstract java.lang.String encodeRedirectURL(java.lang.String) +meth public abstract java.lang.String encodeURL(java.lang.String) +meth public abstract java.lang.String getHeader(java.lang.String) +meth public abstract java.util.Collection getHeaderNames() +meth public abstract java.util.Collection getHeaders(java.lang.String) +meth public abstract void addCookie(jakarta.servlet.http.Cookie) +meth public abstract void addDateHeader(java.lang.String,long) +meth public abstract void addHeader(java.lang.String,java.lang.String) +meth public abstract void addIntHeader(java.lang.String,int) +meth public abstract void sendError(int) throws java.io.IOException +meth public abstract void sendError(int,java.lang.String) throws java.io.IOException +meth public abstract void sendRedirect(java.lang.String,int,boolean) throws java.io.IOException +meth public abstract void setDateHeader(java.lang.String,long) +meth public abstract void setHeader(java.lang.String,java.lang.String) +meth public abstract void setIntHeader(java.lang.String,int) +meth public abstract void setStatus(int) +meth public java.util.function.Supplier> getTrailerFields() +meth public void sendRedirect(java.lang.String) throws java.io.IOException +meth public void sendRedirect(java.lang.String,boolean) throws java.io.IOException +meth public void sendRedirect(java.lang.String,int) throws java.io.IOException +meth public void setTrailerFields(java.util.function.Supplier>) + +CLSS public jakarta.servlet.http.HttpServletResponseWrapper +cons public init(jakarta.servlet.http.HttpServletResponse) +intf jakarta.servlet.http.HttpServletResponse +meth public boolean containsHeader(java.lang.String) +meth public int getStatus() +meth public java.lang.String encodeRedirectURL(java.lang.String) +meth public java.lang.String encodeURL(java.lang.String) +meth public java.lang.String getHeader(java.lang.String) +meth public java.util.Collection getHeaderNames() +meth public java.util.Collection getHeaders(java.lang.String) +meth public java.util.function.Supplier> getTrailerFields() +meth public void addCookie(jakarta.servlet.http.Cookie) +meth public void addDateHeader(java.lang.String,long) +meth public void addHeader(java.lang.String,java.lang.String) +meth public void addIntHeader(java.lang.String,int) +meth public void sendError(int) throws java.io.IOException +meth public void sendError(int,java.lang.String) throws java.io.IOException +meth public void sendRedirect(java.lang.String) throws java.io.IOException +meth public void sendRedirect(java.lang.String,boolean) throws java.io.IOException +meth public void sendRedirect(java.lang.String,int) throws java.io.IOException +meth public void sendRedirect(java.lang.String,int,boolean) throws java.io.IOException +meth public void setDateHeader(java.lang.String,long) +meth public void setHeader(java.lang.String,java.lang.String) +meth public void setIntHeader(java.lang.String,int) +meth public void setStatus(int) +meth public void setTrailerFields(java.util.function.Supplier>) +supr jakarta.servlet.ServletResponseWrapper + +CLSS public abstract interface jakarta.servlet.http.HttpSession +innr public abstract interface static Accessor +meth public abstract boolean isNew() +meth public abstract int getMaxInactiveInterval() +meth public abstract jakarta.servlet.ServletContext getServletContext() +meth public abstract java.lang.Object getAttribute(java.lang.String) +meth public abstract java.lang.String getId() +meth public abstract java.util.Enumeration getAttributeNames() +meth public abstract long getCreationTime() +meth public abstract long getLastAccessedTime() +meth public abstract void invalidate() +meth public abstract void removeAttribute(java.lang.String) +meth public abstract void setAttribute(java.lang.String,java.lang.Object) +meth public abstract void setMaxInactiveInterval(int) +meth public jakarta.servlet.http.HttpSession$Accessor getAccessor() + +CLSS public abstract interface static jakarta.servlet.http.HttpSession$Accessor + outer jakarta.servlet.http.HttpSession +meth public abstract void access(java.util.function.Consumer) + +CLSS public abstract interface jakarta.servlet.http.HttpSessionActivationListener +intf java.util.EventListener +meth public void sessionDidActivate(jakarta.servlet.http.HttpSessionEvent) +meth public void sessionWillPassivate(jakarta.servlet.http.HttpSessionEvent) + +CLSS public abstract interface jakarta.servlet.http.HttpSessionAttributeListener +intf java.util.EventListener +meth public void attributeAdded(jakarta.servlet.http.HttpSessionBindingEvent) +meth public void attributeRemoved(jakarta.servlet.http.HttpSessionBindingEvent) +meth public void attributeReplaced(jakarta.servlet.http.HttpSessionBindingEvent) + +CLSS public jakarta.servlet.http.HttpSessionBindingEvent +cons public init(jakarta.servlet.http.HttpSession,java.lang.String) +cons public init(jakarta.servlet.http.HttpSession,java.lang.String,java.lang.Object) +meth public java.lang.Object getValue() +meth public java.lang.String getName() +supr jakarta.servlet.http.HttpSessionEvent +hfds name,serialVersionUID,value + +CLSS public abstract interface jakarta.servlet.http.HttpSessionBindingListener +intf java.util.EventListener +meth public void valueBound(jakarta.servlet.http.HttpSessionBindingEvent) +meth public void valueUnbound(jakarta.servlet.http.HttpSessionBindingEvent) + +CLSS public jakarta.servlet.http.HttpSessionEvent +cons public init(jakarta.servlet.http.HttpSession) +meth public jakarta.servlet.http.HttpSession getSession() +supr java.util.EventObject +hfds serialVersionUID + +CLSS public abstract interface jakarta.servlet.http.HttpSessionIdListener +intf java.util.EventListener +meth public abstract void sessionIdChanged(jakarta.servlet.http.HttpSessionEvent,java.lang.String) + +CLSS public abstract interface jakarta.servlet.http.HttpSessionListener +intf java.util.EventListener +meth public void sessionCreated(jakarta.servlet.http.HttpSessionEvent) +meth public void sessionDestroyed(jakarta.servlet.http.HttpSessionEvent) + +CLSS public abstract interface jakarta.servlet.http.HttpUpgradeHandler +meth public abstract void destroy() +meth public abstract void init(jakarta.servlet.http.WebConnection) + +CLSS public final !enum jakarta.servlet.http.MappingMatch +fld public final static jakarta.servlet.http.MappingMatch CONTEXT_ROOT +fld public final static jakarta.servlet.http.MappingMatch DEFAULT +fld public final static jakarta.servlet.http.MappingMatch EXACT +fld public final static jakarta.servlet.http.MappingMatch EXTENSION +fld public final static jakarta.servlet.http.MappingMatch PATH +meth public static jakarta.servlet.http.MappingMatch valueOf(java.lang.String) +meth public static jakarta.servlet.http.MappingMatch[] values() +supr java.lang.Enum + +CLSS public abstract interface jakarta.servlet.http.Part +meth public abstract java.io.InputStream getInputStream() throws java.io.IOException +meth public abstract java.lang.String getContentType() +meth public abstract java.lang.String getHeader(java.lang.String) +meth public abstract java.lang.String getName() +meth public abstract java.lang.String getSubmittedFileName() +meth public abstract java.util.Collection getHeaderNames() +meth public abstract java.util.Collection getHeaders(java.lang.String) +meth public abstract long getSize() +meth public abstract void delete() throws java.io.IOException +meth public abstract void write(java.lang.String) throws java.io.IOException + +CLSS public abstract interface jakarta.servlet.http.PushBuilder + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +meth public abstract jakarta.servlet.http.PushBuilder addHeader(java.lang.String,java.lang.String) +meth public abstract jakarta.servlet.http.PushBuilder method(java.lang.String) +meth public abstract jakarta.servlet.http.PushBuilder path(java.lang.String) +meth public abstract jakarta.servlet.http.PushBuilder queryString(java.lang.String) +meth public abstract jakarta.servlet.http.PushBuilder removeHeader(java.lang.String) +meth public abstract jakarta.servlet.http.PushBuilder sessionId(java.lang.String) +meth public abstract jakarta.servlet.http.PushBuilder setHeader(java.lang.String,java.lang.String) +meth public abstract java.lang.String getHeader(java.lang.String) +meth public abstract java.lang.String getMethod() +meth public abstract java.lang.String getPath() +meth public abstract java.lang.String getQueryString() +meth public abstract java.lang.String getSessionId() +meth public abstract java.util.Set getHeaderNames() +meth public abstract void push() + +CLSS public abstract interface jakarta.servlet.http.WebConnection +intf java.lang.AutoCloseable +meth public abstract jakarta.servlet.ServletInputStream getInputStream() throws java.io.IOException +meth public abstract jakarta.servlet.ServletOutputStream getOutputStream() throws java.io.IOException + +CLSS public abstract interface java.io.Closeable +intf java.lang.AutoCloseable +meth public abstract void close() throws java.io.IOException + +CLSS public abstract interface java.io.Flushable +meth public abstract void flush() throws java.io.IOException + +CLSS public abstract java.io.InputStream +cons public init() +intf java.io.Closeable +meth public abstract int read() throws java.io.IOException +meth public boolean markSupported() +meth public byte[] readAllBytes() throws java.io.IOException +meth public byte[] readNBytes(int) throws java.io.IOException +meth public int available() throws java.io.IOException +meth public int read(byte[]) throws java.io.IOException +meth public int read(byte[],int,int) throws java.io.IOException +meth public int readNBytes(byte[],int,int) throws java.io.IOException +meth public long skip(long) throws java.io.IOException +meth public long transferTo(java.io.OutputStream) throws java.io.IOException +meth public static java.io.InputStream nullInputStream() +meth public void close() throws java.io.IOException +meth public void mark(int) +meth public void reset() throws java.io.IOException +meth public void skipNBytes(long) throws java.io.IOException +supr java.lang.Object +hfds DEFAULT_BUFFER_SIZE,MAX_BUFFER_SIZE,MAX_SKIP_BUFFER_SIZE + +CLSS public abstract java.io.OutputStream +cons public init() +intf java.io.Closeable +intf java.io.Flushable +meth public abstract void write(int) throws java.io.IOException +meth public static java.io.OutputStream nullOutputStream() +meth public void close() throws java.io.IOException +meth public void flush() throws java.io.IOException +meth public void write(byte[]) throws java.io.IOException +meth public void write(byte[],int,int) throws java.io.IOException +supr java.lang.Object + +CLSS public abstract interface java.io.Serializable + +CLSS public abstract interface java.lang.AutoCloseable +meth public abstract void close() throws java.lang.Exception + +CLSS public abstract interface java.lang.Cloneable + +CLSS public abstract interface java.lang.Comparable<%0 extends java.lang.Object> +meth public abstract int compareTo({java.lang.Comparable%0}) + +CLSS public abstract interface !annotation java.lang.Deprecated + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, MODULE, PARAMETER, TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault boolean forRemoval() +meth public abstract !hasdefault java.lang.String since() + +CLSS public abstract java.lang.Enum<%0 extends java.lang.Enum<{java.lang.Enum%0}>> +cons protected init(java.lang.String,int) +innr public final static EnumDesc +intf java.io.Serializable +intf java.lang.Comparable<{java.lang.Enum%0}> +intf java.lang.constant.Constable +meth protected final java.lang.Object clone() throws java.lang.CloneNotSupportedException +meth protected final void finalize() +meth public final boolean equals(java.lang.Object) +meth public final int compareTo({java.lang.Enum%0}) +meth public final int hashCode() +meth public final int ordinal() +meth public final java.lang.Class<{java.lang.Enum%0}> getDeclaringClass() +meth public final java.lang.String name() +meth public final java.util.Optional> describeConstable() +meth public java.lang.String toString() +meth public static <%0 extends java.lang.Enum<{%%0}>> {%%0} valueOf(java.lang.Class<{%%0}>,java.lang.String) +supr java.lang.Object +hfds name,ordinal + +CLSS public java.lang.Exception +cons protected init(java.lang.String,java.lang.Throwable,boolean,boolean) +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +supr java.lang.Throwable +hfds serialVersionUID + +CLSS public java.lang.Object +cons public init() +meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException +meth protected void finalize() throws java.lang.Throwable + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="9") +meth public boolean equals(java.lang.Object) +meth public final java.lang.Class getClass() +meth public final void notify() +meth public final void notifyAll() +meth public final void wait() throws java.lang.InterruptedException +meth public final void wait(long) throws java.lang.InterruptedException +meth public final void wait(long,int) throws java.lang.InterruptedException +meth public int hashCode() +meth public java.lang.String toString() + +CLSS public java.lang.Throwable +cons protected init(java.lang.String,java.lang.Throwable,boolean,boolean) +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +intf java.io.Serializable +meth public final java.lang.Throwable[] getSuppressed() +meth public final void addSuppressed(java.lang.Throwable) +meth public java.lang.StackTraceElement[] getStackTrace() +meth public java.lang.String getLocalizedMessage() +meth public java.lang.String getMessage() +meth public java.lang.String toString() +meth public java.lang.Throwable fillInStackTrace() +meth public java.lang.Throwable getCause() +meth public java.lang.Throwable initCause(java.lang.Throwable) +meth public void printStackTrace() +meth public void printStackTrace(java.io.PrintStream) +meth public void printStackTrace(java.io.PrintWriter) +meth public void setStackTrace(java.lang.StackTraceElement[]) +supr java.lang.Object +hfds CAUSE_CAPTION,EMPTY_THROWABLE_ARRAY,NULL_CAUSE_MESSAGE,SELF_SUPPRESSION_MESSAGE,SUPPRESSED_CAPTION,SUPPRESSED_SENTINEL,UNASSIGNED_STACK,backtrace,cause,depth,detailMessage,serialVersionUID,stackTrace,suppressedExceptions +hcls PrintStreamOrWriter,SentinelHolder,WrappedPrintStream,WrappedPrintWriter + +CLSS public abstract interface java.lang.annotation.Annotation +meth public abstract boolean equals(java.lang.Object) +meth public abstract int hashCode() +meth public abstract java.lang.Class annotationType() +meth public abstract java.lang.String toString() + +CLSS public abstract interface !annotation java.lang.annotation.Documented + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation java.lang.annotation.Inherited + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation java.lang.annotation.Retention + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.annotation.RetentionPolicy value() + +CLSS public abstract interface !annotation java.lang.annotation.Target + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.annotation.ElementType[] value() + +CLSS public abstract interface java.lang.constant.Constable +meth public abstract java.util.Optional describeConstable() + +CLSS public abstract interface java.util.EventListener + +CLSS public java.util.EventObject +cons public init(java.lang.Object) +fld protected java.lang.Object source +intf java.io.Serializable +meth public java.lang.Object getSource() +meth public java.lang.String toString() +supr java.lang.Object +hfds serialVersionUID diff --git a/tck/tck-runtime/src/main/resources/servlet/tck/signature/sig-test-pkg-list.txt b/tck/tck-runtime/src/main/resources/servlet/tck/signature/sig-test-pkg-list.txt new file mode 100644 index 000000000..408666b28 --- /dev/null +++ b/tck/tck-runtime/src/main/resources/servlet/tck/signature/sig-test-pkg-list.txt @@ -0,0 +1,29 @@ +# +# Copyright (c) 2018, 2020 Oracle and/or its affiliates and others. +# All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +## +# This file contains a list of all the packages +# contained in the signature files for this +# deliverable. This file is used to exclude valid +# sub-packages from being verified when their +# parent package's signature is checked. +## + +jakarta.servlet +jakarta.servlet.anotations +jakarta.servlet.descriptor +jakarta.servlet.http diff --git a/tck/tck-runtime/src/main/resources/servlet/tck/signature/sig-test.map b/tck/tck-runtime/src/main/resources/servlet/tck/signature/sig-test.map new file mode 100644 index 000000000..bcda57825 --- /dev/null +++ b/tck/tck-runtime/src/main/resources/servlet/tck/signature/sig-test.map @@ -0,0 +1,25 @@ +# +# Copyright (c) 2018, 2021 Oracle and/or its affiliates and others. +# All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +############################################################### +# The signature test mapping file for the JSF TCK. This file +# should be formatted as a standard java properties file. The +# name is the package name and the value is the version of the +# package that should be tested by the signature tests. +############################################################### + +jakarta.servlet=6.1