Skip to content
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

Jax-RS 2.1 #51

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

Jax-RS 2.1 #51

wants to merge 19 commits into from

Conversation

trajano
Copy link
Owner

@trajano trajano commented Dec 28, 2017

Use REST Easy 4.0.0.Beta2 to prepare for JAX-RS 2.1
When released bump to version 2.0.0 of the app-ms
Remove deprecated code as well.

@trajano trajano added this to the 2.0.0 milestone Jan 7, 2018
@trajano trajano self-assigned this Jan 7, 2018
@trajano trajano force-pushed the jaxrs-2.1 branch 4 times, most recently from c69f5e4 to de1cd2c Compare March 1, 2018 14:24
@trajano trajano force-pushed the master branch 16 times, most recently from abd8e9c to 6bfd4af Compare March 3, 2018 02:45
@trajano trajano force-pushed the jaxrs-2.1 branch 2 times, most recently from bf9652b to 439776a Compare March 7, 2018 16:13

final Map<String, Set<ConstraintViolation<Object>>> violationMap = new LinkedHashMap<>();
boolean hasViolation = false;
for (int i = 0; i < method.getParameterCount(); ++i) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Reduce the total number of break and continue statements in this loop to use at most one. rule

final boolean showStackTrace) {

super(e, uriInfo, showStackTrace);
violations = StreamSupport.stream(e.getConstraintViolations().spliterator(), false).map(v -> new ConstraintViolationElement(v)).collect(Collectors.toList());
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Replace this lambda with a method reference. rule

trajano and others added 17 commits May 24, 2018 16:40
Use the new version of spring boot.  This will change the SPI because
Spring boot now uses Class<?>[] to boostrap rather than Object[].

It also upgrades Mockito to 2.x which requires an additional test scope
library for Vert.X mock testing.
Removes deprecation
Versions that are part of the spring-boot are used.

Added additional support for JSON-B.
Used ArgumentMatchers
Introduces the use of Bean Validation API to validate the input data.
A custom ExceptionMapper and response structure is used to show the
error.

The sample also adds a validation annotated bean for testing.

The exception mapper logging now goes to net.trajano.ms.MicroService
rather than individual ones.
BVal is not used and Hibernate Validator is used instead as it is the
only one that supports Bean Validation 2.0 right now.
@trajano
Copy link
Owner Author

trajano commented May 24, 2018

SonarQube analysis reported 5 issues

  • CRITICAL 1 critical
  • MAJOR 2 major
  • MINOR 2 minor

Watch the comments in this conversation to review them.

3 extra issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. CRITICAL SwaggerCollator.java#L110: Define a constant instead of duplicating this literal "swagger[%d].uris[%d].paths[%d].from" 3 times. rule
  2. MAJOR SpringJaxRsHandler.java#L265: This block of commented-out lines of code should be removed. rule
  3. MAJOR HelloResource.java#L195: A "NullPointerException" could be thrown; "ret" is nullable here. rule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant