incubator-wink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r949516 - in /incubator/wink/trunk: wink-common/src/main/java/org/apache/wink/common/internal/lifecycle/ wink-common/src/main/java/org/apache/wink/common/internal/registry/ wink-common/src/main/java/org/apache/wink/common/internal/registry/...
Date Sun, 30 May 2010 13:21:50 GMT
Author: bluk
Date: Sun May 30 13:21:49 2010
New Revision: 949516

URL: http://svn.apache.org/viewvc?rev=949516&view=rev
Log:
Remove unnecessary String.valueOf() calls

THanks to Jason Dillon for the suggestion.

Modified:
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/lifecycle/PrototypeObjectFactory.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/registry/ProvidersRegistry.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/registry/metadata/ClassMetadata.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/uritemplate/UriTemplateMatcher.java
    incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/GuiceInjectorLifeCycleManager.java
    incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/SearchResult.java
    incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/ServerMessageContext.java
    incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceInstance.java
    incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRecord.java

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/lifecycle/PrototypeObjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/lifecycle/PrototypeObjectFactory.java?rev=949516&r1=949515&r2=949516&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/lifecycle/PrototypeObjectFactory.java
(original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/lifecycle/PrototypeObjectFactory.java
Sun May 30 13:21:49 2010
@@ -52,6 +52,6 @@ class PrototypeObjectFactory<T> implemen
 
     @Override
     public String toString() {
-        return String.format("ClassMetadataPrototypeOF %s", String.valueOf(metadata)); //$NON-NLS-1$
+        return String.format("ClassMetadataPrototypeOF %s", metadata); //$NON-NLS-1$
     }
 }

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/registry/ProvidersRegistry.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/registry/ProvidersRegistry.java?rev=949516&r1=949515&r2=949516&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/registry/ProvidersRegistry.java
(original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/registry/ProvidersRegistry.java
Sun May 30 13:21:49 2010
@@ -883,7 +883,7 @@ public class ProvidersRegistry {
 
         @Override
         public String toString() {
-            return String.format("Priority: %f, ObjectFactory: %s", priority, String.valueOf(of));
//$NON-NLS-1$
+            return String.format("Priority: %f, ObjectFactory: %s", priority, of); //$NON-NLS-1$
         }
     }
 

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/registry/metadata/ClassMetadata.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/registry/metadata/ClassMetadata.java?rev=949516&r1=949515&r2=949516&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/registry/metadata/ClassMetadata.java
(original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/registry/metadata/ClassMetadata.java
Sun May 30 13:21:49 2010
@@ -147,7 +147,7 @@ public class ClassMetadata extends Abstr
 
     @Override
     public String toString() {
-        return String.format("Class: %s", String.valueOf(resourceClass)); //$NON-NLS-1$
+        return String.format("Class: %s", resourceClass); //$NON-NLS-1$
     }
 
 }

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/uritemplate/UriTemplateMatcher.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/uritemplate/UriTemplateMatcher.java?rev=949516&r1=949515&r2=949516&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/uritemplate/UriTemplateMatcher.java
(original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/uritemplate/UriTemplateMatcher.java
Sun May 30 13:21:49 2010
@@ -45,8 +45,11 @@ public class UriTemplateMatcher {
 
     @Override
     public String toString() {
-        return String.format("Parent: %s; URI: %s; Matcher: %s; Matches: %b", String //$NON-NLS-1$
-            .valueOf(parent), uri, String.valueOf(matcher), matches);
+        return String.format("Parent: %s; URI: %s; Matcher: %s; Matches: %b", //$NON-NLS-1$
+                             parent,
+                             uri,
+                             matcher,
+                             matches);
     }
 
     /* package */UriTemplateMatcher(UriTemplateProcessor parent) {

Modified: incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/GuiceInjectorLifeCycleManager.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/GuiceInjectorLifeCycleManager.java?rev=949516&r1=949515&r2=949516&view=diff
==============================================================================
--- incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/GuiceInjectorLifeCycleManager.java
(original)
+++ incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/GuiceInjectorLifeCycleManager.java
Sun May 30 13:21:49 2010
@@ -72,8 +72,7 @@ public class GuiceInjectorLifeCycleManag
         if (ResourceMetadataCollector.isDynamicResource(clazz)) {
             // default factory cannot create instance of DynamicResource
             throw new IllegalArgumentException(String
-                .format("Cannot create default factory for DynamicResource: %s", String
-                    .valueOf(clazz)));
+                .format("Cannot create default factory for DynamicResource: %s", clazz));
         }
 
         if (ProviderMetadataCollector.isProvider(clazz)) {
@@ -88,7 +87,7 @@ public class GuiceInjectorLifeCycleManag
 
         // unknown object, should never reach this code
         throw new IllegalArgumentException(String
-            .format("Cannot create default factory for class: %s", String.valueOf(clazz)));
+            .format("Cannot create default factory for class: %s", clazz));
     }
 
     private static class GuiceSingletonObjectFactory<T> implements ObjectFactory<T>
{

Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/SearchResult.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/SearchResult.java?rev=949516&r1=949515&r2=949516&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/SearchResult.java
(original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/SearchResult.java
Sun May 30 13:21:49 2010
@@ -212,9 +212,11 @@ public class SearchResult {
 
     @Override
     public String toString() {
-        return String.format("Found: %s, Resource: %s, Method: %s, Error: %s", String //$NON-NLS-1$
-            .valueOf(found), String.valueOf(resource), String.valueOf(method), String
-            .valueOf(error));
+        return String.format("Found: %s, Resource: %s, Method: %s, Error: %s", //$NON-NLS-1$
+                             found,
+                             resource,
+                             method,
+                             error);
     }
 
     public SearchResult(ResourceInstance resource, UriInfo uriInfo) {

Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/ServerMessageContext.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/ServerMessageContext.java?rev=949516&r1=949515&r2=949516&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/ServerMessageContext.java
(original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/ServerMessageContext.java
Sun May 30 13:21:49 2010
@@ -167,9 +167,9 @@ public class ServerMessageContext extend
     @Override
     public String toString() {
         return String.format("Method: %s, Path: %s, MediaType: %s", //$NON-NLS-1$
-                             String.valueOf(getHttpMethod()),
-                             String.valueOf(getUriInfo().getPath(false)),
-                             String.valueOf(getHttpHeaders().getMediaType()));
+                             getHttpMethod(),
+                             getUriInfo().getPath(false),
+                             getHttpHeaders().getMediaType());
     }
 
     // Contexts methods

Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceInstance.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceInstance.java?rev=949516&r1=949515&r2=949516&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceInstance.java
(original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceInstance.java
Sun May 30 13:21:49 2010
@@ -94,8 +94,8 @@ public class ResourceInstance {
     @Override
     public String toString() {
         return String.format("ResourceRecord: %s; UriTemplateMatcher: %s", //$NON-NLS-1$
-                             String.valueOf(record),
-                             String.valueOf(matcher));
+                             record,
+                             matcher);
     }
 
     public Class<?> getResourceClass() {

Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRecord.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRecord.java?rev=949516&r1=949515&r2=949516&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRecord.java
(original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRecord.java
Sun May 30 13:21:49 2010
@@ -163,8 +163,8 @@ public class ResourceRecord extends Temp
 
     @Override
     public String toString() {
-        return String.format("Path: %s; ClassMetadata: %s", super.toString(), String //$NON-NLS-1$
-            .valueOf(metadata));
+        return String.format("Path: %s; ClassMetadata: %s", super.toString(), //$NON-NLS-1$
+                             metadata);
     }
 
     @Override



Mime
View raw message