Author: pete.muir(a)jboss.org
Date: 2010-06-16 14:10:04 -0400 (Wed, 16 Jun 2010)
New Revision: 6454
Modified:
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/session/ThemeManager.java
Log:
better
Modified:
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/session/ThemeManager.java
===================================================================
---
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/session/ThemeManager.java 2010-06-16
18:09:37 UTC (rev 6453)
+++
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/session/ThemeManager.java 2010-06-16
18:10:04 UTC (rev 6454)
@@ -25,7 +25,6 @@
import java.util.Collections;
import java.util.List;
-import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;
import javax.inject.Named;
@@ -35,22 +34,21 @@
{
// The supported themes
- private final List<String> THEMES = new ArrayList<String>();
+ private final List<String> themes;
- @SuppressWarnings("unused")
- @PostConstruct
- private void populateThemes()
+ public ThemeManager()
{
+ this.themes = new ArrayList<String>();
for (Theme theme : Theme.values())
{
- THEMES.add(theme.getName());
+ this.themes.add(theme.getName());
}
}
@Produces @Named
public List<String> getThemes()
{
- return Collections.unmodifiableList(THEMES);
+ return Collections.unmodifiableList(themes);
}
}
Show replies by date