Skip to content

Commit

Permalink
OWB-1135 - Remove duplication for openwebbeans/Messages
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsoro committed Jul 3, 2017
1 parent f98d1df commit 2af210b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Expand Up @@ -18,6 +18,8 @@
*/
package org.apache.webbeans.logger;

import org.apache.webbeans.util.WebBeansConstants;

import java.util.Locale;
import java.util.ResourceBundle;
import java.util.logging.Logger;
Expand All @@ -27,12 +29,12 @@ public class JULLoggerFactory implements WebBeansLoggerFactory
@Override
public Logger getLogger(Class<?> clazz, Locale desiredLocale)
{
return Logger.getLogger(clazz.getName(), ResourceBundle.getBundle("openwebbeans/Messages", desiredLocale).toString());
return Logger.getLogger(clazz.getName(), ResourceBundle.getBundle(WebBeansConstants.WEB_BEANS_MESSAGES, desiredLocale).toString());
}

@Override
public Logger getLogger(Class<?> clazz)
{
return Logger.getLogger(clazz.getName(),"openwebbeans/Messages");
return Logger.getLogger(clazz.getName(),WebBeansConstants.WEB_BEANS_MESSAGES);
}
}
Expand Up @@ -23,6 +23,7 @@
*/

import org.apache.webbeans.config.OWBLogConst;
import org.apache.webbeans.util.WebBeansConstants;

import java.text.MessageFormat;
import java.util.Locale;
Expand All @@ -46,7 +47,7 @@ public final class WebBeansLoggerFacade

private static final WebBeansLoggerFactory FACTORY;

static final ResourceBundle WB_BUNDLE = ResourceBundle.getBundle("openwebbeans/Messages");
static final ResourceBundle WB_BUNDLE = ResourceBundle.getBundle(WebBeansConstants.WEB_BEANS_MESSAGES);

static
{
Expand Down
Expand Up @@ -55,5 +55,6 @@ private WebBeansConstants()

/**JNDI name of the {@link javax.enterprise.inject.spi.BeanManager} instance*/
public static final String WEB_BEANS_MANAGER_JNDI_NAME = "java:comp/BeanManager";
public final static String WEB_BEANS_MESSAGES = "openwebbeans/Messages";

}

0 comments on commit 2af210b

Please sign in to comment.