Created
December 13, 2018 00:03
-
-
Save ruimo/ff9074800bc4a96817cc417a991c7216 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo { | |
private final OptionalInt testPort = new Supplier<OptionalInt>() { | |
public OptionalInt get() { | |
String tp = System.getProperty("test.port"); | |
return tp == null ? OptionalInt.empty() : OptionalInt.of(Integer.parseInt(tp)); | |
} | |
}.get(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment