Migrated from javax to jakarta packages

This commit is contained in:
Robert Vokac 2023-04-13 18:17:55 +02:00
parent c4f32a1329
commit 0c5fc58b5c
Signed by: robertvokac
GPG Key ID: 693D30BEE3329055
19 changed files with 615 additions and 502 deletions

854
pom.xml
View File

@ -16,442 +16,454 @@
limitations under the License. limitations under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-parent</artifactId> <artifactId>commons-parent</artifactId>
<version>56</version> <version>56</version>
</parent> </parent>
<groupId>commons-fileupload</groupId> <groupId>org.nanoboot.commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId> <artifactId>commons-fileupload</artifactId>
<version>1.5.1-SNAPSHOT</version> <version>1.5.1-SNAPSHOT</version>
<name>Apache Commons FileUpload</name> <name>Apache Commons FileUpload</name>
<description> <description>
The Apache Commons FileUpload component provides a simple yet flexible means of adding support for multipart The Apache Commons FileUpload component provides a simple yet flexible means of adding support for multipart
file upload functionality to servlets and web applications. file upload functionality to servlets and web applications.
</description> </description>
<url>https://commons.apache.org/proper/commons-fileupload/</url> <url>https://commons.apache.org/proper/commons-fileupload/</url>
<inceptionYear>2002</inceptionYear> <inceptionYear>2002</inceptionYear>
<developers> <developers>
<developer> <developer>
<name>Martin Cooper</name> <name>Martin Cooper</name>
<id>martinc</id> <id>martinc</id>
<email>martinc@apache.org</email> <email>martinc@apache.org</email>
<organization>Yahoo!</organization> <organization>Yahoo!</organization>
</developer> </developer>
<developer> <developer>
<name>dIon Gillard</name> <name>dIon Gillard</name>
<id>dion</id> <id>dion</id>
<email>dion@apache.org</email> <email>dion@apache.org</email>
<organization>Multitask Consulting</organization> <organization>Multitask Consulting</organization>
</developer> </developer>
<developer> <developer>
<name>John McNally</name> <name>John McNally</name>
<id>jmcnally</id> <id>jmcnally</id>
<email>jmcnally@collab.net</email> <email>jmcnally@collab.net</email>
<organization>CollabNet</organization> <organization>CollabNet</organization>
</developer> </developer>
<developer> <developer>
<name>Daniel Rall</name> <name>Daniel Rall</name>
<id>dlr</id> <id>dlr</id>
<email>dlr@finemaltcoding.com</email> <email>dlr@finemaltcoding.com</email>
<organization>CollabNet</organization> <organization>CollabNet</organization>
</developer> </developer>
<developer> <developer>
<name>Jason van Zyl</name> <name>Jason van Zyl</name>
<id>jvanzyl</id> <id>jvanzyl</id>
<email>jason@zenplex.com</email> <email>jason@zenplex.com</email>
<organization>Zenplex</organization> <organization>Zenplex</organization>
</developer> </developer>
<developer> <developer>
<name>Robert Burrell Donkin</name> <name>Robert Burrell Donkin</name>
<id>rdonkin</id> <id>rdonkin</id>
<email>rdonkin@apache.org</email> <email>rdonkin@apache.org</email>
<organization /> <organization />
</developer> </developer>
<developer> <developer>
<name>Sean C. Sullivan</name> <name>Sean C. Sullivan</name>
<id>sullis</id> <id>sullis</id>
<email>sean |at| seansullivan |dot| com</email> <email>sean |at| seansullivan |dot| com</email>
<organization /> <organization />
</developer> </developer>
<developer> <developer>
<name>Jochen Wiedmann</name> <name>Jochen Wiedmann</name>
<id>jochen</id> <id>jochen</id>
<email>jochen.wiedmann@gmail.com</email> <email>jochen.wiedmann@gmail.com</email>
<organization /> <organization />
</developer> </developer>
<developer> <developer>
<name>Simone Tripodi</name> <name>Simone Tripodi</name>
<id>simonetripodi</id> <id>simonetripodi</id>
<email>simonetripodi@apache.org</email> <email>simonetripodi@apache.org</email>
<organization>Adobe</organization> <organization>Adobe</organization>
</developer> </developer>
<developer> <developer>
<name>Gary Gregory</name> <name>Gary Gregory</name>
<id>ggregory</id> <id>ggregory</id>
<email>ggregory@apache.org</email> <email>ggregory@apache.org</email>
<organization /> <organization />
</developer> </developer>
<developer> <developer>
<name>Rob Tompkins</name> <name>Rob Tompkins</name>
<id>chtompki</id> <id>chtompki</id>
<email>chtompki@apache.org</email> <email>chtompki@apache.org</email>
</developer> </developer>
</developers> </developers>
<contributors> <contributors>
<contributor> <contributor>
<name>Aaron Freeman</name> <name>Aaron Freeman</name>
<email>aaron@sendthisfile.com</email> <email>aaron@sendthisfile.com</email>
</contributor> </contributor>
<contributor> <contributor>
<name>Daniel Fabian</name> <name>Daniel Fabian</name>
<email>dfabian@google.com</email> <email>dfabian@google.com</email>
</contributor> </contributor>
<contributor> <contributor>
<name>Jörg Heinicke</name> <name>Jörg Heinicke</name>
<email>joerg.heinicke@gmx.de</email> <email>joerg.heinicke@gmx.de</email>
</contributor> </contributor>
<contributor> <contributor>
<name>Stepan Koltsov</name> <name>Stepan Koltsov</name>
<email>yozh@mx1.ru</email> <email>yozh@mx1.ru</email>
</contributor> </contributor>
<contributor> <contributor>
<name>Michael Macaluso</name> <name>Michael Macaluso</name>
<email>michael.public@wavecorp.com</email> <email>michael.public@wavecorp.com</email>
</contributor> </contributor>
<contributor> <contributor>
<name>Amichai Rothman</name> <name>Amichai Rothman</name>
<email>amichai2@amichais.net</email> <email>amichai2@amichais.net</email>
</contributor> </contributor>
<contributor> <contributor>
<name>Alexander Sova</name> <name>Alexander Sova</name>
<email>bird@noir.crocodile.org</email> <email>bird@noir.crocodile.org</email>
</contributor> </contributor>
<contributor> <contributor>
<name>Paul Spurr</name> <name>Paul Spurr</name>
<email>pspurr@gmail.com</email> <email>pspurr@gmail.com</email>
</contributor> </contributor>
<contributor> <contributor>
<name>Thomas Vandahl</name> <name>Thomas Vandahl</name>
<email>tv@apache.org</email> <email>tv@apache.org</email>
</contributor> </contributor>
<contributor> <contributor>
<name>Henry Yandell</name> <name>Henry Yandell</name>
<email>bayard@apache.org</email> <email>bayard@apache.org</email>
</contributor> </contributor>
<contributor> <contributor>
<name>Jan Novotný</name> <name>Jan Novotný</name>
<email>novotnaci@gmail.com</email> <email>novotnaci@gmail.com</email>
</contributor> </contributor>
<contributor> <contributor>
<name>frank</name> <name>frank</name>
<email>mailsurfie@gmail.com</email> <email>mailsurfie@gmail.com</email>
</contributor> </contributor>
<contributor> <contributor>
<name>maxxedev</name> <name>maxxedev</name>
<email>maxxedev@gmail.com</email> <email>maxxedev@gmail.com</email>
</contributor> </contributor>
<contributor> <contributor>
<name>Rafal Krzewski</name> <name>Rafal Krzewski</name>
<email>Rafal.Krzewski@e-point.pl</email> <email>Rafal.Krzewski@e-point.pl</email>
</contributor> </contributor>
<contributor> <contributor>
<name>Sean Legassick</name> <name>Sean Legassick</name>
<email>sean@informage.net</email> <email>sean@informage.net</email>
</contributor> </contributor>
<contributor> <contributor>
<name>Oleg Kalnichevski</name> <name>Oleg Kalnichevski</name>
<email>oleg@ural.ru</email> <email>oleg@ural.ru</email>
</contributor> </contributor>
<contributor> <contributor>
<name>David Sean Taylor</name> <name>David Sean Taylor</name>
<email>taylor@apache.org</email> <email>taylor@apache.org</email>
</contributor> </contributor>
<contributor> <contributor>
<name>fangwentong</name> <name>fangwentong</name>
<email>fangwentong2012@gmail.com</email> <email>fangwentong2012@gmail.com</email>
</contributor> </contributor>
</contributors> </contributors>
<scm> <scm>
<connection>scm:git:http://gitbox.apache.org/repos/asf/commons-fileupload.git</connection> <connection>scm:git:http://gitbox.apache.org/repos/asf/commons-fileupload.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/commons-fileupload.git</developerConnection> <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/commons-fileupload.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=commons-fileupload.git</url> <url>https://gitbox.apache.org/repos/asf?p=commons-fileupload.git</url>
<tag>HEAD</tag> <tag>HEAD</tag>
</scm> </scm>
<issueManagement> <issueManagement>
<system>jira</system> <system>jira</system>
<url>https://issues.apache.org/jira/browse/FILEUPLOAD</url> <url>https://issues.apache.org/jira/browse/FILEUPLOAD</url>
</issueManagement> </issueManagement>
<distributionManagement> <!-- <distributionManagement>
<site> <site>
<id>apache.website</id> <id>apache.website</id>
<name>Apache Commons Site</name> <name>Apache Commons Site</name>
<url>scm:svn:https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-fileupload/</url> <url>scm:svn:https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-fileupload/</url>
</site> </site>
</distributionManagement> </distributionManagement>-->
<properties> <distributionManagement>
<maven.compiler.source>1.6</maven.compiler.source> <repository>
<maven.compiler.target>1.6</maven.compiler.target> <id>nanoboot-releases-repository</id>
<commons.componentid>fileupload</commons.componentid> <url>https://maven.nanoboot.org/releases</url>
<commons.module.name>org.apache.commons.fileupload</commons.module.name> </repository>
<commons.release.version>1.5.1</commons.release.version>
<commons.release.desc>(requires Java ${maven.compiler.target} or later)</commons.release.desc>
<commons.jira.id>FILEUPLOAD</commons.jira.id>
<commons.jira.pid>12310476</commons.jira.pid>
<commons.site.path>fileupload</commons.site.path>
<commons.scmPubUrl>https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-fileupload</commons.scmPubUrl>
<commons.scmPubCheckoutDirectory>site-content</commons.scmPubCheckoutDirectory>
<commons.osgi.export>!org.apache.commons.fileupload.util.mime,org.apache.commons.*;version=${project.version};-noimport:=true</commons.osgi.export>
<commons.osgi.import>!javax.portlet,*</commons.osgi.import>
<commons.osgi.dynamicImport>javax.portlet</commons.osgi.dynamicImport>
<japicmp.skip>false</japicmp.skip>
<!-- Commons Release Plugin --> <snapshotRepository>
<commons.bc.version>1.5</commons.bc.version> <id>nanoboot-snapshots-repository</id>
<commons.rc.version>RC1</commons.rc.version> <url>https://maven.nanoboot.org/snapshots</url>
<commons.release.isDistModule>true</commons.release.isDistModule> </snapshotRepository>
<commons.distSvnStagingUrl>scm:svn:https://dist.apache.org/repos/dist/dev/commons/${commons.componentid}</commons.distSvnStagingUrl> </distributionManagement>
<commons.releaseManagerName>Rob Tompkins</commons.releaseManagerName>
<commons.releaseManagerKey>B6E73D84EA4FCC47166087253FAAD2CD5ECBB314</commons.releaseManagerKey>
</properties>
<dependencies> <properties>
<dependency> <maven.compiler.source>1.7</maven.compiler.source>
<groupId>junit</groupId> <maven.compiler.target>1.7</maven.compiler.target>
<artifactId>junit</artifactId> <commons.componentid>fileupload</commons.componentid>
<version>4.13.2</version> <commons.module.name>org.apache.commons.fileupload</commons.module.name>
<scope>test</scope> <commons.release.version>1.5.1</commons.release.version>
</dependency> <commons.release.desc>(requires Java ${maven.compiler.target} or later)</commons.release.desc>
<dependency> <commons.jira.id>FILEUPLOAD</commons.jira.id>
<groupId>javax.servlet</groupId> <commons.jira.pid>12310476</commons.jira.pid>
<artifactId>servlet-api</artifactId> <commons.site.path>fileupload</commons.site.path>
<version>2.4</version> <commons.scmPubUrl>https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-fileupload</commons.scmPubUrl>
<scope>provided</scope> <commons.scmPubCheckoutDirectory>site-content</commons.scmPubCheckoutDirectory>
</dependency> <commons.osgi.export>!org.apache.commons.fileupload.util.mime,org.apache.commons.*;version=${project.version};-noimport:=true</commons.osgi.export>
<dependency> <commons.osgi.import>!javax.portlet,*</commons.osgi.import>
<groupId>portlet-api</groupId> <commons.osgi.dynamicImport>javax.portlet</commons.osgi.dynamicImport>
<artifactId>portlet-api</artifactId> <japicmp.skip>false</japicmp.skip>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
</dependencies>
<build> <!-- Commons Release Plugin -->
<plugins> <commons.bc.version>1.5</commons.bc.version>
<plugin> <commons.rc.version>RC1</commons.rc.version>
<groupId>org.apache.maven.plugins</groupId> <commons.release.isDistModule>true</commons.release.isDistModule>
<artifactId>maven-checkstyle-plugin</artifactId> <commons.distSvnStagingUrl>scm:svn:https://dist.apache.org/repos/dist/dev/commons/${commons.componentid}</commons.distSvnStagingUrl>
<executions> <commons.releaseManagerName>Rob Tompkins</commons.releaseManagerName>
<execution> <commons.releaseManagerKey>B6E73D84EA4FCC47166087253FAAD2CD5ECBB314</commons.releaseManagerKey>
<id>validate-main</id> </properties>
<phase>validate</phase>
<configuration>
<configLocation>${basedir}/src/checkstyle/fileupload_checks.xml</configLocation>
<suppressionsLocation>${basedir}/src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
<includeTestSourceDirectory>false</includeTestSourceDirectory>
<enableRulesSummary>false</enableRulesSummary>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<linkXRef>false</linkXRef>
</configuration>
<goals>
<goal>checkstyle</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>${basedir}/src/main/assembly/bin.xml</descriptor>
<descriptor>${basedir}/src/main/assembly/src.xml</descriptor>
</descriptors>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<excludes>
<exclude>site-content/**</exclude>
<exclude>src/site/resources/download_lang.cgi</exclude>
<exclude>src/checkstyle/license-header.txt</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<versionRange>[1.8,)</versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<versionRange>[1.10,)</versionRange>
<goals>
<goal>parse-version</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>${basedir}/src/checkstyle/fileupload_checks.xml</configLocation>
<suppressionsLocation>${basedir}/src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
<includeTestSourceDirectory>false</includeTestSourceDirectory>
<enableRulesSummary>false</enableRulesSummary>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<reporting> <dependencies>
<plugins> <dependency>
<plugin> <groupId>junit</groupId>
<groupId>org.apache.maven.plugins</groupId> <artifactId>junit</artifactId>
<artifactId>maven-changes-plugin</artifactId> <version>4.13.2</version>
<version>${commons.changes.version}</version> <scope>test</scope>
<configuration> </dependency>
<issueLinkTemplate>%URL%/../%ISSUE%</issueLinkTemplate> <dependency>
</configuration> <groupId>jakarta.platform</groupId>
<reportSets> <artifactId>jakarta.jakartaee-web-api</artifactId>
<reportSet> <version>9.1.0</version>
<reports> <scope>provided</scope>
<report>changes-report</report> </dependency>
<!-- NPE, retry from time to time <report>jira-report</report> --> <dependency>
</reports> <groupId>portlet-api</groupId>
</reportSet> <artifactId>portlet-api</artifactId>
</reportSets> <version>1.0</version>
</plugin> <scope>provided</scope>
<plugin> </dependency>
<groupId>org.apache.maven.plugins</groupId> <dependency>
<artifactId>maven-checkstyle-plugin</artifactId> <groupId>commons-io</groupId>
<configuration> <artifactId>commons-io</artifactId>
<configLocation>${basedir}/src/checkstyle/fileupload_checks.xml</configLocation> <version>2.11.0</version>
<suppressionsLocation>${basedir}/src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation> </dependency>
<includeTestSourceDirectory>false</includeTestSourceDirectory> </dependencies>
<enableRulesSummary>false</enableRulesSummary>
</configuration>
</plugin>
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<targetJdk>${maven.compiler.target}</targetJdk>
<rulesets>
<ruleset>${basedir}/src/checkstyle/fileupload_basic.xml</ruleset>
</rulesets>
</configuration>
</plugin>
</plugins>
</reporting>
<profiles> <build>
<profile>
<id>setup-checkout</id>
<activation>
<file>
<missing>site-content</missing>
</file>
</activation>
<build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-checkstyle-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<id>prepare-checkout</id> <id>validate-main</id>
<phase>pre-site</phase> <phase>validate</phase>
<goals> <configuration>
<goal>run</goal> <configLocation>${basedir}/src/checkstyle/fileupload_checks.xml</configLocation>
</goals> <suppressionsLocation>${basedir}/src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
<includeTestSourceDirectory>false</includeTestSourceDirectory>
<enableRulesSummary>false</enableRulesSummary>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<linkXRef>false</linkXRef>
</configuration>
<goals>
<goal>checkstyle</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration> <configuration>
<target> <descriptors>
<exec executable="svn"> <descriptor>${basedir}/src/main/assembly/bin.xml</descriptor>
<arg line="checkout --depth immediates ${commons.scmPubUrl} ${commons.scmPubCheckoutDirectory}" /> <descriptor>${basedir}/src/main/assembly/src.xml</descriptor>
</exec> </descriptors>
<tarLongFileMode>gnu</tarLongFileMode>
<exec executable="svn">
<arg line="update --set-depth exclude ${commons.scmPubCheckoutDirectory}/javadocs" />
</exec>
<pathconvert pathsep=" " property="dirs">
<dirset dir="${commons.scmPubCheckoutDirectory}" includes="*" />
</pathconvert>
<exec executable="svn">
<arg line="update --set-depth infinity ${dirs}" />
</exec>
</target>
</configuration> </configuration>
</execution> </plugin>
</executions>
</plugin>
</plugins> </plugins>
</build> <pluginManagement>
</profile> <plugins>
<profile> <plugin>
<id>java9</id> <groupId>org.apache.rat</groupId>
<activation> <artifactId>apache-rat-plugin</artifactId>
<jdk>9</jdk> <configuration>
</activation> <excludes>
<properties> <exclude>site-content/**</exclude>
<!-- coverall version 4.3.0 does not work with java 9, see https://github.com/trautonen/coveralls-maven-plugin/issues/112 --> <exclude>src/site/resources/download_lang.cgi</exclude>
<coveralls.skip>true</coveralls.skip> <exclude>src/checkstyle/license-header.txt</exclude>
</properties> </excludes>
</profile> </configuration>
</profiles> </plugin>
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<versionRange>[1.8,)</versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<versionRange>[1.10,)</versionRange>
<goals>
<goal>parse-version</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>${basedir}/src/checkstyle/fileupload_checks.xml</configLocation>
<suppressionsLocation>${basedir}/src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
<includeTestSourceDirectory>false</includeTestSourceDirectory>
<enableRulesSummary>false</enableRulesSummary>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
<version>${commons.changes.version}</version>
<configuration>
<issueLinkTemplate>%URL%/../%ISSUE%</issueLinkTemplate>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>changes-report</report>
<!-- NPE, retry from time to time <report>jira-report</report> -->
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>${basedir}/src/checkstyle/fileupload_checks.xml</configLocation>
<suppressionsLocation>${basedir}/src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
<includeTestSourceDirectory>false</includeTestSourceDirectory>
<enableRulesSummary>false</enableRulesSummary>
</configuration>
</plugin>
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<targetJdk>${maven.compiler.target}</targetJdk>
<rulesets>
<ruleset>${basedir}/src/checkstyle/fileupload_basic.xml</ruleset>
</rulesets>
</configuration>
</plugin>
</plugins>
</reporting>
<profiles>
<profile>
<id>setup-checkout</id>
<activation>
<file>
<missing>site-content</missing>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>prepare-checkout</id>
<phase>pre-site</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<exec executable="svn">
<arg line="checkout --depth immediates ${commons.scmPubUrl} ${commons.scmPubCheckoutDirectory}" />
</exec>
<exec executable="svn">
<arg line="update --set-depth exclude ${commons.scmPubCheckoutDirectory}/javadocs" />
</exec>
<pathconvert pathsep=" " property="dirs">
<dirset dir="${commons.scmPubCheckoutDirectory}" includes="*" />
</pathconvert>
<exec executable="svn">
<arg line="update --set-depth infinity ${dirs}" />
</exec>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>java9</id>
<activation>
<jdk>9</jdk>
</activation>
<properties>
<!-- coverall version 4.3.0 does not work with java 9, see https://github.com/trautonen/coveralls-maven-plugin/issues/112 -->
<coveralls.skip>true</coveralls.skip>
</properties>
</profile>
</profiles>
</project> </project>

View File

@ -26,7 +26,7 @@ import org.apache.commons.fileupload.disk.DiskFileItem;
* <p> After retrieving an instance of this class from a {@link * <p> After retrieving an instance of this class from a {@link
* org.apache.commons.fileupload.DiskFileUpload DiskFileUpload} instance (see * org.apache.commons.fileupload.DiskFileUpload DiskFileUpload} instance (see
* {@link org.apache.commons.fileupload.DiskFileUpload * {@link org.apache.commons.fileupload.DiskFileUpload
* #parseRequest(javax.servlet.http.HttpServletRequest)}), you may * #parseRequest(jakarta.servlet.http.HttpServletRequest)}), you may
* either request all contents of file at once using {@link #get()} or * either request all contents of file at once using {@link #get()} or
* request an {@link java.io.InputStream InputStream} with * request an {@link java.io.InputStream InputStream} with
* {@link #getInputStream()} and process the file without attempting to load * {@link #getInputStream()} and process the file without attempting to load

View File

@ -18,7 +18,7 @@ package org.apache.commons.fileupload;
import java.io.File; import java.io.File;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
/** /**
* <p>High level API for processing file uploads.</p> * <p>High level API for processing file uploads.</p>

View File

@ -29,7 +29,7 @@ import java.io.UnsupportedEncodingException;
* <p> After retrieving an instance of this class from a {@link * <p> After retrieving an instance of this class from a {@link
* org.apache.commons.fileupload.FileUpload FileUpload} instance (see * org.apache.commons.fileupload.FileUpload FileUpload} instance (see
* {@link org.apache.commons.fileupload.servlet.ServletFileUpload * {@link org.apache.commons.fileupload.servlet.ServletFileUpload
* #parseRequest(javax.servlet.http.HttpServletRequest)}), you may * #parseRequest(jakarta.servlet.http.HttpServletRequest)}), you may
* either request all contents of the file at once using {@link #get()} or * either request all contents of the file at once using {@link #get()} or
* request an {@link java.io.InputStream InputStream} with * request an {@link java.io.InputStream InputStream} with
* {@link #getInputStream()} and process the file without attempting to load * {@link #getInputStream()} and process the file without attempting to load

View File

@ -29,7 +29,7 @@ import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
import javax.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import org.apache.commons.fileupload.MultipartStream.ItemInputStream; import org.apache.commons.fileupload.MultipartStream.ItemInputStream;
import org.apache.commons.fileupload.servlet.ServletFileUpload; import org.apache.commons.fileupload.servlet.ServletFileUpload;

View File

@ -46,7 +46,7 @@ import org.apache.commons.io.output.DeferredFileOutputStream;
* <p> After retrieving an instance of this class from a {@link * <p> After retrieving an instance of this class from a {@link
* DiskFileItemFactory} instance (see * DiskFileItemFactory} instance (see
* {@link org.apache.commons.fileupload.servlet.ServletFileUpload * {@link org.apache.commons.fileupload.servlet.ServletFileUpload
* #parseRequest(javax.servlet.http.HttpServletRequest)}), you may * #parseRequest(jakarta.servlet.http.HttpServletRequest)}), you may
* either request all contents of file at once using {@link #get()} or * either request all contents of file at once using {@link #get()} or
* request an {@link java.io.InputStream InputStream} with * request an {@link java.io.InputStream InputStream} with
* {@link #getInputStream()} and process the file without attempting to load * {@link #getInputStream()} and process the file without attempting to load

View File

@ -47,7 +47,7 @@ import org.apache.commons.io.FileCleaningTracker;
* implementation in an environment with local, untrusted users, * implementation in an environment with local, untrusted users,
* {@link #setRepository(File)} MUST be used to configure a repository location * {@link #setRepository(File)} MUST be used to configure a repository location
* that is not publicly writable. In a Servlet container the location identified * that is not publicly writable. In a Servlet container the location identified
* by the ServletContext attribute <code>javax.servlet.context.tempdir</code> * by the ServletContext attribute <code>jakarta.servlet.context.tempdir</code>
* may be used. * may be used.
* </p> * </p>
* *

View File

@ -36,7 +36,7 @@ import org.apache.commons.fileupload.FileUploadException;
* <code>multipart/mixed</code> encoding type, as specified by * <code>multipart/mixed</code> encoding type, as specified by
* <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>. Use * <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>. Use
* {@link org.apache.commons.fileupload.servlet.ServletFileUpload * {@link org.apache.commons.fileupload.servlet.ServletFileUpload
* #parseRequest(javax.servlet.http.HttpServletRequest)} to acquire a list * #parseRequest(jakarta.servlet.http.HttpServletRequest)} to acquire a list
* of {@link org.apache.commons.fileupload.FileItem FileItems} associated * of {@link org.apache.commons.fileupload.FileItem FileItems} associated
* with a given HTML widget.</p> * with a given HTML widget.</p>
* *

View File

@ -16,9 +16,9 @@
*/ */
package org.apache.commons.fileupload.servlet; package org.apache.commons.fileupload.servlet;
import javax.servlet.ServletContext; import jakarta.servlet.ServletContext;
import javax.servlet.ServletContextListener; import jakarta.servlet.ServletContextListener;
import javax.servlet.ServletContextEvent; import jakarta.servlet.ServletContextEvent;
import org.apache.commons.io.FileCleaningTracker; import org.apache.commons.io.FileCleaningTracker;

