Speed up class check 36/17536/7
authorRobert Varga <rovarga@cisco.com>
Wed, 1 Apr 2015 11:55:04 +0000 (13:55 +0200)
committerRobert Varga <rovarga@cisco.com>
Thu, 2 Apr 2015 08:23:03 +0000 (10:23 +0200)
Class.equals() returns the same, but calling it on a constant very
obvious to JIT that it can inline things.

Change-Id: I9e13a4b55ec194f51c8a39302433e22194a44b64
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java

index a7effbcf3792346b6521fec14b599dc1bfa0194b..74d8e93102f3171d089a69703c994d961232635b 100644 (file)
@@ -668,7 +668,7 @@ public class TransactionProxy extends AbstractDOMStoreTransaction<TransactionIde
                 LOG.debug("Tx {} Creating NoOpTransaction because of error", getIdentifier(), failure);
 
                 localTransactionContext = new NoOpTransactionContext(failure, getIdentifier(), operationLimiter);
-            } else if (response.getClass().equals(CreateTransactionReply.SERIALIZABLE_CLASS)) {
+            } else if (CreateTransactionReply.SERIALIZABLE_CLASS.equals(response.getClass())) {
                 localTransactionContext = createValidTransactionContext(
                         CreateTransactionReply.fromSerializable(response));
             } else {