Github user glitch commented on the issue:

    https://github.com/apache/accumulo/pull/289
  
    @milleruntime What's your feeling on using javax.validation.constraints 
right in the method signature?  Doing that I can pretty much eliminate the 
ParameterValidator class altogether.
    i.e.
    `@Path("show/{id}")
      @GET
      public TraceList getTracesType(@PathParam("id") @NotNull @Pattern(regexp 
= "\\w+") String id) throws Exception {
    `
    For int params:
    `@DefaultValue("10") @PathParam("minutes") @NotNull @Min(0) @Max(2592000) 
int minutes`
    
    It loses the single class encapsulation, but on the other hand you can 
really fine tune each method and it makes it self documenting.  It looks like 
support is built directly into Jersey for it.
    
    Thoughts?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to