melloware commented on code in PR #682:
URL: https://github.com/apache/myfaces/pull/682#discussion_r1530556713


##########
impl/src/main/java/org/apache/myfaces/cdi/util/CDIUtils.java:
##########
@@ -120,6 +135,17 @@ public static <T> T get(BeanManager beanManager, Type 
type, boolean create, Anno
         }
     }
 
+    private static String getBeanName(Bean<?> bean)
+    {
+        String name = bean.getName();
+        if (name != null)
+        {
+            return name;
+        }
+        String className = bean.getBeanClass().getSimpleName();
+        return Character.toLowerCase(className.charAt(0)) + 
className.substring(1);

Review Comment:
   It looks like BalusC does this in his CDIUtils for good reason I guess.  he 
does...
   
   ```java
           String className = bean.getBeanClass().getSimpleName();
   
           return new StringBuilder()
               .append(Character.toLowerCase(className.charAt(0)))
               .append(className.substring(1))
               .toString();
   ```



-- 
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