Skip to content

Commit

Permalink
WINDUPRULE-719: Quarkus Release 1.12 - HTTP - fix (#542)
Browse files Browse the repository at this point in the history
* Use org.jboss.resteasy.annotations.providers.multipart.MultipartForm

* Enhanced hint's message and 'simplified' test (#2)

Co-authored-by: Marco Rizzi <mrizzi@users.noreply.github.com>
  • Loading branch information
carlosthe19916 and mrizzi authored Mar 9, 2021
1 parent 4dd29e7 commit cb134af
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<rules>
<rule id="quarkus1-12-resteasy-reactive-00000">
<when>
<javaclass references="org.jboss.resteasy.reactive.MultipartForm">
<javaclass references="org.jboss.resteasy.annotations.providers.multipart.MultipartForm">
<location>ANNOTATION</location>
</javaclass>
</when>
Expand All @@ -26,11 +26,12 @@
<hint title="Default file upload settings changed" effort="1" category-id="potential">
<message>
<![CDATA[
In `quarkus-resteasy-reactive` Quarkus extension, a couple of the default file upload settings have changed:
- `quarkus.http.body.delete-uploaded-files-on-end` now defaults to `true`.
The reason being that no uploaded files should be left over on the server by default.
- `quarkus.http.body.uploads-directory` now defaults to `${java.io.tmpdir}/uploads`.
The reason being that some application might not have the permissions to write to the current working directory.
In `quarkus-resteasy-reactive` Quarkus extension, a couple of the default file upload settings have changed:
- `quarkus.http.body.delete-uploaded-files-on-end` now defaults to `true`
The reason being that no uploaded files should be left over on the server by default.
- `quarkus.http.body.uploads-directory` now defaults to `${java.io.tmpdir}/uploads`
The reason being that some application might not have the permissions to write to the current working directory.
]]>
</message>
<link title="Quarkus - Migration Guide 1.12" href="https://github.com/quarkusio/quarkus/wiki/Migration-Guide-1.12#http" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package io.mypackage;

import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.jboss.resteasy.reactive.MultipartForm;
import org.jboss.resteasy.annotations.providers.multipart.MultipartForm;

@Path("multipart")
public class Endpoint {
Expand All @@ -14,6 +16,6 @@ public class Endpoint {
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Path("form")
public String form(@MultipartForm FormData formData) {
// return something
return "something";
}
}

0 comments on commit cb134af

Please sign in to comment.