mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
No effective change - code cleanup - remove redundant casts
This commit is contained in:
@@ -58,7 +58,7 @@ class ModifyHolder<E> implements Serializable {
|
||||
void modifyRemoval(Object bean) {
|
||||
if (bean != null) {
|
||||
// If it is to be added then just remove the addition
|
||||
if (!modifyAdditions.remove((E) bean)) {
|
||||
if (!modifyAdditions.remove(bean)) {
|
||||
modifyDeletions.add((E) bean);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ public class StringHelper {
|
||||
int startPos = 0;
|
||||
delimiter(str, delimiter, keepEmpties, startPos, list);
|
||||
String[] result = new String[list.size()];
|
||||
return (String[]) list.toArray(result);
|
||||
return list.toArray(result);
|
||||
}
|
||||
|
||||
private static void delimiter(String str, String delimiter, boolean keepEmpties, int startPos,
|
||||
|
||||
@@ -62,7 +62,7 @@ public class DeployOrmXml {
|
||||
Dnode nqQueryNode = nqNode.find("query");
|
||||
if (nqQueryNode != null) {
|
||||
String queryContent = nqQueryNode.getNodeContent();
|
||||
String queryName = (String) nqNode.getAttribute("name");
|
||||
String queryName = nqNode.getAttribute("name");
|
||||
|
||||
if (queryName != null && queryContent != null) {
|
||||
DNativeQuery query = new DNativeQuery(queryContent);
|
||||
|
||||
@@ -56,7 +56,7 @@ public final class ImportedIdSimple implements ImportedId, Comparable<ImportedId
|
||||
*/
|
||||
public static ImportedIdSimple[] sort(List<ImportedIdSimple> list) {
|
||||
|
||||
ImportedIdSimple[] importedIds = (ImportedIdSimple[]) list.toArray(new ImportedIdSimple[list.size()]);
|
||||
ImportedIdSimple[] importedIds = list.toArray(new ImportedIdSimple[list.size()]);
|
||||
|
||||
// sort into the same order as the BeanProperties
|
||||
Arrays.sort(importedIds, COMPARATOR);
|
||||
|
||||
@@ -873,7 +873,7 @@ public class DeployBeanProperty {
|
||||
* Return an extra attribute set on this property.
|
||||
*/
|
||||
public String getExtraAttribute(String key) {
|
||||
return (String) extraAttributeMap.get(key);
|
||||
return extraAttributeMap.get(key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -135,14 +135,14 @@ public class DeployTableJoin {
|
||||
* Return the join columns.
|
||||
*/
|
||||
public DeployTableJoinColumn[] columns() {
|
||||
return (DeployTableJoinColumn[]) columns.toArray(new DeployTableJoinColumn[columns.size()]);
|
||||
return columns.toArray(new DeployTableJoinColumn[columns.size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* For secondary table joins returns the properties mapped to that table.
|
||||
*/
|
||||
public DeployBeanProperty[] properties() {
|
||||
return (DeployBeanProperty[]) properties.toArray(new DeployBeanProperty[properties.size()]);
|
||||
return properties.toArray(new DeployBeanProperty[properties.size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -54,7 +54,7 @@ public class DeployBeanInfo<T> {
|
||||
|
||||
String key = tableName.toLowerCase();
|
||||
|
||||
DeployTableJoin tableJoin = (DeployTableJoin) tableJoinMap.get(key);
|
||||
DeployTableJoin tableJoin = tableJoinMap.get(key);
|
||||
if (tableJoin == null) {
|
||||
tableJoin = new DeployTableJoin();
|
||||
tableJoin.setTable(tableName);
|
||||
|
||||
@@ -116,11 +116,11 @@ public class DeployInherit {
|
||||
// its the root of inheritance tree...
|
||||
}
|
||||
|
||||
Inheritance ia = (Inheritance) cls.getAnnotation(Inheritance.class);
|
||||
Inheritance ia = cls.getAnnotation(Inheritance.class);
|
||||
if (ia != null) {
|
||||
ia.strategy();
|
||||
}
|
||||
DiscriminatorColumn da = (DiscriminatorColumn) cls.getAnnotation(DiscriminatorColumn.class);
|
||||
DiscriminatorColumn da = cls.getAnnotation(DiscriminatorColumn.class);
|
||||
if (da != null) {
|
||||
// lowercase the discriminator column for RawSql and JSON
|
||||
info.setDiscriminatorColumn(da.name().toLowerCase());
|
||||
@@ -133,7 +133,7 @@ public class DeployInherit {
|
||||
info.setDiscriminatorLength(da.length());
|
||||
}
|
||||
|
||||
DiscriminatorValue dv = (DiscriminatorValue) cls.getAnnotation(DiscriminatorValue.class);
|
||||
DiscriminatorValue dv = cls.getAnnotation(DiscriminatorValue.class);
|
||||
if (dv != null) {
|
||||
info.setDiscriminatorValue(dv.value());
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ public class DnodeParser extends DefaultHandler {
|
||||
stack.pop();
|
||||
if (!stack.isEmpty()) {
|
||||
// get the new currentNode
|
||||
currentNode = (Dnode) stack.pop();
|
||||
currentNode = stack.pop();
|
||||
stack.push(currentNode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ public class StringHelper {
|
||||
int startPos = 0;
|
||||
delimiter(str, delimiter, keepEmpties, startPos, list);
|
||||
String[] result = new String[list.size()];
|
||||
return (String[]) list.toArray(result);
|
||||
return list.toArray(result);
|
||||
}
|
||||
|
||||
private static void delimiter(String str, String delimiter, boolean keepEmpties, int startPos,
|
||||
|
||||
Reference in New Issue
Block a user