Author: lindner
Date: Thu Feb 19 22:23:53 2009
New Revision: 746034
URL: http://svn.apache.org/viewvc?rev=746034&view=rev
Log:
avoid NPEs
Modified:
incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/protocol/DefaultHandlerRegistry.java
Modified:
incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/protocol/DefaultHandlerRegistry.java
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/protocol/DefaultHandlerRegistry.java?rev=746034&r1=746033&r2=746034&view=diff
==============================================================================
---
incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/protocol/DefaultHandlerRegistry.java
(original)
+++
incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/protocol/DefaultHandlerRegistry.java
Thu Feb 19 22:23:53 2009
@@ -112,10 +112,12 @@
Map<String, SortedSet<RestPath>> methods =
serviceMethodPathMap.get(pathParts[0]);
if (methods != null) {
SortedSet<RestPath> paths = methods.get(method);
- for (RestPath restPath : paths) {
- RestHandler handler = restPath.accept(pathParts);
- if (handler != null) {
- return handler;
+ if (paths != null) {
+ for (RestPath restPath : paths) {
+ RestHandler handler = restPath.accept(pathParts);
+ if (handler != null) {
+ return handler;
+ }
}
}
}