@@ -136,7 +136,7 @@ private class Delta {
136136
137137 private Stage mainStage ;
138138 private Controller controller ;
139- private Model model ;
139+ private static Model model ;
140140
141141 public void setController (final Controller controller , final Model model ) {
142142 this .controller = controller ;
@@ -198,7 +198,7 @@ private void initialize() {
198198 addNewProjectButton .textFillProperty ().bind (fontColorProperty );
199199
200200 // Add a light to colorize buttons
201- // TODO does this go nicer?
201+ // TODO is there a nicer way for this ?
202202 final Lighting lighting = new Lighting ();
203203 lighting .lightProperty ().bind (Bindings .createObjectBinding (() -> {
204204 final Color color = fontColorProperty .get ();
@@ -316,9 +316,8 @@ private void initialize() {
316316 final Label label = entry .getValue ();
317317
318318 final long seconds = model .getPastWorkItems ().stream ()
319- .filter ((work ) -> work .getProject ().getId () == p .getId ()).mapToLong (work -> {
320- return Duration .between (work .getStartTime (), work .getEndTime ()).getSeconds ();
321- }).sum ();
319+ .filter (work -> work .getProject ().getId () == p .getId ())
320+ .mapToLong (work -> Duration .between (work .getStartTime (), work .getEndTime ()).getSeconds ()).sum ();
322321 label .setText (DateFormatter .secondsToHHMMSS (seconds ));
323322 }
324323
@@ -468,7 +467,7 @@ private Node addProjectToProjectList(final Project p) {
468467 try {
469468 projectElement = loader .load ();
470469 } catch (final IOException e1 ) {
471- LOG .error ("Could not load '{}'." , loader .getLocation (), e1 );
470+ LOG .error ("Could not load '{}'." , loader .getLocation ());
472471 throw new FXMLLoaderException (e1 );
473472 }
474473
0 commit comments