From 8e3f72141625898c01e39e94d3fdaefd66c885ff Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 14 Oct 2015 10:37:15 +0200 Subject: casting before calling getClass() is a waste of time Change-Id: Id88aa9e43b736e6fdeaf098a952dae5421468f83 --- sc/qa/complex/sc/CalcRTL.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'sc/qa/complex') diff --git a/sc/qa/complex/sc/CalcRTL.java b/sc/qa/complex/sc/CalcRTL.java index 3c3fdd4e50f9..9f946a51235a 100644 --- a/sc/qa/complex/sc/CalcRTL.java +++ b/sc/qa/complex/sc/CalcRTL.java @@ -403,11 +403,8 @@ public class CalcRTL "' has changed"); try { - if (!util.utils.isVoid(oldValue) && - oldValue instanceof Any) { - oldValue = AnyConverter.toObject( - new Type(((Any) oldValue).getClass()), - oldValue); + if (!util.utils.isVoid(oldValue) && oldValue instanceof Any) { + oldValue = AnyConverter.toObject( new Type(oldValue.getClass()), oldValue); } System.out.println("old = " + toString(oldValue)); -- cgit