Sfoglia il codice sorgente

TestIssue1421: use a more specific exception type, to please Codacy

Stephen Gold 4 anni fa
parent
commit
1d815ee7f4

+ 3 - 2
jme3-examples/src/main/java/jme3test/app/state/TestIssue1421.java

@@ -88,12 +88,13 @@ public class TestIssue1421 extends SimpleApplication {
             List<SceneProcessor> processorList = lastViewPort.getProcessors();
             int numProcessors = processorList.size();
             if (numProcessors != 0) {
-                throw new RuntimeException("SceneProcessor is still attached.");
+                throw new IllegalStateException(
+                        "SceneProcessor is still attached.");
             }
 
             // Check whether KEY_SYSRQ is still mapped.
             if (inputManager.hasMapping("ScreenShot")) {
-                throw new RuntimeException("KEY_SYSRQ is still mapped.");
+                throw new IllegalStateException("KEY_SYSRQ is still mapped.");
             }
             stop();
         }