playframework / playframework/play-ws
Make nullable getters use Optional<T> or Option[T]
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 224
- Forks
- 92
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 28
Description
In many places, the Java WSRequest and WSResponse still use methods which return null:
public interface StandaloneWSRequest {
String getUsername();
String getPassword();
WSAuthScheme getScheme();
WSSignatureCalculator getCalculator();
Duration getRequestTimeoutDuration();
boolean getFollowRedirects();
String getContentType();
}
And they should return Optional<String> etc where appropriate.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the StandaloneWSRequest and WSResponse interfaces and reviewing the listed nullable getters, including getUsername, getPassword, getScheme, getCalculator, getRequestTimeoutDuration, getContentType, and getFollowRedirects. Determine which return types should become Optional or Option[T], then update the affected API consistently; done means nullable getters no longer expose null where the issue specifies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, scala
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100