ctubbsii commented on issue #5601: URL: https://github.com/apache/accumulo/issues/5601#issuecomment-3181856451
I think it's okay. As @kevinrr888 stated, we only use this when we believe it is unreachable. IllegalStateException might be more useful in some places, but I think we use AssertionError when we have a very high confidence that it is unreachable, and we don't expect to have to handle it; if it ever actually occurs, it should cause the process to die, because it should be very visible that we failed to code something properly... whereas IllegalStateException is something we actually expect might occur ocassionally due to the system state, and we have to handle it, and possibly propagate it through the code. Essentially, we use `throw new AssertionError();` in place of `assert false;`, because the JVM is rarely run with assertions enabled (`-ea, -enableassertions` flag), so if they ever did get hit, they probably would go overlooked. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@accumulo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org