incubator-droids-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
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 GMT
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;
 



Mime
View raw message