From droids-commits-return-564-apmail-incubator-droids-commits-archive=incubator.apache.org@incubator.apache.org Wed Apr 3 08:03:38 2013 Return-Path: X-Original-To: apmail-incubator-droids-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-droids-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 7E4ECF9E5 for ; Wed, 3 Apr 2013 08:03:38 +0000 (UTC) Received: (qmail 91842 invoked by uid 500); 3 Apr 2013 08:03:38 -0000 Delivered-To: apmail-incubator-droids-commits-archive@incubator.apache.org Received: (qmail 91789 invoked by uid 500); 3 Apr 2013 08:03:37 -0000 Mailing-List: contact droids-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: droids-dev@incubator.apache.org Delivered-To: mailing list droids-commits@incubator.apache.org Received: (qmail 91770 invoked by uid 99); 3 Apr 2013 08:03:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Apr 2013 08:03: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; Wed, 03 Apr 2013 08:03:34 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 74E2D23889D5; Wed, 3 Apr 2013 08:03:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1463868 - in /incubator/droids/branches/0.2.x-cleanup/droids-norobots/src: main/java/org/apache/droids/norobots/NoRobotClient.java test/java/org/apache/droids/norobots/TestNorobotsClient.java Date: Wed, 03 Apr 2013 08:03:13 -0000 To: droids-commits@incubator.apache.org From: tobr@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130403080313.74E2D23889D5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tobr Date: Wed Apr 3 08:03:13 2013 New Revision: 1463868 URL: http://svn.apache.org/r1463868 Log: renamed misleading method name equals removed deprecated junit imports Modified: incubator/droids/branches/0.2.x-cleanup/droids-norobots/src/main/java/org/apache/droids/norobots/NoRobotClient.java incubator/droids/branches/0.2.x-cleanup/droids-norobots/src/test/java/org/apache/droids/norobots/TestNorobotsClient.java Modified: incubator/droids/branches/0.2.x-cleanup/droids-norobots/src/main/java/org/apache/droids/norobots/NoRobotClient.java URL: http://svn.apache.org/viewvc/incubator/droids/branches/0.2.x-cleanup/droids-norobots/src/main/java/org/apache/droids/norobots/NoRobotClient.java?rev=1463868&r1=1463867&r2=1463868&view=diff ============================================================================== --- incubator/droids/branches/0.2.x-cleanup/droids-norobots/src/main/java/org/apache/droids/norobots/NoRobotClient.java (original) +++ incubator/droids/branches/0.2.x-cleanup/droids-norobots/src/main/java/org/apache/droids/norobots/NoRobotClient.java Wed Apr 3 08:03:13 2013 @@ -91,7 +91,7 @@ public class NoRobotClient { * Note that the URL passed in is for the website and does * not include the robots.txt file itself. * - * @param baseUrl of the site + * @param baseUri of the site */ public void parse(URI baseUri) throws IOException, NoRobotException { URI uri = resolveURI(baseUri, "robots.txt"); @@ -207,7 +207,7 @@ public class NoRobotClient { * Note that parse(URL) must be called before this method * is called. * - * @param url in question + * @param uri in question * @return is the url allowed? * @throws IllegalStateException when parse has not been called */ @@ -216,9 +216,9 @@ public class NoRobotClient { throw new IllegalStateException("You must call parse before you call this method. "); } - if (!equals(baseURI.getHost(), uri.getHost()) || + if (!isEqual(baseURI.getHost(), uri.getHost()) || baseURI.getPort() != uri.getPort() || - !equals(baseURI.getScheme(), uri.getScheme())) { + !isEqual(baseURI.getScheme(), uri.getScheme())) { throw new IllegalArgumentException( "Illegal to use a different url, " + uri.toString() + ", for this robots.txt: " + baseURI.toString()); @@ -273,7 +273,7 @@ public class NoRobotClient { } } - private static boolean equals(final Object obj1, final Object obj2) { + private static boolean isEqual(final Object obj1, final Object obj2) { return obj1 == null ? obj2 == null : obj1.equals(obj2); } Modified: incubator/droids/branches/0.2.x-cleanup/droids-norobots/src/test/java/org/apache/droids/norobots/TestNorobotsClient.java URL: http://svn.apache.org/viewvc/incubator/droids/branches/0.2.x-cleanup/droids-norobots/src/test/java/org/apache/droids/norobots/TestNorobotsClient.java?rev=1463868&r1=1463867&r2=1463868&view=diff ============================================================================== --- incubator/droids/branches/0.2.x-cleanup/droids-norobots/src/test/java/org/apache/droids/norobots/TestNorobotsClient.java (original) +++ incubator/droids/branches/0.2.x-cleanup/droids-norobots/src/test/java/org/apache/droids/norobots/TestNorobotsClient.java Wed Apr 3 08:03:13 2013 @@ -23,8 +23,7 @@ import java.net.URI; import java.net.URISyntaxException; import java.util.Map; -import junit.framework.Assert; - +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test;