You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2013/01/04 23:36:24 UTC

git commit: Fix reflections cmd class loading in ApiServer

Updated Branches:
  refs/heads/api_refactoring 22e3454ae -> 0428b30a5


Fix reflections cmd class loading in ApiServer

Signed-off-by: Rohit Yadav <bh...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/0428b30a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/0428b30a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/0428b30a

Branch: refs/heads/api_refactoring
Commit: 0428b30a5a1cf079a2afac81aedc37dd2415de88
Parents: 22e3454
Author: Rohit Yadav <bh...@apache.org>
Authored: Fri Jan 4 14:35:05 2013 -0800
Committer: Rohit Yadav <bh...@apache.org>
Committed: Fri Jan 4 14:35:05 2013 -0800

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiServer.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0428b30a/server/src/com/cloud/api/ApiServer.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java
index b853094..223edcc 100755
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -201,14 +201,14 @@ public class ApiServer implements HttpRequestHandler {
         }
 
         // Populate api name and cmd class mappings
-        Reflections reflections = new Reflections("org.apache.cloudstack");
+        Reflections reflections = new Reflections("org.apache.cloudstack.api");
         Set<Class<?>> cmdClasses = reflections.getTypesAnnotatedWith(APICommand.class);
         reflections = new Reflections("com.cloud.api");
         cmdClasses.addAll(reflections.getTypesAnnotatedWith(APICommand.class));
         for(Class<?> cmdClass: cmdClasses) {
             String apiName = cmdClass.getAnnotation(APICommand.class).name();
             if (_apiNameCmdClassMap.containsKey(apiName)) {
-                s_logger.error("Cmd class " + cmdClass.getName() + " conflicts on apiname" + apiName);
+                s_logger.error("API Cmd class " + cmdClass.getName() + " has non-unique apiname" + apiName);
             }
             _apiNameCmdClassMap.put(apiName, cmdClass);
         }