Skip to content

Commit b273329

Browse files
Keep Optional.ofNullable
1 parent af09169 commit b273329

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sbt-bridge/src/xsbt/DelegatingReporter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ public void doReport(MessageContainer cont, Context ctx) {
8181
position = new Position() {
8282
public Optional<java.io.File> sourceFile() {
8383
if (src.exists()) return Optional.empty();
84-
else return Optional.of(src.file().file());
84+
else return Optional.ofNullable(src.file().file());
8585
}
8686
public Optional<String> sourcePath() {
8787
if (src.exists()) return Optional.empty();
88-
else return Optional.of(src.file().path());
88+
else return Optional.ofNullable(src.file().path());
8989
}
9090
public Optional<Integer> line() {
9191
int line = pos.line();

0 commit comments

Comments
 (0)