Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CD189185B5 for ; Sun, 22 Nov 2015 13:22:11 +0000 (UTC) Received: (qmail 7576 invoked by uid 500); 22 Nov 2015 13:22:11 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 7542 invoked by uid 500); 22 Nov 2015 13:22:11 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 7531 invoked by uid 99); 22 Nov 2015 13:22:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Nov 2015 13:22:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 0114F2C044E for ; Sun, 22 Nov 2015 13:22:10 +0000 (UTC) Date: Sun, 22 Nov 2015 13:22:10 +0000 (UTC) From: "Robert Stupp (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CASSANDRA-10750) Minor code improvements MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Robert Stupp created CASSANDRA-10750: ---------------------------------------- Summary: Minor code improvements Key: CASSANDRA-10750 URL: https://issues.apache.org/jira/browse/CASSANDRA-10750 Project: Cassandra Issue Type: Improvement Reporter: Robert Stupp Assignee: Robert Stupp Priority: Minor Went though several IDE inspections and found some places in the code that could be improved. These are just minor improvements and no bug fixes (except one minor "theoretical" thing). The [branch on github against trunk|https://github.com/snazy/cassandra/tree/10750-code-opts-trunk] contains a series of commits: * simplify Mutation.apply to remove the casts * "minor code improvements" just replaces some expressions that are effectively constant * remove unused assignments (probably just cosmetic) * collapse identical if-branches (probably just cosmetic) * empty array constants * fix printf usage (could potentially raise an exception in printf) * replace tail-recursion in some critical sections (as the JVM cannot optimize that AFAIK) * remove methods identical to their super methods (probably just cosmetic) [cassci results here|http://cassci.datastax.com/view/Dev/view/snazy/search/?q=snazy-10750-] -- This message was sent by Atlassian JIRA (v6.3.4#6332)