瀏覽代碼

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

Stephen Gold 4 年之前
父節點
當前提交
1d815ee7f4
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      jme3-examples/src/main/java/jme3test/app/state/TestIssue1421.java

+ 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();
         }