Proposal: Relax new() constraint on TResponse
See original GitHub issueIs the new()
constraint really needed? Wouldn’t NoContent
if response is null
suffice?
It feels weird having to implement a public (of all things) default constructor seemingly only because one line of code needs new()
as guard against null.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
RFC 7807 - Problem Details for HTTP APIs
This specification does this by identifying a specific type of problem (e.g., "out of credit") with a URI [RFC3986]; HTTP APIs can do...
Read more >[Proposal] Add generic constraint 'notabstract' #7311
All that this constraint should do is disallow a developer to pass the abstract class as T . Of course, we have the...
Read more >W3C XML Schema Definition Language (XSD) 1.1 Part 1
For a given information item I , an expression of the form " I . [new property]" denotes the (value of the) property...
Read more >Core Features
This section dives into the details of Spring Boot. Here you can learn about the key features that you may want to use...
Read more >3 SOLVING PROBLEMS BY SEARCHING
Once the solution has been executed, the agent will formulate a new goal. Notice that while the agent is executing the solution sequence...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think throwing an NRE there is probably a good thing. It makes no sense to return
null
and then calling that ok. What doesnull
in this context refer to?since
TResponse
has anotnull
constraint, the ide should display a warning anyway.