Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 62837 invoked from network); 30 Nov 2009 17:16:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Nov 2009 17:16:38 -0000 Received: (qmail 42661 invoked by uid 500); 30 Nov 2009 17:16:37 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 42574 invoked by uid 500); 30 Nov 2009 17:16:37 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 42565 invoked by uid 99); 30 Nov 2009 17:16:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Nov 2009 17:16:37 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Nov 2009 17:16:34 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8145023889E8; Mon, 30 Nov 2009 17:16:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r885505 - /commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java Date: Mon, 30 Nov 2009 17:16:14 -0000 To: commits@commons.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091130171614.8145023889E8@eris.apache.org> Author: sebb Date: Mon Nov 30 17:16:13 2009 New Revision: 885505 URL: http://svn.apache.org/viewvc?rev=885505&view=rev Log: Reduce visibility of "strict" variable (there is a getter) Document why casts are safe Modified: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java Modified: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java?rev=885505&r1=885504&r2=885505&view=diff ============================================================================== --- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java (original) +++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java Mon Nov 30 17:16:13 2009 @@ -51,7 +51,7 @@ /** Long.MIN_VALUE as BigInteger. */ protected static final BigInteger BIGI_LONG_MIN_VALUE = BigInteger.valueOf(Long.MIN_VALUE); /** Whether this JexlArithmetic instance behaves in strict or lenient mode. */ - protected boolean strict; + private boolean strict; /** * Creates a JexlArithmetic. @@ -535,11 +535,11 @@ String rightString = right.toString(); return leftString.compareTo(rightString) < 0; } else if (left instanceof Comparable) { - @SuppressWarnings("unchecked") + @SuppressWarnings("unchecked") // OK because of instanceof check above final Comparable comparable = (Comparable) left; return comparable.compareTo(right) < 0; } else if (right instanceof Comparable) { - @SuppressWarnings("unchecked") + @SuppressWarnings("unchecked") // OK because of instanceof check above final Comparable comparable = (Comparable) right; return comparable.compareTo(left) > 0; }