DaanHoogland commented on code in PR #11436:
URL: https://github.com/apache/cloudstack/pull/11436#discussion_r2607140476


##########
plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapManagerImpl.java:
##########
@@ -432,14 +430,18 @@ private LinkDomainToLdapResponse linkDomainToLdap(Long 
domainId, String type, St
         LinkType linkType = LdapManager.LinkType.valueOf(type.toUpperCase());
         LdapTrustMapVO vo = _ldapTrustMapDao.persist(new 
LdapTrustMapVO(domainId, linkType, name, accountType, 0));
         DomainVO domain = domainDao.findById(vo.getDomainId());
+        String domainUuid = getDomainUuid(domain, vo);
+        return new LinkDomainToLdapResponse(domainUuid, 
vo.getType().toString(), vo.getName(), vo.getAccountType().ordinal());
+    }
+
+    private String getDomainUuid(DomainVO domain, LdapTrustMapVO vo) {
         String domainUuid = "<unknown>";
         if (domain == null) {
-            logger.error("no domain in database for id " + vo.getDomainId());
+            logger.error("no domain in database for id {}", vo.getDomainId());

Review Comment:
   I think we need to no which domain is ill-configured, do we?
   
   ```suggestion
               logger.error(“No Domain in database for ID {}", 
vo.getDomainId());
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to