[weld-commits] Weld SVN: r5757 - in extensions/trunk/core/src/main/java/org/jboss/weld/extensions: util and 1 other directory.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Thu Feb 4 23:34:53 EST 2010


Author: swd847
Date: 2010-02-04 23:34:53 -0500 (Thu, 04 Feb 2010)
New Revision: 5757

Modified:
   extensions/trunk/core/src/main/java/org/jboss/weld/extensions/CoreExtension.java
   extensions/trunk/core/src/main/java/org/jboss/weld/extensions/util/BeanImpl.java
Log:
Removed String.isEmpty() calls to maintain java 5 compatibility



Modified: extensions/trunk/core/src/main/java/org/jboss/weld/extensions/CoreExtension.java
===================================================================
--- extensions/trunk/core/src/main/java/org/jboss/weld/extensions/CoreExtension.java	2010-02-05 00:06:39 UTC (rev 5756)
+++ extensions/trunk/core/src/main/java/org/jboss/weld/extensions/CoreExtension.java	2010-02-05 04:34:53 UTC (rev 5757)
@@ -148,7 +148,7 @@
    private String getPackageName(Package pkg)
    {
       String packageName = pkg.getAnnotation(Named.class).value();
-      if (packageName.isEmpty())
+      if (packageName.length() == 0)
       {
          packageName = pkg.getName();
       }
@@ -158,7 +158,7 @@
    private <X> String getName(Annotated annotated, String defaultName)
    {
       String beanName = annotated.getAnnotation(Named.class).value();
-      if (beanName.isEmpty())
+      if (beanName.length() == 0)
       {
          beanName = defaultName.substring(0, 1).toLowerCase() + defaultName.substring(1);
       }

Modified: extensions/trunk/core/src/main/java/org/jboss/weld/extensions/util/BeanImpl.java
===================================================================
--- extensions/trunk/core/src/main/java/org/jboss/weld/extensions/util/BeanImpl.java	2010-02-05 00:06:39 UTC (rev 5756)
+++ extensions/trunk/core/src/main/java/org/jboss/weld/extensions/util/BeanImpl.java	2010-02-05 04:34:53 UTC (rev 5757)
@@ -47,7 +47,7 @@
       {
          this.name = rtc.getAnnotation(Named.class).value();
          // no name defaulting for constructors
-         if (this.name.isEmpty())
+         if (this.name.length() == 0)
          {
             throw new RuntimeException();
          }



More information about the weld-commits mailing list