We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using rest client reactive with multipart formdata, if I don't pass any file then a NPE will occur
java.lang.NullPointerException: Cannot invoke "java.io.File.toPath()" because "<parameter1>.files" is null
the request object model look like this
public class AppointmentFormData { @RestForm @PartType(MediaType.TEXT_PLAIN) public String documents; @RestForm("files") @PartType(MediaType.APPLICATION_OCTET_STREAM) public File files; }
end the rest client
@Path("/appointments") @RegisterRestClient(configKey = "appointment-service") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public interface V1AppointmentServiceRestClient { @GET @Path("/{id}") Uni<V1Appointment> getAppointmentById(@PathParam("id") Long id); @POST @Consumes(MediaType.MULTIPART_FORM_DATA) Uni<V1Appointment> createAppointment(@MultipartForm AppointmentFormData data); }
if there is no file, it should still send data successfully
throw NPE
No response
uname -a
ver
Darwin 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64 x86_64
java -version
openjdk version "16.0.1" 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-16.0.1+9 (build 16.0.1+9) OpenJDK 64-Bit Server VM AdoptOpenJDK-16.0.1+9 (build 16.0.1+9, mixed mode, sharing)
2.3.0.final
mvnw --version
gradlew --version
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
The text was updated successfully, but these errors were encountered:
/cc @michalszynkiewicz
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
When using rest client reactive with multipart formdata, if I don't pass any file then a NPE will occur
the request object model look like this
end the rest client
Expected behavior
if there is no file, it should still send data successfully
Actual behavior
throw NPE
How to Reproduce?
No response
Output of
uname -a
orver
Darwin 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64 x86_64
Output of
java -version
openjdk version "16.0.1" 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-16.0.1+9 (build 16.0.1+9) OpenJDK 64-Bit Server VM AdoptOpenJDK-16.0.1+9 (build 16.0.1+9, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.3.0.final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Additional information
No response
The text was updated successfully, but these errors were encountered: