diff --git a/README.md b/README.md index c5286ea1..c031089d 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Testing with Arquillian In order to test with Arquillian, one class needs to be added to 'JavaArchive' in order for this to load properly. Add 'SqlSessionManagerRegistry.class'. -See attachment on https://github.com/mybatis/cdi/issues/86 from 2021-12-30 ArqullianMybatisExample.zip [here](https://github.com/mybatis/cdi/files/7795050/ArquillianMybatisExample.zip) +See attachment on https://github.com/mybatis/cdi/issues/86 from 2021-12-30 ArquillianMybatisExample.zip [here](https://github.com/mybatis/cdi/files/7795050/ArquillianMybatisExample.zip). This is to be run under jdk 8 to be error free but will run as-is under jdk 11 with an invocation error which still allows it to run. Further updates are needed to get this code example current. Essentials ---------- diff --git a/src/main/java/org/mybatis/cdi/MyBatisBean.java b/src/main/java/org/mybatis/cdi/MyBatisBean.java index 39c6fae3..9c066db2 100644 --- a/src/main/java/org/mybatis/cdi/MyBatisBean.java +++ b/src/main/java/org/mybatis/cdi/MyBatisBean.java @@ -39,7 +39,7 @@ * * @author Frank D. Martinez [mnesarco] */ -public class MyBatisBean implements Bean, Serializable, PassivationCapable { +public class MyBatisBean implements Bean, Serializable, PassivationCapable { private static final long serialVersionUID = 1L; @@ -124,17 +124,17 @@ public Set getInjectionPoints() { } @Override - public Object create(CreationalContext creationalContext) { + public Object create(CreationalContext creationalContext) { if (SqlSession.class.equals(this.type)) { return findSqlSessionManager(creationalContext); } ErrorContext.instance().reset(); return Proxy.newProxyInstance(SqlSessionFactory.class.getClassLoader(), new Class[] { this.type }, - new SerializableMapperProxy(this, creationalContext)); + new SerializableMapperProxy(this, creationalContext)); } @Override - public void destroy(Object instance, CreationalContext creationalContext) { + public void destroy(Object instance, CreationalContext creationalContext) { creationalContext.release(); } diff --git a/src/test/java/org/mybatis/cdi/MybatisExtensionTest.java b/src/test/java/org/mybatis/cdi/MybatisExtensionTest.java index 31058589..dca8285b 100644 --- a/src/test/java/org/mybatis/cdi/MybatisExtensionTest.java +++ b/src/test/java/org/mybatis/cdi/MybatisExtensionTest.java @@ -53,7 +53,7 @@ void mappersFoundAfterTheBeanUsingTheMapperInAnInjectionPointHasBeenScannedShoul AfterBeanDiscovery afterBeanDiscovery = mock(AfterBeanDiscovery.class); extension.afterBeanDiscovery(afterBeanDiscovery); - verify(afterBeanDiscovery).addBean((Bean) any()); + verify(afterBeanDiscovery).addBean((Bean) any()); }