mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 10:20:15 +07:00
StreamToLoop: support Optional unwrap if possible
This commit is contained in:
@@ -16,7 +16,7 @@ public class Main {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return count == 0 ? 0.0 : (double) sum / count;
|
||||
return count > 0 ? (double) sum / count : 0.0;
|
||||
};
|
||||
System.out.println(s.getAsDouble());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user