Author: sebb Date: Fri Mar 24 18:40:33 2017 New Revision: 1788523 URL: http://svn.apache.org/viewvc?rev=1788523&view=rev Log: (FindBugs) cheaper to scan for chars than Strings of length 1
Modified: commons/proper/net/trunk/src/main/java/examples/unix/finger.java commons/proper/net/trunk/src/main/java/examples/unix/fwhois.java Modified: commons/proper/net/trunk/src/main/java/examples/unix/finger.java URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/examples/unix/finger.java?rev=1788523&r1=1788522&r2=1788523&view=diff ============================================================================== --- commons/proper/net/trunk/src/main/java/examples/unix/finger.java (original) +++ commons/proper/net/trunk/src/main/java/examples/unix/finger.java Fri Mar 24 18:40:33 2017 @@ -93,7 +93,7 @@ public final class finger while (arg < args.length) { - index = args[arg].lastIndexOf("@"); + index = args[arg].lastIndexOf('@'); if (index == -1) { Modified: commons/proper/net/trunk/src/main/java/examples/unix/fwhois.java URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/examples/unix/fwhois.java?rev=1788523&r1=1788522&r2=1788523&view=diff ============================================================================== --- commons/proper/net/trunk/src/main/java/examples/unix/fwhois.java (original) +++ commons/proper/net/trunk/src/main/java/examples/unix/fwhois.java Fri Mar 24 18:40:33 2017 @@ -43,7 +43,7 @@ public final class fwhois System.exit(1); } - index = args[0].lastIndexOf("@"); + index = args[0].lastIndexOf('@'); whois = new WhoisClient(); // We want to timeout if a response takes longer than 60 seconds