[webbeans-commits] Webbeans SVN: r2643 - in tck/trunk/impl/src/main: resources/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-05-03 08:18:01 -0400 (Sun, 03 May 2009)
New Revision: 2643
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/Order.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/TestBindingType.java
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/foo/
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/JavaEePkgTest.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/beans.xml
Log:
Simplified directory tree and marked test broken since parser's own bean validation does not locate the constructor on the bean.
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/JavaEePkgTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/JavaEePkgTest.java 2009-05-02 06:04:03 UTC (rev 2642)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/JavaEePkgTest.java 2009-05-03 12:18:01 UTC (rev 2643)
@@ -13,14 +13,12 @@
import javax.inject.manager.Manager;
import javax.interceptor.InvocationContext;
import javax.persistence.EntityManager;
-import javax.sql.CommonDataSource;
+import javax.sql.DataSource;
import javax.xml.ws.Binding;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.jsr299.tck.tests.xml.namespace.javaee.pkg.foo.Order;
-import org.jboss.jsr299.tck.tests.xml.namespace.javaee.pkg.foo.TestBindingType;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.Classes;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
@@ -35,7 +33,7 @@
private static final Annotation[] bindings = {TEST_BINDING_TYPE};
- @Test
+ @Test(groups = { "broken", "xml" })
@SpecAssertions({
@SpecAssertion(section="9.2.1", id="a")
})
@@ -64,7 +62,7 @@
Class<?> clazz = Order.class;
try
{
- assert clazz.getDeclaredConstructor(Integer.class, Date.class, CommonDataSource.class, InvocationContext.class, Event.class,
+ assert clazz.getDeclaredConstructor(Integer.class, Date.class, DataSource.class, InvocationContext.class, Event.class,
TimerHandle.class, EntityManager.class, Binding.class) != null;
}
catch (SecurityException e)
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/Order.java (from rev 2642, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/foo/Order.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/Order.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/Order.java 2009-05-03 12:18:01 UTC (rev 2643)
@@ -0,0 +1,42 @@
+package org.jboss.jsr299.tck.tests.xml.namespace.javaee.pkg;
+
+import java.util.Date;
+
+import javax.context.RequestScoped;
+import javax.ejb.TimerHandle;
+import javax.event.Event;
+import javax.interceptor.InvocationContext;
+import javax.persistence.EntityManager;
+import javax.sql.DataSource;
+import javax.xml.ws.Binding;
+
+@RequestScoped
+@TestBindingType
+class Order
+{
+ private final Integer integer;
+
+ private final Date date;
+
+ public Order()
+ {
+ this(0, new Date(), null, null, null, null, null, null);
+ }
+
+ public Order(Integer integer, Date date, DataSource source, InvocationContext invocation, Event<String> e, TimerHandle schedule,
+ EntityManager entityManager, Binding binding)
+ {
+ this.integer = integer;
+ this.date = date;
+ }
+
+ public Integer getInteger()
+ {
+ return integer;
+ }
+
+ public Date getDate()
+ {
+ return date;
+ }
+}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/TestBindingType.java (from rev 2642, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/foo/TestBindingType.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/TestBindingType.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/TestBindingType.java 2009-05-03 12:18:01 UTC (rev 2643)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.xml.namespace.javaee.pkg;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface TestBindingType
+{
+
+}
Modified: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/beans.xml 2009-05-02 06:04:03 UTC (rev 2642)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/xml/namespace/javaee/pkg/beans.xml 2009-05-03 12:18:01 UTC (rev 2643)
@@ -1,5 +1,5 @@
<Beans xmlns="urn:java:ee"
- xmlns:test="urn:java:org.jboss.jsr299.tck.tests.xml.namespace.javaee.pkg.foo">
+ xmlns:test="urn:java:org.jboss.jsr299.tck.tests.xml.namespace.javaee.pkg">
<test:TestBindingType>
<BindingType />
15 years, 7 months
[webbeans-commits] Webbeans SVN: r2642 - in ri/trunk/logging/src: test/java/org/jboss/webbeans/test/log and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-02 02:04:03 -0400 (Sat, 02 May 2009)
New Revision: 2642
Modified:
ri/trunk/logging/src/main/java/org/jboss/webbeans/log/LogImpl.java
ri/trunk/logging/src/test/java/org/jboss/webbeans/test/log/LoggingTest.java
Log:
don't barf on a null value, complete with test
Modified: ri/trunk/logging/src/main/java/org/jboss/webbeans/log/LogImpl.java
===================================================================
--- ri/trunk/logging/src/main/java/org/jboss/webbeans/log/LogImpl.java 2009-05-01 19:50:09 UTC (rev 2641)
+++ ri/trunk/logging/src/main/java/org/jboss/webbeans/log/LogImpl.java 2009-05-02 06:04:03 UTC (rev 2642)
@@ -176,7 +176,7 @@
{
for (int i = 0; i < params.length; i++)
{
- if (params[i].getClass().isArray())
+ if (params[i] != null && params[i].getClass().isArray())
{
params[i] = Arrays.asList((Object[]) params[i]);
}
Modified: ri/trunk/logging/src/test/java/org/jboss/webbeans/test/log/LoggingTest.java
===================================================================
--- ri/trunk/logging/src/test/java/org/jboss/webbeans/test/log/LoggingTest.java 2009-05-01 19:50:09 UTC (rev 2641)
+++ ri/trunk/logging/src/test/java/org/jboss/webbeans/test/log/LoggingTest.java 2009-05-02 06:04:03 UTC (rev 2642)
@@ -56,6 +56,18 @@
assert TestAppender.getLastEvent() != null : "There was no last event in Log4j";
assert TestAppender.getLastEvent().getRenderedMessage().equals("Message with 3 parameters starting with param1 and including param2");
}
+
+ @Test
+ public void testLogMessageFormattingWithNullValue()
+ {
+ Log log = Logging.getLog(LoggingTest.class);
+ assert log != null : "No Log object returned";
+
+ String value = null;
+ log.info("Verify we do not barf on a {0} value", value);
+ assert TestAppender.getLastEvent() != null : "There was no last event in Log4j";
+ assert TestAppender.getLastEvent().getRenderedMessage().equals("Verify we do not barf on a null value");
+ }
@Test
public void testArrayConversion()
15 years, 7 months
[webbeans-commits] Webbeans SVN: r2641 - extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-01 15:50:09 -0400 (Fri, 01 May 2009)
New Revision: 2641
Modified:
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/SEWebBeanDiscovery.java
Log:
WBX-38
Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/SEWebBeanDiscovery.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/SEWebBeanDiscovery.java 2009-05-01 06:49:05 UTC (rev 2640)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/SEWebBeanDiscovery.java 2009-05-01 19:50:09 UTC (rev 2641)
@@ -68,7 +68,7 @@
private void scan()
{
Scanner scanner = new URLScanner(Reflections.getClassLoader(), this);
- scanner.scanResources(new String[] { "beans.xml" });
+ scanner.scanResources(new String[] { "/META-INF/beans.xml" });
}
}
15 years, 7 months
[webbeans-commits] Webbeans SVN: r2640 - extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/servlet/discovery.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-01 02:49:05 -0400 (Fri, 01 May 2009)
New Revision: 2640
Modified:
extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/servlet/discovery/ServletWebBeanDiscovery.java
Log:
WBX-38
Modified: extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/servlet/discovery/ServletWebBeanDiscovery.java
===================================================================
--- extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/servlet/discovery/ServletWebBeanDiscovery.java 2009-05-01 01:56:45 UTC (rev 2639)
+++ extensions/trunk/servlet/int/src/main/java/org/jboss/webbeans/environment/servlet/discovery/ServletWebBeanDiscovery.java 2009-05-01 06:49:05 UTC (rev 2640)
@@ -75,7 +75,7 @@
private void scan()
{
Scanner scanner = new URLScanner(Reflections.getClassLoader(), this);
- scanner.scanResources(new String[] { "beans.xml" });
+ scanner.scanResources(new String[] { "/META-INF/beans.xml" });
try
{
URL beans = servletContext.getResource("/WEB-INF/beans.xml");
15 years, 7 months
[webbeans-commits] Webbeans SVN: r2639 - extensions/trunk/logger/src/main/java/org/jboss/webbeans/log.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-30 21:56:45 -0400 (Thu, 30 Apr 2009)
New Revision: 2639
Modified:
extensions/trunk/logger/src/main/java/org/jboss/webbeans/log/LoggerProducer.java
Log:
don't isEmpty() as it ties us to Java 6
Modified: extensions/trunk/logger/src/main/java/org/jboss/webbeans/log/LoggerProducer.java
===================================================================
--- extensions/trunk/logger/src/main/java/org/jboss/webbeans/log/LoggerProducer.java 2009-04-30 19:34:00 UTC (rev 2638)
+++ extensions/trunk/logger/src/main/java/org/jboss/webbeans/log/LoggerProducer.java 2009-05-01 01:56:45 UTC (rev 2639)
@@ -41,7 +41,7 @@
Log log = null;
String category = null;
category = injectionPoint.getAnnotation(Logger.class).value();
- if (category.isEmpty())
+ if (category.length() == 0)
{
log = Logging.getLog((Class<?>) injectionPoint.getMember().getDeclaringClass());
}
15 years, 7 months