You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2013/11/15 18:11:10 UTC
svn commit: r1542331 [17/28] - in /myfaces/tobago/trunk:
tobago-core/src/main/java/org/apache/myfaces/tobago/ajax/
tobago-core/src/main/java/org/apache/myfaces/tobago/application/
tobago-core/src/main/java/org/apache/myfaces/tobago/compat/ tobago-core/...
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java Fri Nov 15 17:10:58 2013
@@ -49,14 +49,14 @@ public class ClientConfigController {
// theme
- FacesContext facesContext = FacesContext.getCurrentInstance();
- TobagoConfig tobagoConfig = TobagoConfig.getInstance(facesContext);
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final TobagoConfig tobagoConfig = TobagoConfig.getInstance(facesContext);
- List<Theme> themes = new ArrayList<Theme>(tobagoConfig.getSupportedThemes());
+ final List<Theme> themes = new ArrayList<Theme>(tobagoConfig.getSupportedThemes());
themes.add(0, tobagoConfig.getDefaultTheme());
themeItems = new SelectItem[themes.size()];
for (int i = 0; i < themeItems.length; i++) {
- Theme themeItem = themes.get(i);
+ final Theme themeItem = themes.get(i);
themeItems[i] = new SelectItem(themeItem, themeItem.getDisplayName());
}
@@ -73,13 +73,13 @@ public class ClientConfigController {
if (LOG.isDebugEnabled()) {
LOG.debug("invoke!!!");
}
- FacesContext facesContext = FacesContext.getCurrentInstance();
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
storeInClientProperties();
for (int i = 0; i < ClientConfigPhaseListener.BEAN_NAMES.length; i++) {
- String beanName = ClientConfigPhaseListener.BEAN_NAMES[i];
- ClientConfigController controller
+ final String beanName = ClientConfigPhaseListener.BEAN_NAMES[i];
+ final ClientConfigController controller
= getCurrentInstance(facesContext, beanName);
if (controller != null) {
controller.setLocale(locale);
@@ -92,7 +92,7 @@ public class ClientConfigController {
// ///////////////////////////////////////////// logic
public void storeInClientProperties() {
- ClientProperties client
+ final ClientProperties client
= VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());
client.setDebugMode(debugMode);
@@ -100,7 +100,7 @@ public class ClientConfigController {
}
public void loadFromClientProperties() {
- ClientProperties client
+ final ClientProperties client
= VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());
debugMode = client.isDebugMode();
@@ -108,15 +108,15 @@ public class ClientConfigController {
}
public List<SelectItem> getLocaleItems() {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- Application application = facesContext.getApplication();
- Locale defaultLocale = application.getDefaultLocale();
- Iterator supportedLocales = application.getSupportedLocales();
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final Application application = facesContext.getApplication();
+ final Locale defaultLocale = application.getDefaultLocale();
+ final Iterator supportedLocales = application.getSupportedLocales();
boolean defaultInList = false;
- List<SelectItem> localeItems = new ArrayList<SelectItem>();
+ final List<SelectItem> localeItems = new ArrayList<SelectItem>();
while (supportedLocales.hasNext()) {
- Locale locale = (Locale) supportedLocales.next();
+ final Locale locale = (Locale) supportedLocales.next();
localeItems.add(createLocaleItem(locale));
if (locale.equals(defaultLocale)) {
defaultInList = true;
@@ -131,7 +131,7 @@ public class ClientConfigController {
return localeItems;
}
- private SelectItem createLocaleItem(Locale localeItem) {
+ private SelectItem createLocaleItem(final Locale localeItem) {
if (locale != null) {
return new SelectItem(localeItem, localeItem.getDisplayName(locale));
} else {
@@ -140,7 +140,7 @@ public class ClientConfigController {
}
public static ClientConfigController getCurrentInstance(
- FacesContext facesContext, String beanName) {
+ final FacesContext facesContext, final String beanName) {
return (ClientConfigController) facesContext.getApplication()
.getVariableResolver().resolveVariable(facesContext, beanName);
}
@@ -149,7 +149,7 @@ public class ClientConfigController {
return debugMode;
}
- public void setDebugMode(boolean debugMode) {
+ public void setDebugMode(final boolean debugMode) {
this.debugMode = debugMode;
}
@@ -159,7 +159,7 @@ public class ClientConfigController {
public String getLocalizedTheme() {
for (int i = 0; i < themeItems.length; i++) {
- SelectItem themeItem = themeItems[i];
+ final SelectItem themeItem = themeItems[i];
if (themeItem.getValue().equals(theme)) {
return themeItem.getLabel();
}
@@ -167,7 +167,7 @@ public class ClientConfigController {
return "???";
}
- public void setTheme(Theme theme) {
+ public void setTheme(final Theme theme) {
this.theme = theme;
}
@@ -175,7 +175,7 @@ public class ClientConfigController {
return themeItems;
}
- public void setThemeItems(SelectItem[] themeItems) {
+ public void setThemeItems(final SelectItem[] themeItems) {
this.themeItems = themeItems;
}
@@ -191,7 +191,7 @@ public class ClientConfigController {
}
}
- public void setLocale(Locale locale) {
+ public void setLocale(final Locale locale) {
this.locale = locale;
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigPhaseListener.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigPhaseListener.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigPhaseListener.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigPhaseListener.java Fri Nov 15 17:10:58 2013
@@ -29,14 +29,14 @@ public class ClientConfigPhaseListener i
public static final String[] BEAN_NAMES
= {"clientConfigController", "clientConfigController2"};
- public void afterPhase(PhaseEvent event) {
+ public void afterPhase(final PhaseEvent event) {
}
- public void beforePhase(PhaseEvent event) {
- FacesContext facesContext = FacesContext.getCurrentInstance();
+ public void beforePhase(final PhaseEvent event) {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
for (int i = 0; i < BEAN_NAMES.length; i++) {
- String beanName = BEAN_NAMES[i];
- ClientConfigController controller = ClientConfigController
+ final String beanName = BEAN_NAMES[i];
+ final ClientConfigController controller = ClientConfigController
.getCurrentInstance(facesContext, beanName);
if (controller != null) {
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ThemeConfigViewController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ThemeConfigViewController.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ThemeConfigViewController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ThemeConfigViewController.java Fri Nov 15 17:10:58 2013
@@ -122,7 +122,7 @@ public class ThemeConfigViewController {
}
private void init() {
- String[] themes;
+ final String[] themes;
if (themeNames != null) {
themes = themeNames;
} else {
@@ -131,15 +131,15 @@ public class ThemeConfigViewController {
final Set<String> names = new HashSet<String>();
for (int j = 0; j < DEFAULT_THEMES.length; j++) {
- Properties properties = new Properties();
- String file = PROPERTY_FILE_PREFIX + themes[j] + PROPERTY_FILE_POSTFIX;
+ final Properties properties = new Properties();
+ final String file = PROPERTY_FILE_PREFIX + themes[j] + PROPERTY_FILE_POSTFIX;
InputStream inputStream = null;
try {
final ExternalContext externalContext
= FacesContext.getCurrentInstance().getExternalContext();
inputStream = externalContext.getResourceAsStream(file);
properties.load(inputStream);
- } catch (Exception e) {
+ } catch (final Exception e) {
if (LOG.isDebugEnabled()) {
LOG.debug("Exception when loading file \"" + file + "\"");
}
@@ -147,8 +147,8 @@ public class ThemeConfigViewController {
IOUtils.closeQuietly(inputStream);
}
- for (Iterator i = properties.keySet().iterator(); i.hasNext();) {
- String name = (String) i.next();
+ for (final Iterator i = properties.keySet().iterator(); i.hasNext();) {
+ final String name = (String) i.next();
if (name.indexOf('.') != -1) {
names.add(name.substring(name.indexOf('.') + 1));
if (LOG.isDebugEnabled()) {
@@ -166,12 +166,13 @@ public class ThemeConfigViewController {
final FacesContext facesContext = FacesContext.getCurrentInstance();
component.setRendererType(rendererType);
- ArrayList<KeyValue> found = new ArrayList<KeyValue>();
- for (String propertyName : propertyNames) {
+ final ArrayList<KeyValue> found = new ArrayList<KeyValue>();
+ for (final String propertyName : propertyNames) {
try {
- Measure measure = ResourceManagerUtils.getThemeMeasure(facesContext, (LayoutBase) component, propertyName);
+ final Measure measure
+ = ResourceManagerUtils.getThemeMeasure(facesContext, (LayoutBase) component, propertyName);
found.add(new DefaultKeyValue(propertyName, measure.toString()));
- } catch (Exception e) {
+ } catch (final Exception e) {
if (LOG.isDebugEnabled()) {
LOG.debug("No value found for \"" + propertyName
+ "\" in \"" + rendererType + "\"");
@@ -185,7 +186,7 @@ public class ThemeConfigViewController {
public String changeTheme() {
final FacesContext facesContext = FacesContext.getCurrentInstance();
- ClientConfigController controller = (ClientConfigController)
+ final ClientConfigController controller = (ClientConfigController)
facesContext.getExternalContext().getSessionMap().get("clientConfigController");
controller.submit();
@@ -200,7 +201,7 @@ public class ThemeConfigViewController {
} else {
renderer = DEFAULT_RENDERER_TYPES;
}
- SelectItem[] items = new SelectItem[renderer.length];
+ final SelectItem[] items = new SelectItem[renderer.length];
for (int i = 0; i < items.length; i++) {
items[i] = new SelectItem(renderer[i]);
}
@@ -213,7 +214,7 @@ public class ThemeConfigViewController {
return themeNames;
}
- public void setThemeNames(String[] themeNames) {
+ public void setThemeNames(final String[] themeNames) {
this.themeNames = themeNames;
init();
}
@@ -233,7 +234,7 @@ public class ThemeConfigViewController {
return rendererTypes;
}
- public void setRendererTypes(String[] rendererTypes) {
+ public void setRendererTypes(final String[] rendererTypes) {
this.rendererTypes = rendererTypes;
selectItems = null;
}
@@ -242,7 +243,7 @@ public class ThemeConfigViewController {
return rendererType;
}
- public void setRendererType(String rendererType) {
+ public void setRendererType(final String rendererType) {
this.rendererType = rendererType;
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/Activity.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/Activity.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/Activity.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/Activity.java Fri Nov 15 17:10:58 2013
@@ -33,7 +33,7 @@ public class Activity implements Seriali
private int ajaxRequest;
- public Activity(HttpSession session) {
+ public Activity(final HttpSession session) {
this.sessionId = session.getId();
this.creationDate = new Date(session.getCreationTime());
}
@@ -50,7 +50,7 @@ public class Activity implements Seriali
return sessionId;
}
- public void setSessionId(String sessionId) {
+ public void setSessionId(final String sessionId) {
this.sessionId = sessionId;
}
@@ -58,7 +58,7 @@ public class Activity implements Seriali
return creationDate;
}
- public void setCreationDate(Date creationDate) {
+ public void setCreationDate(final Date creationDate) {
this.creationDate = creationDate;
}
@@ -66,7 +66,7 @@ public class Activity implements Seriali
return jsfRequest;
}
- public void setJsfRequest(int jsfRequest) {
+ public void setJsfRequest(final int jsfRequest) {
this.jsfRequest = jsfRequest;
}
@@ -74,7 +74,7 @@ public class Activity implements Seriali
return ajaxRequest;
}
- public void setAjaxRequest(int ajaxRequest) {
+ public void setAjaxRequest(final int ajaxRequest) {
this.ajaxRequest = ajaxRequest;
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivityList.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivityList.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivityList.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivityList.java Fri Nov 15 17:10:58 2013
@@ -41,28 +41,28 @@ public class ActivityList implements Ser
// XXX the session id while the login process.
private Map<String, Activity> data = new ConcurrentHashMap<String, Activity>();
- public void add(Activity activity) {
+ public void add(final Activity activity) {
LOG.info("Adding session id: " + activity.getSessionId());
data.put(activity.getSessionId(), activity);
}
- public void remove(String sessionId) {
+ public void remove(final String sessionId) {
LOG.info("Removing session id: " + sessionId);
data.remove(sessionId);
}
public List<Activity> getValues() {
final Collection<Activity> values = data.values();
- ArrayList<Activity> result = new ArrayList<Activity>();
+ final ArrayList<Activity> result = new ArrayList<Activity>();
result.addAll(values);
return result;
}
- public void executeJsfRequest(String sessionId) {
+ public void executeJsfRequest(final String sessionId) {
data.get(sessionId).executeJsfRequest();
}
- public void executeAjaxRequest(String sessionId) {
+ public void executeAjaxRequest(final String sessionId) {
data.get(sessionId).executeAjaxRequest();
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivityPhaseListener.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivityPhaseListener.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivityPhaseListener.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivityPhaseListener.java Fri Nov 15 17:10:58 2013
@@ -40,9 +40,9 @@ public class ActivityPhaseListener imple
public ActivityPhaseListener() {
}
- public void beforePhase(PhaseEvent event) {
+ public void beforePhase(final PhaseEvent event) {
final FacesContext facesContext = event.getFacesContext();
- String sessionId = ((HttpSession) facesContext.getExternalContext().getSession(true)).getId();
+ final String sessionId = ((HttpSession) facesContext.getExternalContext().getSession(true)).getId();
if (AjaxUtils.isAjaxRequest(facesContext)) {
activityList.executeAjaxRequest(sessionId);
@@ -51,7 +51,7 @@ public class ActivityPhaseListener imple
}
}
- public void afterPhase(PhaseEvent event) {
+ public void afterPhase(final PhaseEvent event) {
}
public PhaseId getPhaseId() {
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivitySessionListener.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivitySessionListener.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivitySessionListener.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivitySessionListener.java Fri Nov 15 17:10:58 2013
@@ -27,14 +27,14 @@ import javax.servlet.http.HttpSessionLis
public class ActivitySessionListener implements HttpSessionListener {
- public void sessionCreated(HttpSessionEvent event) {
+ public void sessionCreated(final HttpSessionEvent event) {
final HttpSession session = event.getSession();
final ActivityList activityList = BeanManagerProvider.getInstance().getContextualReference(ActivityList.class);
activityList.add(new Activity(session));
}
- public void sessionDestroyed(HttpSessionEvent event) {
+ public void sessionDestroyed(final HttpSessionEvent event) {
final HttpSession session = event.getSession();
final ActivityList activityList = BeanManagerProvider.getInstance().getContextualReference(ActivityList.class);
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/AbstractConverter.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/AbstractConverter.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/AbstractConverter.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/AbstractConverter.java Fri Nov 15 17:10:58 2013
@@ -53,39 +53,39 @@ public abstract class AbstractConverter
if (pattern == null) {
try {
pattern = initPattern();
- } catch (MalformedPatternException e) {
+ } catch (final MalformedPatternException e) {
LOG.error("", e);
}
}
return pattern;
}
- private String getFragment(String data, int start, int end) {
+ private String getFragment(final String data, final int start, final int end) {
return data.substring(start, end);
}
- protected String convertMisc(String data, int start, int end) {
+ protected String convertMisc(final String data, final int start, final int end) {
return convertMisc(getFragment(data, start, end));
}
- protected String convertMatch(String data, int start, int end) {
+ protected String convertMatch(final String data, final int start, final int end) {
return convertMatch(getFragment(data, start, end));
}
- public String convertMisc(String fragment) {
+ public String convertMisc(final String fragment) {
return fragment;
}
- public String convert(String input) {
- StringBuilder buffer = new StringBuilder();
+ public String convert(final String input) {
+ final StringBuilder buffer = new StringBuilder();
int lastStart = 0;
- PatternMatcherInput patternMatcherInput = new PatternMatcherInput(input);
- Pattern pattern = getPattern();
+ final PatternMatcherInput patternMatcherInput = new PatternMatcherInput(input);
+ final Pattern pattern = getPattern();
if (matcher.contains(patternMatcherInput, pattern)) {
do {
- MatchResult result = matcher.getMatch();
- int start = result.beginOffset(0);
- int end = result.endOffset(0);
+ final MatchResult result = matcher.getMatch();
+ final int start = result.beginOffset(0);
+ final int end = result.endOffset(0);
buffer.append(convertMisc(input, lastStart, start));
buffer.append(convertMatch(input, start, end));
lastStart = end;
@@ -95,7 +95,7 @@ public abstract class AbstractConverter
return buffer.toString();
}
- public String highlightStrings(String input) {
+ public String highlightStrings(final String input) {
return util.substitute("s/(\".*?\")/<span class=\"string\">$1<\\/span>/g", input);
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/JspFormatter.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/JspFormatter.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/JspFormatter.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/JspFormatter.java Fri Nov 15 17:10:58 2013
@@ -31,13 +31,13 @@ import java.io.Reader;
public class JspFormatter {
- public static void main(String[] args) throws Exception {
+ public static void main(final String[] args) throws Exception {
writeJsp(new FileReader(args[0]), new PrintWriter(System.out));
}
- public static void writeJsp(String filename, JspWriter out)
+ public static void writeJsp(final String filename, final JspWriter out)
throws IOException {
- InputStream in
+ final InputStream in
= JspFormatter.class.getClassLoader().getResourceAsStream(filename);
if (in == null) {
throw new FileNotFoundException(
@@ -46,10 +46,10 @@ public class JspFormatter {
writeJsp(new InputStreamReader(in), new PrintWriter(out));
}
- public static void writeJsp(Reader reader, PrintWriter out)
+ public static void writeJsp(final Reader reader, final PrintWriter out)
throws IOException {
- JspTagConverter formatter = new JspTagConverter();
- String source = readJsp(reader);
+ final JspTagConverter formatter = new JspTagConverter();
+ final String source = readJsp(reader);
out.println("<html><head>");
// out.println("<link rel=\"stylesheet\" href=\"jsp.css\" type=\"text/css\">");
out.println("<style>");
@@ -69,9 +69,9 @@ public class JspFormatter {
out.flush();
}
- private static String readJsp(Reader reader) throws IOException {
- LineNumberReader in = new LineNumberReader(reader);
- StringBuilder buffer = new StringBuilder();
+ private static String readJsp(final Reader reader) throws IOException {
+ final LineNumberReader in = new LineNumberReader(reader);
+ final StringBuilder buffer = new StringBuilder();
String line = null;
while (null != (line = in.readLine())) {
buffer.append(line);
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/JspTagConverter.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/JspTagConverter.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/JspTagConverter.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/JspTagConverter.java Fri Nov 15 17:10:58 2013
@@ -41,7 +41,7 @@ public class JspTagConverter extends Abs
return getCompiler().compile("(?s)(<%--.*?--%>)|(<%.*?%>)");
}
- public String highlightJavaKeyword(String java) {
+ public String highlightJavaKeyword(final String java) {
return getUtil().substitute("s/(\\bassert\\b|break\\b|\\bbyte\\b|\\bboolean\\b"
+ "|\\bcatch\\b|\\bcase\\b|\\bchar\\b|\\bcontinue\\b|\\bdouble\\b"
+ "|\\bdo\\b|\\belse\\b|\\bextends\\b|\\bfalse\\b|\\bfinal\\b"
@@ -54,8 +54,8 @@ public class JspTagConverter extends Abs
+ "/<span class=\"keyword\">$1<\\/span>/g", java);
}
- public String convertMatch(String fragment) {
- String key = "tag" + tags.size();;
+ public String convertMatch(final String fragment) {
+ final String key = "tag" + tags.size();;
String tag = XmlUtils.escape(fragment, false);
if (fragment.startsWith("<%--")) {
tag = "<span class=\"jsp-comment\">" + tag + "</span>";
@@ -81,11 +81,11 @@ public class JspTagConverter extends Abs
return "${" + key + "}";
}
- public String convert(String input) {
+ public String convert(final String input) {
String result; // = StringUtils.replace(input, "$", "$$");
result = super.convert(input);
result = tagConverter.convert(result);
- StringExpression stringExpression = new StringExpression(result);
+ final StringExpression stringExpression = new StringExpression(result);
return stringExpression.substitute(tags);
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/StringExpression.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/StringExpression.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/StringExpression.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/StringExpression.java Fri Nov 15 17:10:58 2013
@@ -35,7 +35,7 @@ public class StringExpression implements
private String string;
- public StringExpression(String string) {
+ public StringExpression(final String string) {
this.string = string;
}
@@ -43,28 +43,28 @@ public class StringExpression implements
return string;
}
- public String substitute(Map<String, String> variables) {
+ public String substitute(final Map<String, String> variables) {
return replaceVariables(string, variables);
}
// implementation copied from ant.ProjectHelper
private static String replaceVariables(
- String stringExpression, Map<String, String> variables) {
+ final String stringExpression, final Map<String, String> variables) {
if (stringExpression == null) {
return null;
}
- Vector<String> fragments = new Vector<String>();
- Vector<String> propertyRefs = new Vector<String>();
+ final Vector<String> fragments = new Vector<String>();
+ final Vector<String> propertyRefs = new Vector<String>();
parsePropertyString(stringExpression, fragments, propertyRefs);
- StringBuilder sb = new StringBuilder();
- Enumeration<String> i = fragments.elements();
- Enumeration<String> j = propertyRefs.elements();
+ final StringBuilder sb = new StringBuilder();
+ final Enumeration<String> i = fragments.elements();
+ final Enumeration<String> j = propertyRefs.elements();
while (i.hasMoreElements()) {
String fragment = i.nextElement();
if (fragment == null) {
- String propertyName = j.nextElement();
+ final String propertyName = j.nextElement();
if (!variables.containsKey(propertyName)) {
// throw exception ?
LOG.error("Property ${" + propertyName + "} has not been set");
@@ -79,7 +79,7 @@ public class StringExpression implements
}
private static void parsePropertyString(
- String value, Vector<String> fragments, Vector<String> propertyRefs) {
+ final String value, final Vector<String> fragments, final Vector<String> propertyRefs) {
int prev = 0;
int pos;
while ((pos = value.indexOf("$", prev)) >= 0) {
@@ -93,11 +93,11 @@ public class StringExpression implements
fragments.addElement(value.substring(pos + 1, pos + 2));
prev = pos + 2;
} else {
- int endName = value.indexOf('}', pos);
+ final int endName = value.indexOf('}', pos);
if (endName < 0) {
throw new IllegalArgumentException("Syntax error in property: " + value);
}
- String propertyName = value.substring(pos + 2, endName);
+ final String propertyName = value.substring(pos + 2, endName);
fragments.addElement(null);
propertyRefs.addElement(propertyName);
prev = endName + 1;
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/TagConverter.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/TagConverter.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/TagConverter.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/TagConverter.java Fri Nov 15 17:10:58 2013
@@ -28,10 +28,10 @@ public class TagConverter extends Abstra
return getCompiler().compile("(?s)<.*?>");
}
- public String convertMatch(String fragment) {
+ public String convertMatch(final String fragment) {
// String escaped = XmlUtils.escape(fragment);
- String withLinks = getUtil().substitute("s/^<jsp:include page=\\\"([\\-\\.\\/\\w]+)"
+ final String withLinks = getUtil().substitute("s/^<jsp:include page=\\\"([\\-\\.\\/\\w]+)"
+ "/<jsp:include page=\\\"<a href='viewSource.jsp?jsp=$1'>$1<\\/a>/", fragment);
String escaped = getUtil().substitute("s/^(<\\/?)(\\w+):/$1<b>$2<\\/b>:/", withLinks);
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java Fri Nov 15 17:10:58 2013
@@ -117,7 +117,7 @@ public class OverviewController implemen
multiValue = new Salutation[0];
treeTabsState = 0;
sheetConfig = new SheetConfig();
- String[] toolbarIconKeys
+ final String[] toolbarIconKeys
= {UIToolBar.ICON_OFF, UIToolBar.ICON_SMALL, UIToolBar.ICON_BIG};
toolbarIconItems = new SelectItem[toolbarIconKeys.length];
for (int i = 0; i < toolbarIconKeys.length; i++) {
@@ -125,7 +125,7 @@ public class OverviewController implemen
}
toolbarIconSize = UIToolBar.ICON_SMALL;
- String[] toolbarTextKeys =
+ final String[] toolbarTextKeys =
{UIToolBar.LABEL_OFF, UIToolBar.LABEL_BOTTOM, UIToolBar.LABEL_RIGHT};
toolbarTextItems = new SelectItem[toolbarTextKeys.length];
for (int i = 0; i < toolbarTextKeys.length; i++) {
@@ -134,9 +134,9 @@ public class OverviewController implemen
toolbarTextPosition = UIToolBar.LABEL_BOTTOM;
}
- private static SelectItem[] getSalutationSelectItems(String bundle) {
- Salutation[] salutations = Salutation.values();
- SelectItem[] items = new SelectItem[salutations.length];
+ private static SelectItem[] getSalutationSelectItems(final String bundle) {
+ final Salutation[] salutations = Salutation.values();
+ final SelectItem[] items = new SelectItem[salutations.length];
for (int i = 0; i < items.length; i++) {
String label = ResourceManagerUtils.getProperty(
FacesContext.getCurrentInstance(), bundle, salutations[i].getKey());
@@ -151,8 +151,8 @@ public class OverviewController implemen
return items;
}
- private static SelectItem[] getSelectItems(String[] keys, String bundle) {
- SelectItem[] items = new SelectItem[keys.length];
+ private static SelectItem[] getSelectItems(final String[] keys, final String bundle) {
+ final SelectItem[] items = new SelectItem[keys.length];
for (int i = 0; i < items.length; i++) {
String label = ResourceManagerUtils.getProperty(
FacesContext.getCurrentInstance(), bundle, keys[i]);
@@ -167,12 +167,12 @@ public class OverviewController implemen
return items;
}
- public void click(ActionEvent actionEvent) {
+ public void click(final ActionEvent actionEvent) {
LOG.info("click the action listener");
lastAction = actionEvent.getComponent().getId();
}
- public void resetColumnWidths(ActionEvent event) {
+ public void resetColumnWidths(final ActionEvent event) {
final UISheet sheet = (UISheet) event.getComponent().findComponent("sheet");
if (sheet != null) {
sheet.resetColumnWidths();
@@ -181,43 +181,43 @@ public class OverviewController implemen
}
}
- public void sheetSorter(ActionEvent event) {
+ public void sheetSorter(final ActionEvent event) {
if (event instanceof SortActionEvent) {
- SortActionEvent sortEvent = (SortActionEvent) event;
- UISheet sheet = (UISheet) sortEvent.getComponent();
- SheetState sheetState
+ final SortActionEvent sortEvent = (SortActionEvent) event;
+ final UISheet sheet = (UISheet) sortEvent.getComponent();
+ final SheetState sheetState
= sheet.getSheetState(FacesContext.getCurrentInstance());
- String columnId = sheetState.getSortedColumnId();
- List<SolarObject> list = (List<SolarObject>) sheet.getValue();
- SolarObject sun = list.remove(0);
+ final String columnId = sheetState.getSortedColumnId();
+ final List<SolarObject> list = (List<SolarObject>) sheet.getValue();
+ final SolarObject sun = list.remove(0);
Comparator<SolarObject> comparator = null;
if ("name".equals(columnId)) {
comparator = new Comparator<SolarObject>() {
- public int compare(SolarObject o1, SolarObject o2) {
+ public int compare(final SolarObject o1, final SolarObject o2) {
return o1.getName().compareToIgnoreCase(o2.getName());
}
};
} else if ("orbit".equals(columnId)) {
comparator = new Comparator<SolarObject>() {
- public int compare(SolarObject o1, SolarObject o2) {
+ public int compare(final SolarObject o1, final SolarObject o2) {
return o1.getOrbit().compareToIgnoreCase(o2.getOrbit());
}
};
} else if ("population".equals(columnId)) {
comparator = new Comparator<SolarObject>() {
- public int compare(SolarObject o1, SolarObject o2) {
+ public int compare(final SolarObject o1, final SolarObject o2) {
Integer i1 = -1;
try {
i1 = new Integer(o1.getPopulation().replaceAll("\\D", "").trim());
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
// ignore
}
Integer i2 = -1;
try {
i2 = new Integer(o2.getPopulation().replaceAll("\\D", "").trim());
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
// ignore
}
return i1.compareTo(i2);
@@ -225,13 +225,13 @@ public class OverviewController implemen
};
} else if ("distance".equals(columnId)) {
comparator = new Comparator<SolarObject>() {
- public int compare(SolarObject o1, SolarObject o2) {
+ public int compare(final SolarObject o1, final SolarObject o2) {
return o1.getDistance().compareTo(o2.getDistance());
}
};
} else if ("period".equals(columnId)) {
comparator = new Comparator<SolarObject>() {
- public int compare(SolarObject o1, SolarObject o2) {
+ public int compare(final SolarObject o1, final SolarObject o2) {
return o1.getPeriod().compareTo(o2.getPeriod());
}
};
@@ -251,7 +251,8 @@ public class OverviewController implemen
return null;
}
- public void customValidator(FacesContext context, UIComponent component, Object value) throws ValidatorException {
+ public void customValidator(final FacesContext context, final UIComponent component, final Object value)
+ throws ValidatorException {
if (value == null) {
return;
}
@@ -289,7 +290,7 @@ public class OverviewController implemen
return radioValue;
}
- public void setRadioValue(Salutation radioValue) {
+ public void setRadioValue(final Salutation radioValue) {
this.radioValue = radioValue;
}
@@ -297,7 +298,7 @@ public class OverviewController implemen
return singleValue;
}
- public void setSingleValue(Salutation singleValue) {
+ public void setSingleValue(final Salutation singleValue) {
this.singleValue = singleValue;
}
@@ -305,7 +306,7 @@ public class OverviewController implemen
return multiValue;
}
- public void setMultiValue(Salutation[] multiValue) {
+ public void setMultiValue(final Salutation[] multiValue) {
this.multiValue = multiValue;
}
@@ -313,7 +314,7 @@ public class OverviewController implemen
return basicDate;
}
- public void setBasicDate(Date basicDate) {
+ public void setBasicDate(final Date basicDate) {
this.basicDate = basicDate;
}
@@ -321,7 +322,7 @@ public class OverviewController implemen
return basicTime;
}
- public void setBasicTime(Date basicTime) {
+ public void setBasicTime(final Date basicTime) {
this.basicTime = basicTime;
}
@@ -329,7 +330,7 @@ public class OverviewController implemen
return treeSelectMode;
}
- public void setTreeSelectMode(String treeSelectMode) {
+ public void setTreeSelectMode(final String treeSelectMode) {
this.treeSelectMode = treeSelectMode;
}
@@ -337,7 +338,7 @@ public class OverviewController implemen
return treeListboxSelectMode;
}
- public void setTreeListboxSelectMode(String treeListboxSelectMode) {
+ public void setTreeListboxSelectMode(final String treeListboxSelectMode) {
this.treeListboxSelectMode = treeListboxSelectMode;
}
@@ -345,7 +346,7 @@ public class OverviewController implemen
return basicInput;
}
- public void setBasicInput(String basicInput) {
+ public void setBasicInput(final String basicInput) {
this.basicInput = basicInput;
}
@@ -353,7 +354,7 @@ public class OverviewController implemen
return suggestInput;
}
- public void setSuggestInput(String suggestInput) {
+ public void setSuggestInput(final String suggestInput) {
this.suggestInput = suggestInput;
}
@@ -361,7 +362,7 @@ public class OverviewController implemen
return placeholder;
}
- public void setPlaceholder(String placeholder) {
+ public void setPlaceholder(final String placeholder) {
this.placeholder = placeholder;
}
@@ -369,7 +370,7 @@ public class OverviewController implemen
return basicArea;
}
- public void setBasicArea(String basicArea) {
+ public void setBasicArea(final String basicArea) {
this.basicArea = basicArea;
}
@@ -381,7 +382,7 @@ public class OverviewController implemen
return treeTabsState;
}
- public void setTreeTabsState(Integer treeTabsState) {
+ public void setTreeTabsState(final Integer treeTabsState) {
this.treeTabsState = treeTabsState;
}
@@ -389,7 +390,7 @@ public class OverviewController implemen
return sheetConfig;
}
- public void setSheetConfig(SheetConfig sheetConfig) {
+ public void setSheetConfig(final SheetConfig sheetConfig) {
this.sheetConfig = sheetConfig;
}
@@ -397,7 +398,7 @@ public class OverviewController implemen
return toolbarIconSize;
}
- public void setToolbarIconSize(String toolbarIconSize) {
+ public void setToolbarIconSize(final String toolbarIconSize) {
this.toolbarIconSize = toolbarIconSize;
}
@@ -405,7 +406,7 @@ public class OverviewController implemen
return toolbarIconItems;
}
- public void setToolbarIconItems(SelectItem[] toolbarIconItems) {
+ public void setToolbarIconItems(final SelectItem[] toolbarIconItems) {
this.toolbarIconItems = toolbarIconItems;
}
@@ -413,7 +414,7 @@ public class OverviewController implemen
return toolbarTextPosition;
}
- public void setToolbarTextPosition(String toolbarTextPosition) {
+ public void setToolbarTextPosition(final String toolbarTextPosition) {
this.toolbarTextPosition = toolbarTextPosition;
}
@@ -421,15 +422,15 @@ public class OverviewController implemen
return toolbarTextItems;
}
- public void setToolbarTextItems(SelectItem[] toolbarTextItems) {
+ public void setToolbarTextItems(final SelectItem[] toolbarTextItems) {
this.toolbarTextItems = toolbarTextItems;
}
- public List<String> getInputSuggestItems(UIInput component) {
- String prefix = (String) component.getSubmittedValue();
+ public List<String> getInputSuggestItems(final UIInput component) {
+ final String prefix = (String) component.getSubmittedValue();
LOG.info("Creating items for prefix: '" + prefix + "'");
- List<String> result = new ArrayList<String>();
- for (String name : LocaleList.COUNTRY_LANGUAGE) {
+ final List<String> result = new ArrayList<String>();
+ for (final String name : LocaleList.COUNTRY_LANGUAGE) {
if (StringUtils.startsWithIgnoreCase(name, prefix)) {
result.add(name);
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/SheetConfig.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/SheetConfig.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/SheetConfig.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/SheetConfig.java Fri Nov 15 17:10:58 2013
@@ -71,8 +71,8 @@ public class SheetConfig {
return null;
}
- private SelectItem[] createSheetItems(Object[] values) {
- SelectItem[] items = new SelectItem[values.length];
+ private SelectItem[] createSheetItems(final Object[] values) {
+ final SelectItem[] items = new SelectItem[values.length];
for (int i = 0; i < values.length; i++) {
items[i] = new SelectItem(values[i], values[i].toString());
@@ -85,7 +85,7 @@ public class SheetConfig {
return sheetShowHeader;
}
- public void setSheetShowHeader(boolean sheetShowHeader) {
+ public void setSheetShowHeader(final boolean sheetShowHeader) {
this.sheetShowHeader = sheetShowHeader;
}
@@ -93,7 +93,7 @@ public class SheetConfig {
return showPagingAlways;
}
- public void setShowPagingAlways(boolean showPagingAlways) {
+ public void setShowPagingAlways(final boolean showPagingAlways) {
this.showPagingAlways = showPagingAlways;
}
@@ -105,16 +105,16 @@ public class SheetConfig {
return sheetRows;
}
- public void setSheetRows(int sheetRows) {
+ public void setSheetRows(final int sheetRows) {
this.sheetRows = sheetRows;
}
public int getSheetFirstValue() {
- int value = getSheetFirst();
+ final int value = getSheetFirst();
return (value - 1) < 0 ? 0 : value - 1;
}
- public void setSheetFirst(int sheetFirst) {
+ public void setSheetFirst(final int sheetFirst) {
this.sheetFirst = sheetFirst;
}
@@ -122,7 +122,7 @@ public class SheetConfig {
return sheetConfigPopup;
}
- public void setSheetConfigPopup(boolean sheetConfigPopup) {
+ public void setSheetConfigPopup(final boolean sheetConfigPopup) {
this.sheetConfigPopup = sheetConfigPopup;
}
@@ -130,7 +130,7 @@ public class SheetConfig {
return sheetDirectLinkCount;
}
- public void setSheetDirectLinkCount(int sheetDirectLinkCount) {
+ public void setSheetDirectLinkCount(final int sheetDirectLinkCount) {
this.sheetDirectLinkCount = sheetDirectLinkCount;
}
@@ -142,7 +142,7 @@ public class SheetConfig {
return sheetRowPagingPosition;
}
- public void setSheetRowPagingPosition(String sheetRowPagingPosition) {
+ public void setSheetRowPagingPosition(final String sheetRowPagingPosition) {
this.sheetRowPagingPosition = sheetRowPagingPosition;
}
@@ -150,7 +150,7 @@ public class SheetConfig {
return sheetDirectPagingPosition;
}
- public void setSheetDirectPagingPosition(String sheetDirectPagingPosition) {
+ public void setSheetDirectPagingPosition(final String sheetDirectPagingPosition) {
this.sheetDirectPagingPosition = sheetDirectPagingPosition;
}
@@ -158,7 +158,7 @@ public class SheetConfig {
return sheetPagePagingPosition;
}
- public void setSheetPagePagingPosition(String sheetPagePagingPosition) {
+ public void setSheetPagePagingPosition(final String sheetPagePagingPosition) {
this.sheetPagePagingPosition = sheetPagePagingPosition;
}
@@ -170,7 +170,7 @@ public class SheetConfig {
return sheetSelectableItems;
}
- public void setSheetSelectableItems(SelectItem[] sheetSelectableItems) {
+ public void setSheetSelectableItems(final SelectItem[] sheetSelectableItems) {
this.sheetSelectableItems = sheetSelectableItems;
}
@@ -178,7 +178,7 @@ public class SheetConfig {
return selectable;
}
- public void setSelectable(String selectable) {
+ public void setSelectable(final String selectable) {
this.selectable = selectable;
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/ValidationSeverity.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/ValidationSeverity.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/ValidationSeverity.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/ValidationSeverity.java Fri Nov 15 17:10:58 2013
@@ -25,26 +25,26 @@ import javax.faces.context.FacesContext;
public class ValidationSeverity {
- public void addFatal(FacesContext facesContext, UIComponent component, Object value) {
- FacesMessage message = new FacesMessage(
+ public void addFatal(final FacesContext facesContext, final UIComponent component, final Object value) {
+ final FacesMessage message = new FacesMessage(
FacesMessage.SEVERITY_FATAL, "Custom fatal", "This is a custom fatal error");
facesContext.addMessage(component.getClientId(facesContext), message);
}
- public void addError(FacesContext facesContext, UIComponent component, Object value) {
- FacesMessage message = new FacesMessage(
+ public void addError(final FacesContext facesContext, final UIComponent component, final Object value) {
+ final FacesMessage message = new FacesMessage(
FacesMessage.SEVERITY_ERROR, "Custom error", "This is a custom error");
facesContext.addMessage(component.getClientId(facesContext), message);
}
- public void addWarn(FacesContext facesContext, UIComponent component, Object value) {
- FacesMessage message = new FacesMessage(
+ public void addWarn(final FacesContext facesContext, final UIComponent component, final Object value) {
+ final FacesMessage message = new FacesMessage(
FacesMessage.SEVERITY_WARN, "Custom warning", "This is a custom warning");
facesContext.addMessage(component.getClientId(facesContext), message);
}
- public void addInfo(FacesContext facesContext, UIComponent component, Object value) {
- FacesMessage message = new FacesMessage(
+ public void addInfo(final FacesContext facesContext, final UIComponent component, final Object value) {
+ final FacesMessage message = new FacesMessage(
FacesMessage.SEVERITY_INFO, "Custom info", "This is a custom information");
facesContext.addMessage(component.getClientId(facesContext), message);
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/sudoku/Sudoku.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/sudoku/Sudoku.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/sudoku/Sudoku.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/sudoku/Sudoku.java Fri Nov 15 17:10:58 2013
@@ -59,14 +59,14 @@ public class Sudoku {
-1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
};
- RandomList randomList = new RandomList((byte) 81);
+ final RandomList randomList = new RandomList((byte) 81);
randomList.removeSmallest(9);
depth = 9;
undefined = randomList.asStack();
}
- public Sudoku(byte[] field) {
+ public Sudoku(final byte[] field) {
this.field = field;
//XXX undefined = new RandomList((byte) 81).asStack();
}
@@ -78,8 +78,8 @@ public class Sudoku {
LOG.debug("--------------- result ");
return Result.UNIQUE;
}
- byte position = undefined.pop();
- RandomList list = new RandomList((byte) 9);
+ final byte position = undefined.pop();
+ final RandomList list = new RandomList((byte) 9);
boolean foundOne = false;
while (!list.isEmpty()) {
field[position] = list.next();
@@ -87,7 +87,7 @@ public class Sudoku {
// LOG.debug(this);
if (checkRules()) {
// LOG.debug("ok");
- Result result = solve2();
+ final Result result = solve2();
switch (result) {
case ERROR:
break;
@@ -117,7 +117,7 @@ public class Sudoku {
maxDepth = depth;
LOG.debug("new max depth: " + maxDepth);
}
- Result result = solve();
+ final Result result = solve();
depth--;
return result;
}
@@ -129,9 +129,9 @@ public class Sudoku {
protected boolean checkRowRules() {
for (int i = 0; i < 9; i++) {
- BitSet xxx = new BitSet();
+ final BitSet xxx = new BitSet();
for (int j = 0; j < 9; j++) {
- byte value = field[i * 9 + j];
+ final byte value = field[i * 9 + j];
if (value != -1) {
if (xxx.get(value)) {
// LOG.debug("fail h " + i);
@@ -146,9 +146,9 @@ public class Sudoku {
protected boolean checkColumnRules() {
for (int i = 0; i < 9; i++) {
- BitSet xxx = new BitSet();
+ final BitSet xxx = new BitSet();
for (int j = 0; j < 9; j++) {
- byte value = field[j * 9 + i];
+ final byte value = field[j * 9 + i];
if (value != -1) {
if (xxx.get(value)) {
// LOG.debug("fail v " + i);
@@ -163,10 +163,10 @@ public class Sudoku {
protected boolean checkSquareRules() {
for (int i = 0; i < 9; i++) {
- BitSet xxx = new BitSet();
+ final BitSet xxx = new BitSet();
for (int j = 0; j < 9; j++) {
final int i1 = (i % 3) * 3 + i / 3 * 27 + j % 3 + j / 3 * 9;
- byte value = field[i1];
+ final byte value = field[i1];
if (value != -1) {
if (xxx.get(value)) {
// LOG.debug("fail 3 " + i);
@@ -179,9 +179,9 @@ public class Sudoku {
return true;
}
- public static void main(String[] args) {
+ public static void main(final String[] args) {
LOG.debug("" + new RandomList((byte) 9).list);
- Sudoku sudoku = new Sudoku();
+ final Sudoku sudoku = new Sudoku();
LOG.debug("---------------------------------------------------------------------------------------------");
final Result result = sudoku.solve();
LOG.debug("" + result);
@@ -191,7 +191,7 @@ public class Sudoku {
@Override
public String toString() {
- StringBuilder builder = new StringBuilder();
+ final StringBuilder builder = new StringBuilder();
for (int i = 0; i < field.length; i++) {
if (field[i] == -1) {
builder.append('-');
@@ -215,19 +215,19 @@ public class Sudoku {
private byte n;
private List<Byte> list;
- private RandomList(byte n) {
+ private RandomList(final byte n) {
this.n = n;
list = new ArrayList<Byte>(n);
shuffle();
}
public void shuffle() {
- List<Byte> temp = new ArrayList<Byte>(n);
+ final List<Byte> temp = new ArrayList<Byte>(n);
for (byte i = 0; i < n; i++) {
temp.add(i, i);
}
for (byte i = n; i > 0; i--) {
- byte index = (byte) RANDOM.nextInt(i);
+ final byte index = (byte) RANDOM.nextInt(i);
list.add(temp.remove(index));
}
}
@@ -242,13 +242,13 @@ public class Sudoku {
public Stack<Byte> asStack() {
final Stack<Byte> stack = new Stack<Byte>();
- for (Byte aByte : list) {
+ for (final Byte aByte : list) {
stack.add(aByte);
}
return stack;
}
- public void removeSmallest(int n) {
+ public void removeSmallest(final int n) {
for (byte i = 0; i < n; i++) {
list.remove((Byte) i);
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/Controller.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/Controller.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/Controller.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/Controller.java Fri Nov 15 17:10:58 2013
@@ -64,7 +64,7 @@ public class Controller {
return manufacturer;
}
- public void setManufacturer(int manufacturer) {
+ public void setManufacturer(final int manufacturer) {
this.manufacturer = manufacturer;
}
@@ -81,7 +81,7 @@ public class Controller {
return null;
}
- public void setVehicle(int vehicle) {
+ public void setVehicle(final int vehicle) {
this.vehicle = vehicle;
}
@@ -93,7 +93,7 @@ public class Controller {
}
}
- public void valueChanged(ValueChangeEvent event) {
+ public void valueChanged(final ValueChangeEvent event) {
LOG.info("Value change event in component with id: '"
+ event.getComponent().getClientId(FacesContext.getCurrentInstance())
+ "'. Value changed from '" + event.getOldValue() + "' to '" + event.getNewValue() + "'");
@@ -103,7 +103,7 @@ public class Controller {
return text;
}
- public void setText(String text) {
+ public void setText(final String text) {
this.text = text;
}
@@ -112,7 +112,7 @@ public class Controller {
return bool;
}
- public void setBool(boolean bool) {
+ public void setBool(final boolean bool) {
this.bool = bool;
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/InputSuggestController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/InputSuggestController.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/InputSuggestController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/InputSuggestController.java Fri Nov 15 17:10:58 2013
@@ -61,7 +61,7 @@ public class InputSuggestController {
return simpleValue;
}
- public void setSimpleValue(String simpleValue) {
+ public void setSimpleValue(final String simpleValue) {
this.simpleValue = simpleValue;
}
@@ -69,7 +69,7 @@ public class InputSuggestController {
return zipValue;
}
- public void setZipValue(String zipValue) {
+ public void setZipValue(final String zipValue) {
this.zipValue = zipValue;
}
@@ -77,7 +77,7 @@ public class InputSuggestController {
return cityValue;
}
- public void setCityValue(String cityValue) {
+ public void setCityValue(final String cityValue) {
this.cityValue = cityValue;
}
@@ -109,27 +109,27 @@ public class InputSuggestController {
return region;
}
- public void setRegion(String region) {
+ public void setRegion(final String region) {
this.region = region;
}
- public List<String> getSimpleSuggestItems(UIInput component) {
+ public List<String> getSimpleSuggestItems(final UIInput component) {
String prefix = (String) component.getSubmittedValue();
LOG.info("Creating items for prefix '" + prefix + "'");
if (prefix == null) {
prefix = "";
}
- List<String> list = new ArrayList<String>();
- int n = RandomUtils.nextInt(10);
+ final List<String> list = new ArrayList<String>();
+ final int n = RandomUtils.nextInt(10);
for (int i = 0; i < n; i++) {
list.add(prefix + i);
}
return list;
}
- public AutoSuggestItems getZipSuggestItems(UIInput component) {
- String prefix = (String) component.getSubmittedValue();
- AutoSuggestItems item = new AutoSuggestItems();
+ public AutoSuggestItems getZipSuggestItems(final UIInput component) {
+ final String prefix = (String) component.getSubmittedValue();
+ final AutoSuggestItems item = new AutoSuggestItems();
item.setItems(getSuggestItems(prefix, true));
item.setNextFocusId("page:txarea");
return item;
@@ -137,23 +137,23 @@ public class InputSuggestController {
- public AutoSuggestItems getCitySuggestItems(UIInput component) {
- String prefix = (String) component.getSubmittedValue();
- AutoSuggestItems item = new AutoSuggestItems();
+ public AutoSuggestItems getCitySuggestItems(final UIInput component) {
+ final String prefix = (String) component.getSubmittedValue();
+ final AutoSuggestItems item = new AutoSuggestItems();
item.setItems(getSuggestItems(prefix, false));
item.setNextFocusId("page:txarea");
return item;
}
- private List<AutoSuggestItem> getSuggestItems(String prefix, boolean zip) {
- List<AutoSuggestItem> items = new ArrayList<AutoSuggestItem>();
- for (String[] dataRow : suggestData) {
+ private List<AutoSuggestItem> getSuggestItems(final String prefix, final boolean zip) {
+ final List<AutoSuggestItem> items = new ArrayList<AutoSuggestItem>();
+ for (final String[] dataRow : suggestData) {
if (zip) {
if (dataRow[1].startsWith(prefix)) {
- AutoSuggestItem item = new AutoSuggestItem();
+ final AutoSuggestItem item = new AutoSuggestItem();
item.setLabel(dataRow[0]);
item.setValue(dataRow[1]);
- List<AutoSuggestExtensionItem> extensionItems = new ArrayList<AutoSuggestExtensionItem>(2);
+ final List<AutoSuggestExtensionItem> extensionItems = new ArrayList<AutoSuggestExtensionItem>(2);
extensionItems.add(createExtensionItem("page:isCity", dataRow[2]));
if (dataRow[3] != null) {
extensionItems.add(createExtensionItem("page:isState", dataRow[3]));
@@ -163,10 +163,10 @@ public class InputSuggestController {
}
} else {
if (dataRow[2].toLowerCase().startsWith(prefix.toLowerCase())) {
- AutoSuggestItem item = new AutoSuggestItem();
+ final AutoSuggestItem item = new AutoSuggestItem();
item.setLabel(dataRow[0]);
item.setValue(dataRow[2]);
- List<AutoSuggestExtensionItem> extensionItems = new ArrayList<AutoSuggestExtensionItem>(2);
+ final List<AutoSuggestExtensionItem> extensionItems = new ArrayList<AutoSuggestExtensionItem>(2);
extensionItems.add(createExtensionItem("page:isZip", dataRow[1]));
if (dataRow[3] != null) {
extensionItems.add(createExtensionItem("page:isState", dataRow[3]));
@@ -180,8 +180,8 @@ public class InputSuggestController {
return items;
}
- private AutoSuggestExtensionItem createExtensionItem(String id, String value) {
- AutoSuggestExtensionItem extItem = new AutoSuggestExtensionItem();
+ private AutoSuggestExtensionItem createExtensionItem(final String id, final String value) {
+ final AutoSuggestExtensionItem extItem = new AutoSuggestExtensionItem();
extItem.setId(id);
extItem.setValue(value);
return extItem;
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/OnOffConverter.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/OnOffConverter.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/OnOffConverter.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/OnOffConverter.java Fri Nov 15 17:10:58 2013
@@ -31,13 +31,15 @@ public class OnOffConverter implements C
private static final Logger LOG = LoggerFactory.getLogger(OnOffConverter.class);
- public Object getAsObject(FacesContext context, UIComponent component, String value) throws ConverterException {
+ public Object getAsObject(final FacesContext context, final UIComponent component, final String value)
+ throws ConverterException {
final String result = Boolean.parseBoolean(value) ? "on" : "off";
LOG.info("Got value = '" + value + "'. Result = '" + result + "'");
return result;
}
- public String getAsString(FacesContext context, UIComponent component, Object value) throws ConverterException {
+ public String getAsString(final FacesContext context, final UIComponent component, final Object value)
+ throws ConverterException {
final String result = "on".equals(value) ? Boolean.TRUE.toString() : Boolean.FALSE.toString();
LOG.info("Got value = '" + value + "'. Result: '" + result + "'");
return result;
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/PartialReloadController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/PartialReloadController.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/PartialReloadController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/PartialReloadController.java Fri Nov 15 17:10:58 2013
@@ -59,11 +59,11 @@ public class PartialReloadController {
return waitAndReload(7000);
}
- private String waitAndReload(long delay) {
+ private String waitAndReload(final long delay) {
synchronized (this) {
try {
wait(delay);
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
//
}
}
@@ -71,7 +71,7 @@ public class PartialReloadController {
}
public String navigateAction() {
- FacesContext facesContext = FacesContext.getCurrentInstance();
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
// in case of both the select control is not processed during lifecycle
// we need to get the value from the request params
@@ -80,8 +80,8 @@ public class PartialReloadController {
AjaxUtils.removeAjaxComponent(facesContext, "page:navTest");
if (navigationState == null) {
- ELContext elContext = facesContext.getELContext();
- ValueExpression expression = facesContext.getApplication().getExpressionFactory()
+ final ELContext elContext = facesContext.getELContext();
+ final ValueExpression expression = facesContext.getApplication().getExpressionFactory()
.createValueExpression(elContext, "#{navigationState}", NavigationState.class);
navigationState = (NavigationState) expression.getValue(elContext);
}
@@ -116,7 +116,7 @@ public class PartialReloadController {
return logAndNavigate(null);
}
- private String logAndNavigate(String navValue) {
+ private String logAndNavigate(final String navValue) {
LOG.info("Return navigate value: " + navValue + "");
return navValue;
}
@@ -126,7 +126,7 @@ public class PartialReloadController {
return navigateAction;
}
- public void setNavigateAction(String navigateAction) {
+ public void setNavigateAction(final String navigateAction) {
this.navigateAction = navigateAction;
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/PopupReferenceController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/PopupReferenceController.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/PopupReferenceController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/PopupReferenceController.java Fri Nov 15 17:10:58 2013
@@ -40,7 +40,7 @@ public class PopupReferenceController {
public PopupReferenceController() {
sheet = new ArrayList<Entry>();
for (int i = 0; i < 10; i++) {
- Entry tmp = new Entry();
+ final Entry tmp = new Entry();
tmp.setColumn1("cell__1__" + i);
tmp.setColumn2("cell_2_" + i);
tmp.setColumn3("cell_3_" + i);
@@ -48,18 +48,18 @@ public class PopupReferenceController {
}
}
- public void selectEntry(ActionEvent event) {
+ public void selectEntry(final ActionEvent event) {
UIComponent component = event.getComponent();
while (!(component instanceof UISheet)) {
component = component.getParent();
}
- UISheet sheet = (UISheet) component;
+ final UISheet sheet = (UISheet) component;
entry = (Entry) sheet.getRowData();
LOG.info("entry = \"" + entry.getColumn1() + "\"");
}
- public void saveChanges(ActionEvent event) {
+ public void saveChanges(final ActionEvent event) {
LOG.info("saveChanges()");
// nothing to do here
}
@@ -73,7 +73,7 @@ public class PopupReferenceController {
return entry;
}
- public void setEntry(Entry entry) {
+ public void setEntry(final Entry entry) {
this.entry = entry;
}
@@ -86,7 +86,7 @@ public class PopupReferenceController {
return column1;
}
- public void setColumn1(String column1) {
+ public void setColumn1(final String column1) {
this.column1 = column1;
}
@@ -94,7 +94,7 @@ public class PopupReferenceController {
return column2;
}
- public void setColumn2(String column2) {
+ public void setColumn2(final String column2) {
this.column2 = column2;
}
@@ -102,7 +102,7 @@ public class PopupReferenceController {
return column3;
}
- public void setColumn3(String column3) {
+ public void setColumn3(final String column3) {
this.column3 = column3;
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/Progress.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/Progress.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/Progress.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/Progress.java Fri Nov 15 17:10:58 2013
@@ -38,7 +38,7 @@ public class Progress {
return update;
}
- public void setUpdate(boolean update) {
+ public void setUpdate(final boolean update) {
this.update = update;
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/SelectBooleanCheckboxController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/SelectBooleanCheckboxController.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/SelectBooleanCheckboxController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/SelectBooleanCheckboxController.java Fri Nov 15 17:10:58 2013
@@ -28,7 +28,7 @@ public class SelectBooleanCheckboxContro
return onOffString;
}
- public void setOnOffString(String onOffString) {
+ public void setOnOffString(final String onOffString) {
this.onOffString = onOffString;
}
@@ -36,7 +36,7 @@ public class SelectBooleanCheckboxContro
return normalBoolean;
}
- public void setNormalBoolean(boolean normalBoolean) {
+ public void setNormalBoolean(final boolean normalBoolean) {
this.normalBoolean = normalBoolean;
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/SimpleBean.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/SimpleBean.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/SimpleBean.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/SimpleBean.java Fri Nov 15 17:10:58 2013
@@ -27,7 +27,7 @@ public class SimpleBean {
private String value;
private Date date;
- public SimpleBean(int number, String value) {
+ public SimpleBean(final int number, final String value) {
this.number = number;
this.value = value;
this.date = new Date();
@@ -37,7 +37,7 @@ public class SimpleBean {
return number;
}
- public void setNumber(int number) {
+ public void setNumber(final int number) {
this.number = number;
}
@@ -45,7 +45,7 @@ public class SimpleBean {
return value;
}
- public void setValue(String value) {
+ public void setValue(final String value) {
this.value = value;
}
@@ -53,7 +53,7 @@ public class SimpleBean {
return date;
}
- public void setDate(Date date) {
+ public void setDate(final Date date) {
this.date = date;
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/UploadItem.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/UploadItem.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/UploadItem.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/reference/UploadItem.java Fri Nov 15 17:10:58 2013
@@ -30,7 +30,7 @@ public class UploadItem {
private int size;
private String type;
- public UploadItem(String name, int size, String type) {
+ public UploadItem(final String name, final int size, final String type) {
this.name = name;
this.size = size;
this.type = type;
@@ -40,7 +40,7 @@ public class UploadItem {
return name;
}
- public void setName(String name) {
+ public void setName(final String name) {
this.name = name;
}
@@ -48,7 +48,7 @@ public class UploadItem {
return size;
}
- public void setSize(int size) {
+ public void setSize(final int size) {
this.size = size;
}
@@ -56,7 +56,7 @@ public class UploadItem {
return type;
}
- public void setType(String type) {
+ public void setType(final String type) {
this.type = type;
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/messages-confirmation.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/messages-confirmation.jsp?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/messages-confirmation.jsp (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/messages-confirmation.jsp Fri Nov 15 17:10:58 2013
@@ -22,54 +22,11 @@
<%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
<%
- FacesContext facesContext = FacesContext.getCurrentInstance();
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
facesContext.addMessage("message1", new FacesMessage(FacesMessage.SEVERITY_INFO, "Info message.", "Example of an info message."));
facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN, "Warn message.", "Example of a warn message."));
facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error message.", "Example of an error message."));
facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
- facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Fatal message.", "Example of a fatal message."));
facesContext.addMessage(null, new FacesMessage("Message without a severity.", "Example of a message without a severity."));
%>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/output.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/output.jsp?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/output.jsp (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/output.jsp Fri Nov 15 17:10:58 2013
@@ -22,7 +22,7 @@
<%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
<%
- FacesContext facesContext = FacesContext.getCurrentInstance();
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
facesContext.addMessage("message1", new FacesMessage(FacesMessage.SEVERITY_INFO, "Info message.", "Example of an info message."));
facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN, "Warn message.", "Example of a warn message."));
facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error message.", "Example of an error message."));
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/viewSource.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/viewSource.jsp?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/viewSource.jsp (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/viewSource.jsp Fri Nov 15 17:10:58 2013
@@ -18,7 +18,7 @@
java.io.InputStreamReader,
java.io.PrintWriter"
%><%
- String jsp = request.getParameter("jsp");
+ final String jsp = request.getParameter("jsp");
if (jsp == null || jsp.length() == 0) {
throw new RuntimeException("There is no 'jsp' parameter in the request!");
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/test/java/org/apache/myfaces/tobago/example/demo/NavigationUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/test/java/org/apache/myfaces/tobago/example/demo/NavigationUnitTest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/test/java/org/apache/myfaces/tobago/example/demo/NavigationUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/test/java/org/apache/myfaces/tobago/example/demo/NavigationUnitTest.java Fri Nov 15 17:10:58 2013
@@ -31,7 +31,7 @@ public class NavigationUnitTest extends
@Test
public void testFileNames() {
- List<String> list = new ArrayList<String>(Arrays.asList(
+ final List<String> list = new ArrayList<String>(Arrays.asList(
"/content/00/test-1.xhtml",
// todo "/content/00/x-bad.xhtml", // x- means excluded
"/content/00/07/test-2.xhtml",
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-experimental/src/main/java/org/apache/myfaces/tobago/example/reference/AttributeData.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-experimental/src/main/java/org/apache/myfaces/tobago/example/reference/AttributeData.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-experimental/src/main/java/org/apache/myfaces/tobago/example/reference/AttributeData.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-experimental/src/main/java/org/apache/myfaces/tobago/example/reference/AttributeData.java Fri Nov 15 17:10:58 2013
@@ -29,7 +29,7 @@ public class AttributeData {
return name;
}
- public void setName(String name) {
+ public void setName(final String name) {
this.name = name;
}
@@ -37,7 +37,7 @@ public class AttributeData {
return value;
}
- public void setValue(String value) {
+ public void setValue(final String value) {
this.value = value;
}
}