Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7A52061C0 for ; Thu, 30 Jun 2011 18:37:38 +0000 (UTC) Received: (qmail 58711 invoked by uid 500); 30 Jun 2011 18:37:38 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 58565 invoked by uid 500); 30 Jun 2011 18:37: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 58558 invoked by uid 99); 30 Jun 2011 18:37:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jun 2011 18:37:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED 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; Thu, 30 Jun 2011 18:37:34 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D43C4238890D for ; Thu, 30 Jun 2011 18:37:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1141657 - in /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath: FloydWarshall.java PredecessorsList.java Date: Thu, 30 Jun 2011 18:37:13 -0000 To: commits@commons.apache.org From: simonetripodi@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110630183713.D43C4238890D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: simonetripodi Date: Thu Jun 30 18:37:13 2011 New Revision: 1141657 URL: http://svn.apache.org/viewvc?rev=1141657&view=rev Log: PredecessorsList field members made private, added public method to check if PredecessorsList is empty Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/FloydWarshall.java commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/PredecessorsList.java Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/FloydWarshall.java URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/FloydWarshall.java?rev=1141657&r1=1141656&r2=1141657&view=diff ============================================================================== --- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/FloydWarshall.java (original) +++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/FloydWarshall.java Thu Jun 30 18:37:13 2011 @@ -97,7 +97,7 @@ public final class FloydWarshall PredecessorsList predecessorsList = new PredecessorsList( graph ); pathReconstruction( predecessorsList, source, target, next, graph ); - if ( !predecessorsList.predecessors.isEmpty() ) + if ( !predecessorsList.isEmpty() ) { WeightedPath weightedPath = predecessorsList.buildPath( source, target ); if ( weightedPath.size() > 0 ) Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/PredecessorsList.java URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/PredecessorsList.java?rev=1141657&r1=1141656&r2=1141657&view=diff ============================================================================== --- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/PredecessorsList.java (original) +++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/PredecessorsList.java Thu Jun 30 18:37:13 2011 @@ -39,9 +39,9 @@ import org.apache.commons.graph.model.In final class PredecessorsList { - final Graph graph; + private final Graph graph; - final Map predecessors = new HashMap(); + private final Map predecessors = new HashMap(); public PredecessorsList(Graph graph ) { @@ -88,4 +88,14 @@ final class PredecessorsList