ApiServlet: Fix NPE while inserting to auditTrail

Signed-off-by: Rohit Yadav <rohit.ya...@shapeblue.com>


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

Branch: refs/heads/saml2
Commit: 4aad6266c7786374c4ebdb32dc674cf34a214a53
Parents: 9479a19
Author: Rohit Yadav <rohit.ya...@shapeblue.com>
Authored: Mon Aug 18 03:50:18 2014 +0200
Committer: Rohit Yadav <rohit.ya...@shapeblue.com>
Committed: Sat Aug 23 20:34:39 2014 +0200

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiServlet.java | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4aad6266/server/src/com/cloud/api/ApiServlet.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServlet.java 
b/server/src/com/cloud/api/ApiServlet.java
index 5484b1e..8dff6eb 100644
--- a/server/src/com/cloud/api/ApiServlet.java
+++ b/server/src/com/cloud/api/ApiServlet.java
@@ -201,9 +201,6 @@ public class ApiServlet extends HttpServlet {
                             } catch (final IllegalStateException ignored) {
                             }
                         }
-                    } else {
-                        auditTrailSb.insert(0, "(userId=" + 
session.getAttribute("userid") + " accountId=" + ((Account) 
session.getAttribute("accountobj")).getId() +
-                                " sessionId=" + session.getId() + ")");
                     }
                     HttpUtils.writeHttpResponse(resp, responseString, 
httpResponseCode, responseType);
                     return;

Reply via email to