-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
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
"truncateActual" results in null pointer exceptions #2466
Labels
Comments
It looks like the order the mappings are added with matters. If the mapping containing |
papiomytoglou
added a commit
to papiomytoglou/wiremock
that referenced
this issue
Oct 28, 2023
7 tasks
oleg-nenashev
pushed a commit
that referenced
this issue
Oct 30, 2023
henrik242
pushed a commit
to henrik242/wiremock
that referenced
this issue
Nov 10, 2023
Marvin9
pushed a commit
to Marvin9/wiremock
that referenced
this issue
Nov 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Proposal
Using a JSON mapping file which includes
truncateActual
in standalone results in null pointer exceptions for all requests with non-matching URIs or date/time values.For example, when including the matcher below in a mapping
all requests with matching URIs or
datetime
values will still be handled correctly but all other requests will result in the following null pointer exception:Removing
truncateActual
stops the exception from being thrown but is not a solution since the two matchers are not equivalent.Tested in standalone versions
3.0.1
,3.1.0
and3.2.0
Reproduction steps
Create a JSON file in
mappings
with the following data:Create a second JSON file, also in
mappings
, with the following data:Start
wiremock-standalone-3.2.0.jar
locally on port 80 only using the above two mappings then open a browser and navigate to the following URIs replacing2023-10-27
with the current date:References
No response
The text was updated successfully, but these errors were encountered: