Remove unnecessary casts

git-svn-id: http://google-refine.googlecode.com/svn/trunk@2173 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Tom Morris 2011-08-02 20:33:57 +00:00
parent 7fd6e22af4
commit 5497fa4685
8 changed files with 9 additions and 9 deletions

View File

@ -86,7 +86,7 @@ public class ScatterplotDrawingRowVisitor implements RowVisitor, RecordVisitor {
this.dim_y = dim_y;
this.rotation = rotation;
l = (double) size;
l = size;
r = ScatterplotFacet.createRotationMatrix(rotation, l);
image = new BufferedImage(size, size, BufferedImage.TYPE_4BYTE_ABGR);

View File

@ -223,7 +223,7 @@ public class GuessTypesOfColumnCommand extends Command {
typeName = ((JSONObject) type).getString("name");
}
double score2 = score * (typeCount - t) / (double) typeCount;
double score2 = score * (typeCount - t) / typeCount;
if (map.containsKey(typeID)) {
TypeGroup tg = map.get(typeID);
tg.score += score2;

View File

@ -114,7 +114,7 @@ public class Get implements Function {
if (v.getClass().isArray()) {
Object[] a2 = new Object[end - start];
System.arraycopy((Object[]) v, start, a2, 0, end - start);
System.arraycopy(v, start, a2, 0, end - start);
return a2;
} else if (v instanceof HasFieldsList) {

View File

@ -82,7 +82,7 @@ public class Slice implements Function {
if (v.getClass().isArray()) {
Object[] a2 = new Object[end - start];
System.arraycopy((Object[]) v, start, a2, 0, end - start);
System.arraycopy(v, start, a2, 0, end - start);
return a2;
} else if (v instanceof HasFieldsList) {

View File

@ -57,7 +57,7 @@ public class Reinterpret implements Function {
String str = (o1 instanceof String) ? (String) o1 : o1.toString();
Project project = (Project) bindings.get("project");
ProjectMetadata metadata = ProjectManager.singleton.getProjectMetadata(project.id);
String decoder = (String) metadata.getEncoding();
String decoder = metadata.getEncoding();
String encoder = (String) o2;
String reinterpreted = null;

View File

@ -112,7 +112,7 @@ public abstract class TreeImportUtilities {
String columnLocalName,
String text
) {
if (text == null || ((String) text).isEmpty()) {
if (text == null || (text).isEmpty()) {
return;
}

View File

@ -59,7 +59,7 @@ public class TopList implements Jsonizable, Iterable<String> {
@SuppressWarnings("unchecked")
public List<String> getList() {
return (List<String>) UnmodifiableList.decorate(_list);
return UnmodifiableList.decorate(_list);
}
public void add(String element) {

View File

@ -178,13 +178,13 @@ public class JSONUtilities {
} else if (value instanceof Number) {
obj.put(key, ((Double) value).doubleValue());
} else if (value instanceof Boolean) {
obj.put(key, (Boolean) value);
obj.put(key, value);
} else if (value instanceof Date) {
obj.put(key, ParsingUtilities.dateToString((Date) value));
} else if (value instanceof Calendar) {
obj.put(key, ParsingUtilities.dateToString(((Calendar) value).getTime()));
} else if (value instanceof String) {
obj.put(key, (String) value);
obj.put(key, value);
} else {
obj.put(key, value.toString());
}