You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2012/08/04 01:07:20 UTC
svn commit: r1369246 - in /openwebbeans/trunk:
webbeans-ee/src/main/java/org/apache/webbeans/ee/event/
webbeans-impl/src/main/java/org/apache/webbeans/config/
webbeans-impl/src/main/java/org/apache/webbeans/util/
webbeans-test/cditest/src/main/java/org...
Author: struberg
Date: Fri Aug 3 23:07:20 2012
New Revision: 1369246
URL: http://svn.apache.org/viewvc?rev=1369246&view=rev
Log:
OWB-691 add private ct for utility classes
Modified:
openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/event/TransactionalEventNotifier.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OWBLogConst.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/PropertyLoader.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/InjectionExceptionUtils.java
openwebbeans/trunk/webbeans-test/cditest/src/main/java/org/apache/webbeans/cditest/CdiTestContainerLoader.java
Modified: openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/event/TransactionalEventNotifier.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/event/TransactionalEventNotifier.java?rev=1369246&r1=1369245&r2=1369246&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/event/TransactionalEventNotifier.java (original)
+++ openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/event/TransactionalEventNotifier.java Fri Aug 3 23:07:20 2012
@@ -37,14 +37,17 @@ public class TransactionalEventNotifier
{
private static final Logger logger = WebBeansLoggerFacade.getLogger(TransactionalEventNotifier.class);
- public TransactionalEventNotifier()
+ private TransactionalEventNotifier()
{
-
+ // utility class ct
}
-
+
+ /**
+ * This will get called by the EJB integration code
+ */
public static void registerTransactionSynchronization(TransactionPhase phase, ObserverMethod<? super Object> observer, Object event) throws Exception
{
- TransactionService transactionService = WebBeansContext.getInstance().getService(TransactionService.class);
+ TransactionService transactionService = WebBeansContext.currentInstance().getService(TransactionService.class);
Transaction transaction = null;
if(transactionService != null)
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OWBLogConst.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OWBLogConst.java?rev=1369246&r1=1369245&r2=1369246&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OWBLogConst.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OWBLogConst.java Fri Aug 3 23:07:20 2012
@@ -24,13 +24,13 @@ package org.apache.webbeans.config;
public class OWBLogConst
{
- public static final String DEFAULT_MSGS_PROPERTIES_NAME = "javax.openwebbeans.Messages";
+ private OWBLogConst()
+ {
+ // utility class doesn't have a public ct
+ }
- public static final String TEXT_CONFIG_NOT_FOUND = "TEXT_CONFIG_NOT_FOUND"; // Config properties [{0}] not found. Using default settings.
- public static final String TEXT_CONFIG_FOUND = "TEXT_CONFIG_FOUND"; // Config properties [{0}] found at location \: [{1}]. Overriding default settings.
- public static final String TEXT_MB_IMPL = "TEXT_MB_IMPL"; // Managed Bean implementation class :
+ public static final String TEXT_MB_IMPL = "TEXT_MB_IMPL"; // Managed Bean implementation class :
public static final String TEXT_SAME_SCOPE = "TEXT_SAME_SCOPE"; // stereotypes must declare the same @Scope annotations.
- public static final String TEXT_JAVA_TYPENAME = "TEXT_JAVA_TYPENAME"; // Java type with name \:
public static final String INFO_0001 = "INFO_0001"; // OpenWebBeans Container has started, it took {0} ms.
public static final String INFO_0002 = "INFO_0002"; // OpenWebBeans Container has stopped for context path,
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/PropertyLoader.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/PropertyLoader.java?rev=1369246&r1=1369245&r2=1369246&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/PropertyLoader.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/PropertyLoader.java Fri Aug 3 23:07:20 2012
@@ -49,6 +49,11 @@ public class PropertyLoader
private static final Logger logger = WebBeansLoggerFacade.getLogger(PropertyLoader.class);
+ private PropertyLoader()
+ {
+ // utility class doesn't have a public ct
+ }
+
/**
* <p>Look for all property files with the given name (e.g. 'myconfig.properties') in
* the classpath. Then load all properties files and sort them by their ascending
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/InjectionExceptionUtils.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/InjectionExceptionUtils.java?rev=1369246&r1=1369245&r2=1369246&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/InjectionExceptionUtils.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/InjectionExceptionUtils.java Fri Aug 3 23:07:20 2012
@@ -33,6 +33,11 @@ import java.lang.reflect.Type;
public class InjectionExceptionUtils
{
+ private InjectionExceptionUtils()
+ {
+ // utility class ct
+ }
+
public static void throwUnproxyableResolutionException(ViolationMessageBuilder violationMessage)
{
throw new UnproxyableResolutionException(
Modified: openwebbeans/trunk/webbeans-test/cditest/src/main/java/org/apache/webbeans/cditest/CdiTestContainerLoader.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-test/cditest/src/main/java/org/apache/webbeans/cditest/CdiTestContainerLoader.java?rev=1369246&r1=1369245&r2=1369246&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-test/cditest/src/main/java/org/apache/webbeans/cditest/CdiTestContainerLoader.java (original)
+++ openwebbeans/trunk/webbeans-test/cditest/src/main/java/org/apache/webbeans/cditest/CdiTestContainerLoader.java Fri Aug 3 23:07:20 2012
@@ -29,9 +29,12 @@ import java.util.ServiceLoader;
*/
public class CdiTestContainerLoader
{
+ private CdiTestContainerLoader()
+ {
+ // utility class doesn't have a public ct
+ }
-
- public static CdiTestContainer getCdiContainer()
+ public static CdiTestContainer getCdiContainer()
{
CdiTestContainer testContainer = null;