You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wink.apache.org by ro...@apache.org on 2010/02/25 21:40:36 UTC
svn commit: r916441 - in /incubator/wink/trunk:
wink-common/src/main/resources/org/apache/wink/common/internal/i18n/resource.properties
wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRegistry.java
Author: rott
Date: Thu Feb 25 20:40:36 2010
New Revision: 916441
URL: http://svn.apache.org/viewvc?rev=916441&view=rev
Log:
externalize strings for logging
Modified:
incubator/wink/trunk/wink-common/src/main/resources/org/apache/wink/common/internal/i18n/resource.properties
incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRegistry.java
Modified: incubator/wink/trunk/wink-common/src/main/resources/org/apache/wink/common/internal/i18n/resource.properties
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/resources/org/apache/wink/common/internal/i18n/resource.properties?rev=916441&r1=916440&r2=916441&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/resources/org/apache/wink/common/internal/i18n/resource.properties (original)
+++ incubator/wink/trunk/wink-common/src/main/resources/org/apache/wink/common/internal/i18n/resource.properties Thu Feb 25 20:40:36 2010
@@ -117,6 +117,8 @@
webDAVNoEditOrSelfLink=The resource {} has set no edit or self link
noMethodInClassSupportsHTTPMethod=Could not find any method in class {} that supports {}
+noMethodInClassConsumesHTTPMethod=Could not find any method in class {} that consumes {}
+noMethodInClassProducesHTTPMethod=Could not find any method in class {} capable of producing {}
# Client Handler
clientIssueRequest=Issuing client {} method request to URI at {} with {} entity class and {} headers
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRegistry.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRegistry.java?rev=916441&r1=916440&r2=916441&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRegistry.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRegistry.java Thu Feb 25 20:40:36 2010
@@ -435,7 +435,7 @@
}
}
if (methodRecords.size() == 0) {
- logger.info("Could not find any method in class {} that consumes {}", resource
+ logger.info(Messages.getMessage("noMethodInClassConsumesHTTPMethod"), resource
.getResourceClass().getName(), context.getHttpHeaders().getMediaType());
throw new WebApplicationException(Response.Status.UNSUPPORTED_MEDIA_TYPE);
}
@@ -449,7 +449,7 @@
}
}
if (methodRecords.size() == 0) {
- logger.info("Could not find any method in class {} capable of producing {}", resource
+ logger.info(Messages.getMessage("noMethodInClassProducesHTTPMethod"), resource
.getResourceClass().getName(), context.getHttpHeaders()
.getRequestHeader(HttpHeaders.ACCEPT));
throw new WebApplicationException(Response.Status.NOT_ACCEPTABLE);