My predecessor (a very experienced Java programmer who has left) has written Java code and I don't understand why he did it that way. Does anyone have an idea when you would like to do something like that? Do you have other comments about the code?
@SuppressWarnings({"ClassWithoutLogger", "FinalClass"}) public final class ThreadUtil { static public boolean sleep(long pS, final Object pO) { try { synchronized (pO) {https://www.javaprogrammingforums.com/editpost.php?p=167774&do=editpost pO.wait(pS); } } catch (InterruptedException e) { return true; } return false; } private ThreadUtil() { } }