Kaydet (Commit) 8e3f7214 authored tarafından Noel Grandin's avatar Noel Grandin

casting before calling getClass() is a waste of time

Change-Id: Id88aa9e43b736e6fdeaf098a952dae5421468f83
üst db4870bc
...@@ -359,7 +359,7 @@ public class MultiPropertyTest extends MultiMethodTest ...@@ -359,7 +359,7 @@ public class MultiPropertyTest extends MultiMethodTest
{ {
if (!util.utils.isVoid(oldValue) && oldValue instanceof Any) if (!util.utils.isVoid(oldValue) && oldValue instanceof Any)
{ {
oldValue = AnyConverter.toObject(new Type(((Any) oldValue).getClass()), oldValue); oldValue = AnyConverter.toObject(new Type(oldValue.getClass()), oldValue);
} }
log.println("result = " + toString(resValue)); log.println("result = " + toString(resValue));
} }
...@@ -393,7 +393,7 @@ public class MultiPropertyTest extends MultiMethodTest ...@@ -393,7 +393,7 @@ public class MultiPropertyTest extends MultiMethodTest
{ {
if (!util.utils.isVoid(oldValue) && oldValue instanceof Any) if (!util.utils.isVoid(oldValue) && oldValue instanceof Any)
{ {
oldValue = AnyConverter.toObject(new Type(((Any) oldValue).getClass()), oldValue); oldValue = AnyConverter.toObject(new Type(oldValue.getClass()), oldValue);
} }
log.println("result = " + toString(resValue)); log.println("result = " + toString(resValue));
} }
...@@ -427,7 +427,7 @@ public class MultiPropertyTest extends MultiMethodTest ...@@ -427,7 +427,7 @@ public class MultiPropertyTest extends MultiMethodTest
{ {
if (!util.utils.isVoid(oldValue) && oldValue instanceof Any) if (!util.utils.isVoid(oldValue) && oldValue instanceof Any)
{ {
oldValue = AnyConverter.toObject(new Type(((Any) oldValue).getClass()), oldValue); oldValue = AnyConverter.toObject(new Type(oldValue.getClass()), oldValue);
} }
log.println("result = " + toString(resValue)); log.println("result = " + toString(resValue));
} }
......
...@@ -403,11 +403,8 @@ public class CalcRTL ...@@ -403,11 +403,8 @@ public class CalcRTL
"' has changed"); "' has changed");
try { try {
if (!util.utils.isVoid(oldValue) && if (!util.utils.isVoid(oldValue) && oldValue instanceof Any) {
oldValue instanceof Any) { oldValue = AnyConverter.toObject( new Type(oldValue.getClass()), oldValue);
oldValue = AnyConverter.toObject(
new Type(((Any) oldValue).getClass()),
oldValue);
} }
System.out.println("old = " + toString(oldValue)); System.out.println("old = " + toString(oldValue));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment