List of usage examples for java.lang CloneNotSupportedException CloneNotSupportedException
public CloneNotSupportedException()
CloneNotSupportedException
with no detail message. From source file:com.aurel.track.prop.ApplicationBean.java
/** * Make sure we can't create a second instance by cloning. *///w w w. j a v a 2s . c o m @Override public Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException(); // that'll teach 'em }
From source file:org.marketcetera.util.except.ExceptUtilsTest.java
@Test public void interruptionMessageNestedNoThrow() throws Exception { ExceptUtils.checkInterruption(new CloneNotSupportedException(), TEST_MSG_1); }
From source file:org.kalypso.gmlschema.types.SimpleDOMTypeHandler.java
@Override public Object cloneObject(final Object objectToClone, final String gmlVersion) throws CloneNotSupportedException { throw new CloneNotSupportedException(); }
From source file:org.marketcetera.util.except.ExceptUtilsTest.java
@Test public void interruptionMessageNestedThrow() { CloneNotSupportedException nested = new CloneNotSupportedException(); Thread.currentThread().interrupt(); try {//from www. java 2s . co m ExceptUtils.checkInterruption(nested, TEST_MSG_1); fail(); } catch (InterruptedException ex) { assertTrue(Thread.interrupted()); assertEquals(TEST_MSG_1, ex.getMessage()); assertEquals(nested, ex.getCause()); } }
From source file:org.marketcetera.util.except.ExceptUtilsTest.java
@Test public void interruptException() { assertFalse(ExceptUtils.isInterruptException(new CloneNotSupportedException())); assertTrue(ExceptUtils.isInterruptException(new InterruptedException())); assertTrue(ExceptUtils.isInterruptException(new InterruptedIOException())); assertTrue(ExceptUtils.isInterruptException(new ClosedByInterruptException())); assertTrue(ExceptUtils.isInterruptException(new FileLockInterruptionException())); assertTrue(ExceptUtils.isInterruptException(new InterruptedNamingException())); assertTrue(ExceptUtils.isInterruptException(new I18NInterruptedException())); assertTrue(ExceptUtils.isInterruptException(new I18NInterruptedRuntimeException())); }
From source file:org.kalypsodeegree_impl.filterencoding.AbstractFilter.java
@Override public final Filter clone() throws CloneNotSupportedException { try {/*from w w w . j a v a 2 s.co m*/ final Element dom = toDom(); return AbstractFilter.buildFromDOM(dom); } catch (final Exception e) { e.printStackTrace(); } throw new CloneNotSupportedException(); }
From source file:org.marketcetera.util.except.ExceptUtilsTest.java
@Test public void interrupt() { interruptHelper(new CloneNotSupportedException(), false); interruptHelper(new InterruptedException(), true); interruptHelper(new InterruptedIOException(), true); interruptHelper(new ClosedByInterruptException(), true); interruptHelper(new FileLockInterruptionException(), true); interruptHelper(new InterruptedNamingException(), true); interruptHelper(new I18NInterruptedException(), true); interruptHelper(new I18NInterruptedRuntimeException(), true); }
From source file:net.sf.maltcms.chromaui.charts.events.XYAnnotationAdder.java
/** * Returns a clone of this instance./*w w w .ja v a 2 s.co m*/ * * @return A clone of this instance. * * @throws java.lang.CloneNotSupportedException if there is some problem * with the cloning. */ @Override public Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException(); }
From source file:WeakHashSet.java
/** * {@inheritDoc}//from w w w .j av a 2 s. c om */ protected Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException(); }
From source file:org.marketcetera.util.except.ExceptUtilsTest.java
@Test public void swallow() { swallowHelper(new CloneNotSupportedException(), false); swallowHelper(new InterruptedException(), true); swallowHelper(new InterruptedIOException(), true); swallowHelper(new ClosedByInterruptException(), true); swallowHelper(new FileLockInterruptionException(), true); swallowHelper(new InterruptedNamingException(), true); swallowHelper(new I18NInterruptedException(), true); swallowHelper(new I18NInterruptedRuntimeException(), true); }