I’ve run into some interesting results with the Rules of Injection, here’s what I’ve found:
public class TodoResource{
@Context
UriInfo uriInfo; // Set second
public TodoResource(@Context UriInfo value){
uriInfo = value; // Set first (makes sense)
}
@Context
public void setUriInfo(UriInfo value){
uriInfo = value; // Set third
}
}
I hope this helps.