Singleton pattern for sorts in java backend

ready for review
this method is called by the JVM. Can you please test to make sure that if this AssertionError is thrown, it actually bubbles up to the user?