bernardodemarco commented on PR #10338:
URL: https://github.com/apache/cloudstack/pull/10338#issuecomment-2640363165

   > If it was impossible to execute the query before without `id`, I am 
alright with it. Otherwise this is a backwards incompatibility.
   
   @DaanHoogland, yes, previously, it was impossible to execute the API without 
an `id`.
   
   When the API's service layer method is executed, the flow tries to retrieve 
the account with the specified `id` from the DB:
   
https://github.com/apache/cloudstack/blob/2ef16132ee92a51bed093c602a706446bd4cd88c/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java#L8074-L8076
   
   However, the `getAccount` method expects the `accountId` parameter as the 
`long` primitive: 
   
https://github.com/apache/cloudstack/blob/2ef16132ee92a51bed093c602a706446bd4cd88c/server/src/main/java/com/cloud/user/AccountManagerImpl.java#L2488-L2491
   
   Therefore, when the method is executed specifying `null` as argument, a NPE 
is thrown. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to