[Minor] removed unnecessary cast

This commit is contained in:
Robert von Burg 2016-02-10 17:48:55 +01:00
parent e2b3e5f7b0
commit 465d949071
3 changed files with 14 additions and 14 deletions

View File

@ -15,17 +15,17 @@ import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import li.strolch.model.timevalue.IValueChange;
import li.strolch.model.timevalue.impl.IntegerValue;
import li.strolch.model.timevalue.impl.ValueChange;
import li.strolch.model.xml.ActivityToDomVisitor;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import li.strolch.model.timevalue.IValueChange;
import li.strolch.model.timevalue.impl.IntegerValue;
import li.strolch.model.timevalue.impl.ValueChange;
import li.strolch.model.xml.ActivityToDomVisitor;
public class ActionTest {
Action action;
@ -61,7 +61,7 @@ public class ActionTest {
@Test
public void testClone() {
Action clone = (Action) this.action.getClone();
Action clone = this.action.getClone();
Assert.assertEquals(this.action.toString(), clone.toString());
Assert.assertEquals(this.action.changes.size(), clone.changes.size());
for (int i = 0; i < this.action.changes.size(); i++) {

View File

@ -11,16 +11,16 @@ import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import li.strolch.exception.StrolchException;
import li.strolch.model.State;
import li.strolch.model.xml.ActivityToDomVisitor;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import li.strolch.exception.StrolchException;
import li.strolch.model.State;
import li.strolch.model.xml.ActivityToDomVisitor;
public class ActivityTest {
Activity activity, childActivity;
@ -100,7 +100,7 @@ public class ActivityTest {
@Test
public void cloneTest() {
Activity clone = (Activity) this.activity.getClone();
Activity clone = this.activity.getClone();
Assert.assertEquals(this.activity.toString(), clone.toString());
Assert.assertEquals(this.activity.getElements().size(), clone.getElements().size());
}

View File

@ -87,19 +87,19 @@ public class PostgreSqlStrolchTransaction extends AbstractTransaction {
OrderDao getOrderDao() {
if (this.orderDao == null)
this.orderDao = new PostgreSqlOrderDao(this);
return (OrderDao) this.orderDao;
return this.orderDao;
}
ResourceDao getResourceDao() {
if (this.resourceDao == null)
this.resourceDao = new PostgreSqlResourceDao(this);
return (ResourceDao) this.resourceDao;
return this.resourceDao;
}
ActivityDao getActivityDao() {
if (this.activityDao == null)
this.activityDao = new PostgreSqlActivityDao(this);
return (ActivityDao) this.activityDao;
return this.activityDao;
}
public AuditDao getAuditDao() {