Apply suggestions from code review
This commit is contained in:
		@@ -149,10 +149,8 @@ public final class SceneContext {
 | 
				
			|||||||
			stage.sizeToScene();
 | 
								stage.sizeToScene();
 | 
				
			||||||
			// If the controller implements the Restorable interface,
 | 
								// If the controller implements the Restorable interface,
 | 
				
			||||||
			// the actions to perform on restoration will be executed here
 | 
								// the actions to perform on restoration will be executed here
 | 
				
			||||||
			try {
 | 
								final var controller = controllerStack.peek();
 | 
				
			||||||
				final Restorable restorable = (Restorable) controllerStack.peek();
 | 
								if (controller instanceof Restorable) ((Restorable) controller).onRestore();
 | 
				
			||||||
				restorable.onRestore();
 | 
					 | 
				
			||||||
			} catch (final ClassCastException e) {}
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		stage.show();
 | 
							stage.show();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user