Author: sebb
Date: Thu Mar 27 15:10:44 2014
New Revision: 1582339

URL: http://svn.apache.org/r1582339
Log:
Use numeric formatting for fields that are expected to be numbers; explicit 
boxing

Modified:
    
commons/proper/proxy/trunk/core/src/main/java/org/apache/commons/proxy2/impl/MethodSignature.java

Modified: 
commons/proper/proxy/trunk/core/src/main/java/org/apache/commons/proxy2/impl/MethodSignature.java
URL: 
http://svn.apache.org/viewvc/commons/proper/proxy/trunk/core/src/main/java/org/apache/commons/proxy2/impl/MethodSignature.java?rev=1582339&r1=1582338&r2=1582339&view=diff
==============================================================================
--- 
commons/proper/proxy/trunk/core/src/main/java/org/apache/commons/proxy2/impl/MethodSignature.java
 (original)
+++ 
commons/proper/proxy/trunk/core/src/main/java/org/apache/commons/proxy2/impl/MethodSignature.java
 Thu Mar 27 15:10:44 2014
@@ -169,15 +169,17 @@ public class MethodSignature implements 
             pos.next();
             final int type = pos.getIndex();
             final int semi = internal.indexOf(';', type);
-            Validate.isTrue(semi > 0, "Type at index %s of method signature 
\"%s\" not terminated by semicolon", here,
-                    internal);
+            Validate.isTrue(semi > 0, "Type at index %d of method signature 
\"%s\" not terminated by semicolon",
+                    Integer.valueOf(here), internal);
             final String className = internal.substring(type, 
semi).replace('/', '.');
-            Validate.notBlank(className, "Invalid classname at position %s of 
method signature \"%s\"", type, internal);
+            Validate.notBlank(className, "Invalid classname at position %d of 
method signature \"%s\"",
+                    Integer.valueOf(type), internal);
             pos.setIndex(semi + 1);
             return Class.forName(className);
         default:
             throw new IllegalArgumentException(String.format(
-                    "Unexpected character at index %s of method signature 
\"%s\"", here, internal));
+                    "Unexpected character at index %d of method signature 
\"%s\"",
+                    Integer.valueOf(here), internal));
         }
     }
 
@@ -258,7 +260,7 @@ public class MethodSignature implements 
     @Override
     public int hashCode()
     {
-        return new HashCodeBuilder().append(internal).build();
+        return new HashCodeBuilder().append(internal).build().intValue();
     }
 
     /**


Reply via email to