/** * Get the lazily loaded reference in a non-cancellable manner. If your * <code>create()</code> method throws an Exception calls to * <code>get()</code> will throw an InitializationException which wraps the * previously thrown exception. * * @return the object that {@link #create()} created. * @throws InitializationException if the {@link #create()} method throws an * exception. The {@link InitializationException#getCause()} will contain the * exception thrown by the {@link #create()} method */ @Override public final T get() { boolean interrupted = false; try { while (true) { try { return getInterruptibly(); } catch (final InterruptedException ignore) { // ignore and try again interrupted = true; } } } finally { if (interrupted) { Thread.currentThread().interrupt(); } } }