4 ms·
The most expensive part of Java exceptions is building the stacktrace. You can avoid this by overriding the fillInStacktrace method with an empty implementation
by Gurkenmaster 12y ago
The most expensive part of Java exceptions is building the stacktrace. You can avoid this by overriding the fillInStacktrace method with an empty implementation.
- deleted 12y ago[deleted]
- copsarebastards 12y agoOr you could just have it not throw the exception in the first place and test the return code, which documents your control flow much more clearly.