List of usage examples for java.lang CloneNotSupportedException toString
public String toString()
From source file:org.jfree.data.statistics.DefaultStatisticalCategoryDatasetTest.java
/** * Some checks for cloning./* w ww . j a va 2 s .co m*/ */ @Test public void testCloning() { DefaultStatisticalCategoryDataset d1 = new DefaultStatisticalCategoryDataset(); d1.add(1.1, 2.2, "R1", "C1"); d1.add(3.3, 4.4, "R1", "C2"); d1.add(null, new Double(5.5), "R1", "C3"); d1.add(new Double(6.6), null, "R2", "C3"); DefaultStatisticalCategoryDataset d2 = null; try { d2 = (DefaultStatisticalCategoryDataset) d1.clone(); } catch (CloneNotSupportedException e) { fail(e.toString()); } assertTrue(d1 != d2); assertTrue(d1.getClass() == d2.getClass()); assertTrue(d1.equals(d2)); // check independence d1.add(1.1, 2.2, "R3", "C1"); assertFalse(d1.equals(d2)); }
From source file:com.intuit.tank.http.xml.GenericXMLHandler.java
/** * Clone the object/*w w w .j a va2 s .c o m*/ */ public Object clone() { try { return super.clone(); } catch (CloneNotSupportedException e) { throw new InternalError(e.toString()); } }
From source file:com.chinamobile.bcbsp.util.JobStatus.java
@Override public Object clone() { try {//from ww w .j a va 2s.com return super.clone(); } catch (CloneNotSupportedException cnse) { LOG.error("[clone]", cnse); throw new InternalError(cnse.toString()); } }
From source file:com.hmsinc.epicenter.model.analysis.AnalysisParameters.java
@Override public Object clone() { final AnalysisParameters clone; try {/* w w w . j a v a 2 s. c o m*/ clone = (AnalysisParameters) super.clone(); } catch (CloneNotSupportedException e) { throw new InternalError(e.toString()); } clone.getAttributes().addAll(attributes); clone.getClassifications().addAll(classifications); clone.getContainers().addAll(containers); return clone; }
From source file:com.medlog.webservice.vo.DiaryAnalysisVO.java
@Override public Object clone() { try {/*from w w w .j a v a 2 s .c o m*/ Object copy = super.clone(); if (copy != null && copy != this) { return copy; } } catch (CloneNotSupportedException e) { // this should never happen throw new InternalError(e.toString()); } return ObjUtl.cloneObjectDeepInstance(this); }
From source file:eu.planets_project.tb.impl.services.TestbedServiceTemplateImpl.java
public TestbedServiceTemplateImpl clone() { TestbedServiceTemplateImpl template = new TestbedServiceTemplateImpl(); try {//w w w . j a v a2 s . c o m template = (TestbedServiceTemplateImpl) super.clone(); } catch (CloneNotSupportedException e) { log.error("Error cloning TestbedServiceTemplateImpl Object" + e.toString()); } return template; }
From source file:org.apache.hadoop.mapred.SampleTaskStatus.java
@Override public Object clone() { try {/*from w w w . j a v a2s . c o m*/ return super.clone(); } catch (CloneNotSupportedException cnse) { // Shouldn't happen since we do implement Clonable throw new InternalError(cnse.toString()); } }
From source file:org.apache.hama.bsp.JobStatus.java
@Override public Object clone() { try {// ww w . ja v a 2s. com return super.clone(); } catch (CloneNotSupportedException cnse) { throw new InternalError(cnse.toString()); } }