View File

@ -20,7 +20,7 @@ import java.io.IOException;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory; import org.apache.commons.fileupload.FileItemFactory;

View File

@ -21,7 +21,7 @@ import static java.lang.String.format;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import javax.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import org.apache.commons.fileupload.FileUploadBase; import org.apache.commons.fileupload.FileUploadBase;
import org.apache.commons.fileupload.UploadContext; import org.apache.commons.fileupload.UploadContext;

View File

@ -145,7 +145,7 @@ DiskFileItemFactory factory = new DiskFileItemFactory();
// Configure a repository (to ensure a secure temp location is used) // Configure a repository (to ensure a secure temp location is used)
ServletContext servletContext = this.getServletConfig().getServletContext(); ServletContext servletContext = this.getServletConfig().getServletContext();
File repository = (File) servletContext.getAttribute("javax.servlet.context.tempdir"); File repository = (File) servletContext.getAttribute("jakarta.servlet.context.tempdir");
factory.setRepository(repository); factory.setRepository(repository);
// Create a new file upload handler // Create a new file upload handler

View File

@ -21,7 +21,7 @@ import static org.junit.Assert.*;
import java.io.File; import java.io.File;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import org.apache.commons.fileupload.disk.DiskFileItem; import org.apache.commons.fileupload.disk.DiskFileItem;
import org.junit.Before; import org.junit.Before;

View File

@ -16,7 +16,7 @@
*/ */
package org.apache.commons.fileupload; package org.apache.commons.fileupload;
import javax.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
final class HttpServletRequestFactory { final class HttpServletRequestFactory {

View File

@ -16,6 +16,9 @@
*/ */
package org.apache.commons.fileupload; package org.apache.commons.fileupload;
import jakarta.servlet.AsyncContext;
import jakarta.servlet.DispatcherType;
import jakarta.servlet.ReadListener;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
@ -26,11 +29,19 @@ import java.util.Enumeration;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import javax.servlet.RequestDispatcher; import jakarta.servlet.RequestDispatcher;
import javax.servlet.ServletInputStream; import jakarta.servlet.ServletContext;
import javax.servlet.http.Cookie; import jakarta.servlet.ServletException;
import javax.servlet.http.HttpServletRequest; import jakarta.servlet.ServletInputStream;
import javax.servlet.http.HttpSession; import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.Cookie;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpSession;
import jakarta.servlet.http.HttpUpgradeHandler;
import jakarta.servlet.http.Part;
import java.util.Collection;
public class MockHttpServletRequest implements HttpServletRequest { public class MockHttpServletRequest implements HttpServletRequest {
@ -70,7 +81,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getAuthType() * @see jakarta.servlet.http.HttpServletRequest#getAuthType()
*/ */
@Override @Override
public String getAuthType() { public String getAuthType() {
@ -78,7 +89,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getCookies() * @see jakarta.servlet.http.HttpServletRequest#getCookies()
*/ */
@Override @Override
public Cookie[] getCookies() { public Cookie[] getCookies() {
@ -86,7 +97,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getDateHeader(String) * @see jakarta.servlet.http.HttpServletRequest#getDateHeader(String)
*/ */
@Override @Override
public long getDateHeader(String arg0) { public long getDateHeader(String arg0) {
@ -94,7 +105,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getHeader(String) * @see jakarta.servlet.http.HttpServletRequest#getHeader(String)
*/ */
@Override @Override
public String getHeader(String headerName) { public String getHeader(String headerName) {
@ -102,7 +113,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getHeaders(String) * @see jakarta.servlet.http.HttpServletRequest#getHeaders(String)
*/ */
@Override @Override
public Enumeration<String> getHeaders(String arg0) { public Enumeration<String> getHeaders(String arg0) {
@ -111,7 +122,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getHeaderNames() * @see jakarta.servlet.http.HttpServletRequest#getHeaderNames()
*/ */
@Override @Override
public Enumeration<String> getHeaderNames() { public Enumeration<String> getHeaderNames() {
@ -120,7 +131,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getIntHeader(String) * @see jakarta.servlet.http.HttpServletRequest#getIntHeader(String)
*/ */
@Override @Override
public int getIntHeader(String arg0) { public int getIntHeader(String arg0) {
@ -128,7 +139,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getMethod() * @see jakarta.servlet.http.HttpServletRequest#getMethod()
*/ */
@Override @Override
public String getMethod() { public String getMethod() {
@ -136,7 +147,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getPathInfo() * @see jakarta.servlet.http.HttpServletRequest#getPathInfo()
*/ */
@Override @Override
public String getPathInfo() { public String getPathInfo() {
@ -144,7 +155,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getPathTranslated() * @see jakarta.servlet.http.HttpServletRequest#getPathTranslated()
*/ */
@Override @Override
public String getPathTranslated() { public String getPathTranslated() {
@ -152,7 +163,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getContextPath() * @see jakarta.servlet.http.HttpServletRequest#getContextPath()
*/ */
@Override @Override
public String getContextPath() { public String getContextPath() {
@ -160,7 +171,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getQueryString() * @see jakarta.servlet.http.HttpServletRequest#getQueryString()
*/ */
@Override @Override
public String getQueryString() { public String getQueryString() {
@ -168,7 +179,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getRemoteUser() * @see jakarta.servlet.http.HttpServletRequest#getRemoteUser()
*/ */
@Override @Override
public String getRemoteUser() { public String getRemoteUser() {
@ -176,7 +187,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#isUserInRole(String) * @see jakarta.servlet.http.HttpServletRequest#isUserInRole(String)
*/ */
@Override @Override
public boolean isUserInRole(String arg0) { public boolean isUserInRole(String arg0) {
@ -184,7 +195,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getUserPrincipal() * @see jakarta.servlet.http.HttpServletRequest#getUserPrincipal()
*/ */
@Override @Override
public Principal getUserPrincipal() { public Principal getUserPrincipal() {
@ -192,7 +203,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getRequestedSessionId() * @see jakarta.servlet.http.HttpServletRequest#getRequestedSessionId()
*/ */
@Override @Override
public String getRequestedSessionId() { public String getRequestedSessionId() {
@ -200,7 +211,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getRequestURI() * @see jakarta.servlet.http.HttpServletRequest#getRequestURI()
*/ */
@Override @Override
public String getRequestURI() { public String getRequestURI() {
@ -208,7 +219,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getRequestURL() * @see jakarta.servlet.http.HttpServletRequest#getRequestURL()
*/ */
@Override @Override
public StringBuffer getRequestURL() { public StringBuffer getRequestURL() {
@ -216,7 +227,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getServletPath() * @see jakarta.servlet.http.HttpServletRequest#getServletPath()
*/ */
@Override @Override
public String getServletPath() { public String getServletPath() {
@ -224,7 +235,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getSession(boolean) * @see jakarta.servlet.http.HttpServletRequest#getSession(boolean)
*/ */
@Override @Override
public HttpSession getSession(boolean arg0) { public HttpSession getSession(boolean arg0) {
@ -232,7 +243,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#getSession() * @see jakarta.servlet.http.HttpServletRequest#getSession()
*/ */
@Override @Override
public HttpSession getSession() { public HttpSession getSession() {
@ -240,7 +251,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#isRequestedSessionIdValid() * @see jakarta.servlet.http.HttpServletRequest#isRequestedSessionIdValid()
*/ */
@Override @Override
public boolean isRequestedSessionIdValid() { public boolean isRequestedSessionIdValid() {
@ -248,7 +259,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#isRequestedSessionIdFromCookie() * @see jakarta.servlet.http.HttpServletRequest#isRequestedSessionIdFromCookie()
*/ */
@Override @Override
public boolean isRequestedSessionIdFromCookie() { public boolean isRequestedSessionIdFromCookie() {
@ -256,7 +267,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#isRequestedSessionIdFromURL() * @see jakarta.servlet.http.HttpServletRequest#isRequestedSessionIdFromURL()
*/ */
@Override @Override
public boolean isRequestedSessionIdFromURL() { public boolean isRequestedSessionIdFromURL() {
@ -264,7 +275,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.http.HttpServletRequest#isRequestedSessionIdFromUrl() * @see jakarta.servlet.http.HttpServletRequest#isRequestedSessionIdFromUrl()
* @deprecated * @deprecated
*/ */
@Override @Override
@ -274,7 +285,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getAttribute(String) * @see jakarta.servlet.ServletRequest#getAttribute(String)
*/ */
@Override @Override
public Object getAttribute(String arg0) { public Object getAttribute(String arg0) {
@ -282,7 +293,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getAttributeNames() * @see jakarta.servlet.ServletRequest#getAttributeNames()
*/ */
@Override @Override
public Enumeration<String> getAttributeNames() { public Enumeration<String> getAttributeNames() {
@ -290,7 +301,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getCharacterEncoding() * @see jakarta.servlet.ServletRequest#getCharacterEncoding()
*/ */
@Override @Override
public String getCharacterEncoding() { public String getCharacterEncoding() {
@ -298,7 +309,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#setCharacterEncoding(String) * @see jakarta.servlet.ServletRequest#setCharacterEncoding(String)
*/ */
@Override @Override
public void setCharacterEncoding(String arg0) public void setCharacterEncoding(String arg0)
@ -306,7 +317,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getContentLength() * @see jakarta.servlet.ServletRequest#getContentLength()
*/ */
@Override @Override
public int getContentLength() { public int getContentLength() {
@ -331,7 +342,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getContentType() * @see jakarta.servlet.ServletRequest#getContentType()
*/ */
@Override @Override
public String getContentType() { public String getContentType() {
@ -339,7 +350,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getInputStream() * @see jakarta.servlet.ServletRequest#getInputStream()
*/ */
@Override @Override
public ServletInputStream getInputStream() throws IOException { public ServletInputStream getInputStream() throws IOException {
@ -357,7 +368,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getParameter(String) * @see jakarta.servlet.ServletRequest#getParameter(String)
*/ */
@Override @Override
public String getParameter(String arg0) { public String getParameter(String arg0) {
@ -365,7 +376,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getParameterNames() * @see jakarta.servlet.ServletRequest#getParameterNames()
*/ */
@Override @Override
public Enumeration<String> getParameterNames() { public Enumeration<String> getParameterNames() {
@ -373,7 +384,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getParameterValues(String) * @see jakarta.servlet.ServletRequest#getParameterValues(String)
*/ */
@Override @Override
public String[] getParameterValues(String arg0) { public String[] getParameterValues(String arg0) {
@ -381,7 +392,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getParameterMap() * @see jakarta.servlet.ServletRequest#getParameterMap()
*/ */
@Override @Override
public Map<String, String[]> getParameterMap() { public Map<String, String[]> getParameterMap() {
@ -389,7 +400,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getProtocol() * @see jakarta.servlet.ServletRequest#getProtocol()
*/ */
@Override @Override
public String getProtocol() { public String getProtocol() {
@ -397,7 +408,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getScheme() * @see jakarta.servlet.ServletRequest#getScheme()
*/ */
@Override @Override
public String getScheme() { public String getScheme() {
@ -405,7 +416,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getServerName() * @see jakarta.servlet.ServletRequest#getServerName()
*/ */
@Override @Override
public String getServerName() { public String getServerName() {
@ -413,7 +424,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getLocalName() * @see jakarta.servlet.ServletRequest#getLocalName()
*/ */
@Override @Override
@SuppressWarnings("javadoc") // This is a Servlet 2.4 method @SuppressWarnings("javadoc") // This is a Servlet 2.4 method
@ -422,7 +433,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getServerPort() * @see jakarta.servlet.ServletRequest#getServerPort()
*/ */
@Override @Override
public int getServerPort() { public int getServerPort() {
@ -430,7 +441,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getLocalPort() * @see jakarta.servlet.ServletRequest#getLocalPort()
*/ */
@Override @Override
@SuppressWarnings("javadoc") // This is a Servlet 2.4 method @SuppressWarnings("javadoc") // This is a Servlet 2.4 method
@ -439,7 +450,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getRemotePort() * @see jakarta.servlet.ServletRequest#getRemotePort()
*/ */
@Override @Override
@SuppressWarnings("javadoc") // This is a Servlet 2.4 method @SuppressWarnings("javadoc") // This is a Servlet 2.4 method
@ -448,7 +459,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getReader() * @see jakarta.servlet.ServletRequest#getReader()
*/ */
@Override @Override
public BufferedReader getReader() throws IOException { public BufferedReader getReader() throws IOException {
@ -456,7 +467,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getRemoteAddr() * @see jakarta.servlet.ServletRequest#getRemoteAddr()
*/ */
@Override @Override
public String getRemoteAddr() { public String getRemoteAddr() {
@ -464,7 +475,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getLocalAddr() * @see jakarta.servlet.ServletRequest#getLocalAddr()
*/ */
@Override @Override
@SuppressWarnings("javadoc") // This is a Servlet 2.4 method @SuppressWarnings("javadoc") // This is a Servlet 2.4 method
@ -473,7 +484,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getRemoteHost() * @see jakarta.servlet.ServletRequest#getRemoteHost()
*/ */
@Override @Override
public String getRemoteHost() { public String getRemoteHost() {
@ -481,21 +492,21 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#setAttribute(String, Object) * @see jakarta.servlet.ServletRequest#setAttribute(String, Object)
*/ */
@Override @Override
public void setAttribute(String arg0, Object arg1) { public void setAttribute(String arg0, Object arg1) {
} }
/** /**
* @see javax.servlet.ServletRequest#removeAttribute(String) * @see jakarta.servlet.ServletRequest#removeAttribute(String)
*/ */
@Override @Override
public void removeAttribute(String arg0) { public void removeAttribute(String arg0) {
} }
/** /**
* @see javax.servlet.ServletRequest#getLocale() * @see jakarta.servlet.ServletRequest#getLocale()
*/ */
@Override @Override
public Locale getLocale() { public Locale getLocale() {
@ -503,7 +514,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getLocales() * @see jakarta.servlet.ServletRequest#getLocales()
*/ */
@Override @Override
public Enumeration<Locale> getLocales() { public Enumeration<Locale> getLocales() {
@ -511,7 +522,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#isSecure() * @see jakarta.servlet.ServletRequest#isSecure()
*/ */
@Override @Override
public boolean isSecure() { public boolean isSecure() {
@ -519,7 +530,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getRequestDispatcher(String) * @see jakarta.servlet.ServletRequest#getRequestDispatcher(String)
*/ */
@Override @Override
public RequestDispatcher getRequestDispatcher(String arg0) { public RequestDispatcher getRequestDispatcher(String arg0) {
@ -527,7 +538,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
} }
/** /**
* @see javax.servlet.ServletRequest#getRealPath(String) * @see jakarta.servlet.ServletRequest#getRealPath(String)
* @deprecated * @deprecated
*/ */
@Override @Override
@ -536,8 +547,83 @@ public class MockHttpServletRequest implements HttpServletRequest {
return null; return null;
} }
@Override
public <T extends HttpUpgradeHandler> T upgrade(Class<T> type) throws IOException, ServletException {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
@Override
public String changeSessionId() {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
@Override
public boolean authenticate(HttpServletResponse hsr) throws IOException, ServletException {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
@Override
public void login(String string, String string1) throws ServletException {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
@Override
public void logout() throws ServletException {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
@Override
public Collection<Part> getParts() throws IOException, ServletException {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
@Override
public Part getPart(String string) throws IOException, ServletException {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
@Override
public long getContentLengthLong() {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
@Override
public ServletContext getServletContext() {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
@Override
public AsyncContext startAsync() throws IllegalStateException {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
@Override
public AsyncContext startAsync(ServletRequest sr, ServletResponse sr1) throws IllegalStateException {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
@Override
public boolean isAsyncStarted() {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
@Override
public boolean isAsyncSupported() {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
@Override
public AsyncContext getAsyncContext() {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
@Override
public DispatcherType getDispatcherType() {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
private static class MyServletInputStream private static class MyServletInputStream
extends javax.servlet.ServletInputStream { extends jakarta.servlet.ServletInputStream {
private final InputStream in; private final InputStream in;
private final int readLimit; private final int readLimit;
@ -564,6 +650,21 @@ public class MockHttpServletRequest implements HttpServletRequest {
return in.read(b, off, len); return in.read(b, off, len);
} }
@Override
public boolean isFinished() {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
@Override
public boolean isReady() {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
@Override
public void setReadListener(ReadListener rl) {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
} }
} }

View File

@ -27,7 +27,7 @@ import java.io.InputStream;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import org.apache.commons.fileupload.FileUploadBase.FileUploadIOException; import org.apache.commons.fileupload.FileUploadBase.FileUploadIOException;
import org.apache.commons.fileupload.FileUploadBase.SizeException; import org.apache.commons.fileupload.FileUploadBase.SizeException;

View File

@ -24,7 +24,7 @@ import java.io.InputStream;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import org.apache.commons.fileupload.FileUploadBase.IOFileUploadException; import org.apache.commons.fileupload.FileUploadBase.IOFileUploadException;
import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.disk.DiskFileItemFactory;

View File

@ -20,7 +20,7 @@ import java.io.UnsupportedEncodingException;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.portlet.PortletFileUpload; import org.apache.commons.fileupload.portlet.PortletFileUpload;

View File

@ -22,7 +22,7 @@ import static org.junit.Assert.assertTrue;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import org.apache.commons.fileupload.Constants; import org.apache.commons.fileupload.Constants;
import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileItem;