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 [16/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-data/src/main/java/org/apache/myfaces/tobago/example/data/CategoryTree.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/CategoryTree.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/CategoryTree.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/CategoryTree.java Fri Nov 15 17:10:58 2013
@@ -26,19 +26,19 @@ import javax.swing.tree.DefaultMutableTr
public class CategoryTree {
public static DefaultMutableTreeNode createSample() {
- DefaultMutableTreeNode tree = createNode("Root Node", "root");
+ final DefaultMutableTreeNode tree = createNode("Root Node", "root");
tree.insert(createNode("Sports", "sports"), 0);
tree.insert(createNode("Movies", "movies"), 1);
- DefaultMutableTreeNode music = createNode("Music", "music");
+ final DefaultMutableTreeNode music = createNode("Music", "music");
tree.insert(music, 2);
music.insert(createNode("Classic", "classic"), 0);
music.insert(createNode("Pop", "pop"), 1);
music.insert(createNode("World", "world"), 2);
tree.insert(createNode("Games", "games"), 3);
- DefaultMutableTreeNode science = createNode("Science", "science");
+ final DefaultMutableTreeNode science = createNode("Science", "science");
science.insert(createNode("Geography", "geography"), 0);
science.insert(createNode("Mathematics", "math"), 0);
- DefaultMutableTreeNode astro = createNode("Astronomy", "astro");
+ final DefaultMutableTreeNode astro = createNode("Astronomy", "astro");
astro.insert(createNode("Education", "edu"), 0);
astro.insert(createNode("Pictures", "pic"), 0);
science.insert(astro, 2);
@@ -46,22 +46,22 @@ public class CategoryTree {
return tree;
}
- public static DefaultMutableTreeNode createNode(String name, String id) {
+ public static DefaultMutableTreeNode createNode(final String name, final String id) {
return new DefaultMutableTreeNode(new Node(name, id));
}
public static DefaultMutableTreeNode createSample2() {
- DefaultMutableTreeNode tree = new DefaultMutableTreeNode(new Node("1 Category"));
+ final DefaultMutableTreeNode tree = new DefaultMutableTreeNode(new Node("1 Category"));
tree.add(new DefaultMutableTreeNode(new Node("1.1 Sports")));
tree.add(new DefaultMutableTreeNode(new Node("1.2 Movies")));
- DefaultMutableTreeNode temp = new DefaultMutableTreeNode(new Node("1.3 Science"));
+ final DefaultMutableTreeNode temp = new DefaultMutableTreeNode(new Node("1.3 Science"));
tree.add(temp);
- DefaultMutableTreeNode music = new DefaultMutableTreeNode(new Node("1.4 Music"));
+ final DefaultMutableTreeNode music = new DefaultMutableTreeNode(new Node("1.4 Music"));
tree.add(music);
tree.add(new DefaultMutableTreeNode(new Node("1.5 Games")));
temp.add(new DefaultMutableTreeNode(new Node("1.3.1 Geography (strong markup)", Markup.STRONG)));
temp.add(new DefaultMutableTreeNode(new Node("1.3.2 Mathematics (strong markup)", Markup.STRONG)));
- DefaultMutableTreeNode temp2 = new DefaultMutableTreeNode(new Node("1.3.3 Pictures"));
+ final DefaultMutableTreeNode temp2 = new DefaultMutableTreeNode(new Node("1.3.3 Pictures"));
temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.1 Education")));
temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.2 Family")));
temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.3 Comercial")));
@@ -76,7 +76,7 @@ public class CategoryTree {
temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.12 Animal")));
temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.13 Personal")));
temp.add(temp2);
- DefaultMutableTreeNode bulk = new DefaultMutableTreeNode(new Node("1.6 Bulk"));
+ final DefaultMutableTreeNode bulk = new DefaultMutableTreeNode(new Node("1.6 Bulk"));
for (int i = 0; i < 5; i++) {
bulk.add(new DefaultMutableTreeNode(new Node("1.6." + (i + 1) + " Some Node")));
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/LocaleEntry.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/LocaleEntry.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/LocaleEntry.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/LocaleEntry.java Fri Nov 15 17:10:58 2013
@@ -30,7 +30,7 @@ public class LocaleEntry {
private String country;
private String language;
- public LocaleEntry(Locale locale, Locale displayLocale) {
+ public LocaleEntry(final Locale locale, final Locale displayLocale) {
this.locale = locale;
this.displayLocale = displayLocale;
country = locale.getDisplayCountry(displayLocale);
@@ -45,7 +45,7 @@ public class LocaleEntry {
return locale;
}
- public void setLocale(Locale locale) {
+ public void setLocale(final Locale locale) {
this.locale = locale;
}
@@ -53,7 +53,7 @@ public class LocaleEntry {
return displayLocale;
}
- public void setDisplayLocale(Locale displayLocale) {
+ public void setDisplayLocale(final Locale displayLocale) {
this.displayLocale = displayLocale;
}
@@ -61,7 +61,7 @@ public class LocaleEntry {
return country;
}
- public void setCountry(String country) {
+ public void setCountry(final String country) {
this.country = country;
}
@@ -69,7 +69,7 @@ public class LocaleEntry {
return language;
}
- public void setLanguage(String language) {
+ public void setLanguage(final String language) {
this.language = language;
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/LocaleList.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/LocaleList.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/LocaleList.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/LocaleList.java Fri Nov 15 17:10:58 2013
@@ -40,9 +40,9 @@ public class LocaleList {
public static final List<String> HOLIDAY;
static {
- List<LocaleEntry> init = new ArrayList<LocaleEntry>();
- for (Locale displayLocale : Locale.getAvailableLocales()) {
- for (Locale locale : Locale.getAvailableLocales()) {
+ final List<LocaleEntry> init = new ArrayList<LocaleEntry>();
+ for (final Locale displayLocale : Locale.getAvailableLocales()) {
+ for (final Locale locale : Locale.getAvailableLocales()) {
init.add(new LocaleEntry(locale, displayLocale));
}
}
@@ -50,8 +50,8 @@ public class LocaleList {
}
static {
- Set<String> init = new HashSet<String>();
- for (LocaleEntry localeEntry : DATA) {
+ final Set<String> init = new HashSet<String>();
+ for (final LocaleEntry localeEntry : DATA) {
if (StringUtils.isNotBlank(localeEntry.getCountry())
&& StringUtils.isNotBlank(localeEntry.getLanguage())) {
final String name = localeEntry.getCountry() + " (" + localeEntry.getLanguage() + ")";
@@ -64,8 +64,8 @@ public class LocaleList {
}
static {
- Set<String> init = new HashSet<String>();
- for (LocaleEntry localeEntry : DATA) {
+ final Set<String> init = new HashSet<String>();
+ for (final LocaleEntry localeEntry : DATA) {
if (StringUtils.isNotBlank(localeEntry.getCountry())) {
init.add(localeEntry.getCountry());
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/MixedCommandTree.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/MixedCommandTree.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/MixedCommandTree.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/MixedCommandTree.java Fri Nov 15 17:10:58 2013
@@ -23,20 +23,20 @@ public class MixedCommandTree {
public static NamedNode createSample() {
- NamedNode tree = new NamedNode("Commands");
+ final NamedNode tree = new NamedNode("Commands");
- NamedNode actions = new NamedNode("Actions");
+ final NamedNode actions = new NamedNode("Actions");
tree.add(actions);
actions.add(new NamedNode("Action 1", "Action 1", null, null));
actions.add(new NamedNode("Action 2", "Action 2", null, null));
actions.add(new NamedNode("Action 3", "Action 3", null, null));
- NamedNode links = new NamedNode("Links");
+ final NamedNode links = new NamedNode("Links");
tree.add(links);
links.add(new NamedNode("MyFaces", null, null, "http://myfaces.apache.org/"));
links.add(new NamedNode("Apache", null, null, "http://www.apache.org/"));
- NamedNode scripts = new NamedNode("Scripts");
+ final NamedNode scripts = new NamedNode("Scripts");
tree.add(scripts);
scripts.add(new NamedNode("1", null, "alert(1);", null));
scripts.add(new NamedNode("2", null, "alert(2);", null));
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/NamedNode.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/NamedNode.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/NamedNode.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/NamedNode.java Fri Nov 15 17:10:58 2013
@@ -34,11 +34,11 @@ public class NamedNode extends DefaultMu
private String script;
private String url;
- public NamedNode(String name) {
+ public NamedNode(final String name) {
this.name = name;
}
- public NamedNode(String name, String action, String script, String url) {
+ public NamedNode(final String name, final String action, final String script, final String url) {
this.name = name;
this.action = action;
this.script = script;
@@ -54,7 +54,7 @@ public class NamedNode extends DefaultMu
return null;
}
- public void actionListener(ActionEvent event) {
+ public void actionListener(final ActionEvent event) {
LOG.info("The actionListener() of node '" + name + "' was called.");
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/Node.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/Node.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/Node.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/Node.java Fri Nov 15 17:10:58 2013
@@ -42,21 +42,21 @@ public class Node {
private boolean selected;
- public Node(String name) {
+ public Node(final String name) {
this.name = name;
}
- public Node(String name, String id) {
+ public Node(final String name, final String id) {
this.name = name;
this.id = id;
}
- public Node(String name, Markup markup) {
+ public Node(final String name, final Markup markup) {
this.name = name;
this.markup = markup;
}
- public Node(String name, boolean disabled) {
+ public Node(final String name, final boolean disabled) {
this.name = name;
this.disabled = disabled;
}
@@ -66,7 +66,7 @@ public class Node {
return null;
}
- public void expansionListener(TreeExpansionEvent event) {
+ public void expansionListener(final TreeExpansionEvent event) {
LOG.info("event='" + event + "'");
expanded = event.isNewExpanded();
}
@@ -75,7 +75,7 @@ public class Node {
return name;
}
- public void setName(String name) {
+ public void setName(final String name) {
this.name = name;
}
@@ -83,7 +83,7 @@ public class Node {
return id;
}
- public void setId(String id) {
+ public void setId(final String id) {
this.id = id;
}
@@ -91,7 +91,7 @@ public class Node {
return expanded;
}
- public void setExpanded(boolean expanded) {
+ public void setExpanded(final boolean expanded) {
this.expanded = expanded;
}
@@ -99,7 +99,7 @@ public class Node {
return markup;
}
- public void setMarkup(Markup markup) {
+ public void setMarkup(final Markup markup) {
this.markup = markup;
}
@@ -107,7 +107,7 @@ public class Node {
return tip;
}
- public void setTip(String tip) {
+ public void setTip(final String tip) {
this.tip = tip;
}
@@ -115,7 +115,7 @@ public class Node {
return disabled;
}
- public void setDisabled(boolean disabled) {
+ public void setDisabled(final boolean disabled) {
this.disabled = disabled;
}
@@ -123,7 +123,7 @@ public class Node {
return selected;
}
- public void setSelected(boolean selected) {
+ public void setSelected(final boolean selected) {
this.selected = selected;
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/Planet.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/Planet.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/Planet.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/Planet.java Fri Nov 15 17:10:58 2013
@@ -39,7 +39,7 @@ public class Planet {
private String timeOfCirculation;
private List moons;
- public Planet(Planet planet) {
+ public Planet(final Planet planet) {
this.diameter = planet.diameter;
this.mass = planet.mass;
this.sunDistance = planet.sunDistance;
@@ -47,8 +47,8 @@ public class Planet {
this.moons = planet.moons;
}
- public Planet(String diameter, String mass, String sunDistance,
- String timeOfCirculation, List moons) {
+ public Planet(final String diameter, final String mass, final String sunDistance,
+ final String timeOfCirculation, final List moons) {
this.diameter = diameter;
this.mass = mass;
this.sunDistance = sunDistance;
@@ -60,7 +60,7 @@ public class Planet {
return diameter;
}
- public void setDiameter(String diameter) {
+ public void setDiameter(final String diameter) {
this.diameter = diameter;
}
@@ -68,7 +68,7 @@ public class Planet {
return mass;
}
- public void setMass(String mass) {
+ public void setMass(final String mass) {
this.mass = mass;
}
@@ -76,7 +76,7 @@ public class Planet {
return sunDistance;
}
- public void setSunDistance(String sunDistance) {
+ public void setSunDistance(final String sunDistance) {
this.sunDistance = sunDistance;
}
@@ -84,7 +84,7 @@ public class Planet {
return timeOfCirculation;
}
- public void setTimeOfCirculation(String timeOfCirculation) {
+ public void setTimeOfCirculation(final String timeOfCirculation) {
this.timeOfCirculation = timeOfCirculation;
}
@@ -92,7 +92,7 @@ public class Planet {
return moons;
}
- public void setMoons(List moons) {
+ public void setMoons(final List moons) {
this.moons = moons;
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/Salutation.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/Salutation.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/Salutation.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/Salutation.java Fri Nov 15 17:10:58 2013
@@ -29,7 +29,7 @@ public enum Salutation {
private String key;
- Salutation(String key) {
+ Salutation(final String key) {
this.key = key;
}
@@ -37,8 +37,8 @@ public enum Salutation {
return key;
}
- public static Salutation getSalutation(String key) {
- for (Salutation salutation : values()) {
+ public static Salutation getSalutation(final String key) {
+ for (final Salutation salutation : values()) {
if (salutation.getKey().equals(key)) {
return salutation;
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SalutationConverter.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SalutationConverter.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SalutationConverter.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SalutationConverter.java Fri Nov 15 17:10:58 2013
@@ -26,11 +26,13 @@ import javax.faces.convert.ConverterExce
public class SalutationConverter implements Converter {
- 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 {
return Salutation.getSalutation(value);
}
- 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 {
if (value instanceof Salutation) {
return ((Salutation) value).getKey();
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SmallTree.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SmallTree.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SmallTree.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SmallTree.java Fri Nov 15 17:10:58 2013
@@ -24,8 +24,8 @@ import javax.swing.tree.DefaultMutableTr
public class SmallTree {
public static DefaultMutableTreeNode createSample() {
- DefaultMutableTreeNode tree = new DefaultMutableTreeNode(new Node("Root Node", "root"));
- DefaultMutableTreeNode music = new DefaultMutableTreeNode(new Node("Music", "music"));
+ final DefaultMutableTreeNode tree = new DefaultMutableTreeNode(new Node("Root Node", "root"));
+ final DefaultMutableTreeNode music = new DefaultMutableTreeNode(new Node("Music", "music"));
tree.add(music);
music.add(new DefaultMutableTreeNode(new Node("Pop", "pop")));
tree.add(new DefaultMutableTreeNode(new Node("Sports", "sports")));
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/Solar.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/Solar.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/Solar.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/Solar.java Fri Nov 15 17:10:58 2013
@@ -35,7 +35,7 @@ public class Solar {
return planets;
}
- public void setPlanets(List<Planet> planets) {
+ public void setPlanets(final List<Planet> planets) {
this.planets = planets;
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SolarObject.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SolarObject.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SolarObject.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SolarObject.java Fri Nov 15 17:10:58 2013
@@ -48,8 +48,8 @@ public class SolarObject {
private String population;
public SolarObject(
- String name, String number, String orbit, Integer distance, Double period,
- Double incl, Double eccen, String discoverer, Integer discoverYear) {
+ final String name, final String number, final String orbit, final Integer distance, final Double period,
+ final Double incl, final Double eccen, final String discoverer, final Integer discoverYear) {
this.name = name;
this.number = number;
this.orbit = orbit;
@@ -66,7 +66,7 @@ public class SolarObject {
return name;
}
- public void setName(String name) {
+ public void setName(final String name) {
this.name = name;
}
@@ -86,7 +86,7 @@ public class SolarObject {
return number;
}
- public void setNumber(String number) {
+ public void setNumber(final String number) {
this.number = number;
}
@@ -94,7 +94,7 @@ public class SolarObject {
return orbit;
}
- public void setOrbit(String orbit) {
+ public void setOrbit(final String orbit) {
this.orbit = orbit;
}
@@ -102,7 +102,7 @@ public class SolarObject {
return distance;
}
- public void setDistance(Integer distance) {
+ public void setDistance(final Integer distance) {
this.distance = distance;
}
@@ -110,7 +110,7 @@ public class SolarObject {
return period;
}
- public void setPeriod(Double period) {
+ public void setPeriod(final Double period) {
this.period = period;
}
@@ -118,7 +118,7 @@ public class SolarObject {
return incl;
}
- public void setIncl(Double incl) {
+ public void setIncl(final Double incl) {
this.incl = incl;
}
@@ -126,7 +126,7 @@ public class SolarObject {
return eccen;
}
- public void setEccen(Double eccen) {
+ public void setEccen(final Double eccen) {
this.eccen = eccen;
}
@@ -134,7 +134,7 @@ public class SolarObject {
return discoverer;
}
- public void setDiscoverer(String discoverer) {
+ public void setDiscoverer(final String discoverer) {
this.discoverer = discoverer;
}
@@ -142,7 +142,7 @@ public class SolarObject {
return discoverYear;
}
- public void setDiscoverYear(Integer discoverYear) {
+ public void setDiscoverYear(final Integer discoverYear) {
this.discoverYear = discoverYear;
}
@@ -150,7 +150,7 @@ public class SolarObject {
return population;
}
- public void setPopulation(String population) {
+ public void setPopulation(final String population) {
this.population = population;
}
@@ -163,9 +163,9 @@ public class SolarObject {
}
public static List<SolarObject> getList() {
- SolarObject[] array = getArray();
- List<SolarObject> list = new ArrayList<SolarObject>(array.length);
- for (SolarObject object : array) {
+ final SolarObject[] array = getArray();
+ final List<SolarObject> list = new ArrayList<SolarObject>(array.length);
+ for (final SolarObject object : array) {
list.add(object);
}
return list;
@@ -174,7 +174,7 @@ public class SolarObject {
public static DefaultMutableTreeNode getTree() {
final SolarObject[] array = getArray();
final Map<String, DefaultMutableTreeNode> cache = new HashMap<String, DefaultMutableTreeNode>();
- for (SolarObject solar : array) {
+ for (final SolarObject solar : array) {
final DefaultMutableTreeNode node = new DefaultMutableTreeNode(solar);
cache.put(solar.getName(), node);
final String orbitName = solar.getOrbit();
@@ -187,10 +187,10 @@ public class SolarObject {
return cache.get("Sun");
}
- public static List<SolarObject> getSatellites(String center) {
- List<SolarObject> collect = new ArrayList<SolarObject>();
- SolarObject[] all = getArray();
- for (SolarObject anAll : all) {
+ public static List<SolarObject> getSatellites(final String center) {
+ final List<SolarObject> collect = new ArrayList<SolarObject>();
+ final SolarObject[] all = getArray();
+ for (final SolarObject anAll : all) {
if (anAll.getOrbit().equals(center)) {
collect.add(anAll);
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Bird.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Bird.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/Bird.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Bird.java Fri Nov 15 17:10:58 2013
@@ -33,7 +33,7 @@ public class Bird implements Serializabl
private String name;
private int size;
- public Bird(String name, int size) {
+ public Bird(final String name, final int size) {
this.name = name;
this.size = size;
}
@@ -44,7 +44,7 @@ public class Bird implements Serializabl
*/
public String select() {
LOG.info("Select Bird: name=" + name + " size=" + size);
- BirdController controller = (BirdController)
+ final BirdController controller = (BirdController)
VariableResolverUtils.resolveVariable(FacesContext.getCurrentInstance(), "birdController");
controller.setStatus("Selected bird is " + name);
return null;
@@ -54,7 +54,7 @@ public class Bird implements Serializabl
return name;
}
- public void setName(String name) {
+ public void setName(final String name) {
this.name = name;
}
@@ -62,7 +62,7 @@ public class Bird implements Serializabl
return size;
}
- public void setSize(int size) {
+ public void setSize(final int size) {
this.size = size;
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/BirdController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/BirdController.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/BirdController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/BirdController.java Fri Nov 15 17:10:58 2013
@@ -52,7 +52,7 @@ public class BirdController implements S
return status;
}
- public void setStatus(String status) {
+ public void setStatus(final String status) {
this.status = status;
}
@@ -60,7 +60,7 @@ public class BirdController implements S
return newBirdName;
}
- public void setNewBirdName(String newBirdName) {
+ public void setNewBirdName(final String newBirdName) {
this.newBirdName = newBirdName;
}
@@ -68,7 +68,7 @@ public class BirdController implements S
return newBirdSize;
}
- public void setNewBirdSize(int newBirdSize) {
+ public void setNewBirdSize(final int newBirdSize) {
this.newBirdSize = newBirdSize;
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Countries.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Countries.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/Countries.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Countries.java Fri Nov 15 17:10:58 2013
@@ -36,11 +36,11 @@ public class Countries {
private static final Logger LOG = LoggerFactory.getLogger(Countries.class);
- public List<String> prefixed(UIInput input) {
- String prefix = (String) input.getSubmittedValue();
+ public List<String> prefixed(final UIInput input) {
+ final String prefix = (String) input.getSubmittedValue();
LOG.info("Creating items for prefix: '" + prefix + "'");
- List<String> result = new ArrayList<String>();
- for (String name : LocaleList.COUNTRY) {
+ final List<String> result = new ArrayList<String>();
+ for (final String name : LocaleList.COUNTRY) {
if (StringUtils.startsWithIgnoreCase(name, prefix)) {
result.add(name);
}
@@ -51,11 +51,11 @@ public class Countries {
return result;
}
- public List<String> contains(UIInput input) {
- String contain = (String) input.getSubmittedValue();
+ public List<String> contains(final UIInput input) {
+ final String contain = (String) input.getSubmittedValue();
LOG.info("Creating items which contain: '" + contain + "'");
- List<String> result = new ArrayList<String>();
- for (String name : LocaleList.COUNTRY) {
+ final List<String> result = new ArrayList<String>();
+ for (final String name : LocaleList.COUNTRY) {
if (StringUtils.containsIgnoreCase(name, contain)) {
result.add(name);
}
@@ -66,9 +66,9 @@ public class Countries {
return result;
}
- public List<String> holiday(UIInput input) {
- List<String> result = new ArrayList<String>();
- for (String name : LocaleList.HOLIDAY) {
+ public List<String> holiday(final UIInput input) {
+ final List<String> result = new ArrayList<String>();
+ for (final String name : LocaleList.HOLIDAY) {
result.add(name);
if (result.size() > 100) { // this value should be greater than the value of the input control
break;
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Jsr303Bean.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Jsr303Bean.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/Jsr303Bean.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Jsr303Bean.java Fri Nov 15 17:10:58 2013
@@ -49,7 +49,7 @@ public class Jsr303Bean {
return required;
}
- public void setRequired(String required) {
+ public void setRequired(final String required) {
this.required = required;
}
@@ -57,7 +57,7 @@ public class Jsr303Bean {
return length;
}
- public void setLength(String length) {
+ public void setLength(final String length) {
this.length = length;
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ManifestEntry.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ManifestEntry.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/ManifestEntry.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ManifestEntry.java Fri Nov 15 17:10:58 2013
@@ -26,7 +26,7 @@ public class ManifestEntry extends Defau
private final String name;
private final String value;
- public ManifestEntry(String name, String value) {
+ public ManifestEntry(final String name, final String value) {
this.name = name;
this.value = value;
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ManifestReader.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ManifestReader.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/ManifestReader.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ManifestReader.java Fri Nov 15 17:10:58 2013
@@ -50,7 +50,7 @@ public class ManifestReader {
URL url = null;
try {
- Enumeration<URL> ul = getClass().getClassLoader().getResources("META-INF/MANIFEST.MF");
+ final Enumeration<URL> ul = getClass().getClassLoader().getResources("META-INF/MANIFEST.MF");
while (ul.hasMoreElements()) {
url = ul.nextElement();
@@ -62,11 +62,11 @@ public class ManifestReader {
final Manifest manifest = new Manifest(url.openStream());
final Attributes attributes = manifest.getMainAttributes();
- for (Object key : attributes.keySet()) {
+ for (final Object key : attributes.keySet()) {
jar.add(new ManifestEntry(key.toString(), attributes.get(key).toString()));
}
}
- } catch (IOException e) {
+ } catch (final IOException e) {
LOG.error("Problem while processing URL: " + url, e);
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/MultiplePageDeclarationLanguageNavigationHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/MultiplePageDeclarationLanguageNavigationHandler.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/MultiplePageDeclarationLanguageNavigationHandler.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/MultiplePageDeclarationLanguageNavigationHandler.java Fri Nov 15 17:10:58 2013
@@ -40,19 +40,19 @@ public class MultiplePageDeclarationLang
private NavigationHandler navigationHandler;
- public MultiplePageDeclarationLanguageNavigationHandler(NavigationHandler navigationHandler) {
+ public MultiplePageDeclarationLanguageNavigationHandler(final NavigationHandler navigationHandler) {
this.navigationHandler = navigationHandler;
}
- public void handleNavigation(FacesContext facesContext, String fromAction, String outcome) {
+ public void handleNavigation(final FacesContext facesContext, final String fromAction, String outcome) {
- String original = outcome;
+ final String original = outcome;
if (outcome != null) {
- PageDeclarationLanguageBean bean = (PageDeclarationLanguageBean)
+ final PageDeclarationLanguageBean bean = (PageDeclarationLanguageBean)
VariableResolverUtils.resolveVariable(facesContext, "pageDeclarationLanguage");
- for (PageDeclarationLanguage renderTechnology : PageDeclarationLanguage.values()) {
+ for (final PageDeclarationLanguage renderTechnology : PageDeclarationLanguage.values()) {
if (outcome.endsWith(renderTechnology.getExtension())) {
outcome = outcome.substring(0, outcome.lastIndexOf(renderTechnology.getExtension()));
}
@@ -61,7 +61,7 @@ public class MultiplePageDeclarationLang
if (pageExists(facesContext, outcome, bean.getLanguage().getExtension())) {
outcome = outcome + bean.getLanguage().getExtension();
} else {
- for (PageDeclarationLanguage renderTechnology : PageDeclarationLanguage.values()) {
+ for (final PageDeclarationLanguage renderTechnology : PageDeclarationLanguage.values()) {
if (pageExists(facesContext, outcome, renderTechnology.getExtension())) {
bean.setLanguage(renderTechnology);
outcome = outcome + bean.getLanguage().getExtension();
@@ -74,14 +74,14 @@ public class MultiplePageDeclarationLang
LOG.info("Original outcome='"+ original + "', adjusted outcome = '"+ outcome +"'");
if (StringUtils.startsWith(outcome, "/content/")) {
- ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
- UIViewRoot viewRoot = viewHandler.createView(facesContext, outcome);
+ final ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
+ final UIViewRoot viewRoot = viewHandler.createView(facesContext, outcome);
facesContext.setViewRoot(viewRoot);
final ExternalContext externalContext = facesContext.getExternalContext();
try {
externalContext.redirect(
externalContext.encodeRedirectURL("/faces" + outcome, Collections.<String, List<String>>emptyMap()));
- } catch (IOException e) {
+ } catch (final IOException e) {
// not nice?
facesContext.renderResponse();
}
@@ -90,11 +90,11 @@ public class MultiplePageDeclarationLang
}
}
- private boolean pageExists(FacesContext facesContext, String outcome, String extension) {
+ private boolean pageExists(final FacesContext facesContext, final String outcome, final String extension) {
if (StringUtils.isEmpty(outcome)) {
return false;
}
- String path = ResourceManagerUtils.getImageWithPath(facesContext, outcome.substring(1) + extension, true);
+ final String path = ResourceManagerUtils.getImageWithPath(facesContext, outcome.substring(1) + extension, true);
return path != null;
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationEvent.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationEvent.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/NavigationEvent.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationEvent.java Fri Nov 15 17:10:58 2013
@@ -23,7 +23,7 @@ public class NavigationEvent {
private final NavigationNode current;
- public NavigationEvent(NavigationNode current) {
+ public NavigationEvent(final NavigationNode current) {
this.current = current;
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationNode.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationNode.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/NavigationNode.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationNode.java Fri Nov 15 17:10:58 2013
@@ -39,7 +39,7 @@ public class NavigationNode extends Defa
/** Cache the TreePath for optimization. */
private TreePath treePath;
- public NavigationNode(String path, NavigationTree tree) {
+ public NavigationNode(final String path, final NavigationTree tree) {
this.tree = tree;
outcome = path;
@@ -54,8 +54,8 @@ public class NavigationNode extends Defa
title = t != null ? t : name;
}
- public int compareTo(Object o) {
- NavigationNode other = (NavigationNode) o;
+ public int compareTo(final Object o) {
+ final NavigationNode other = (NavigationNode) o;
return branch.compareTo(other.getBranch());
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationState.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationState.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/NavigationState.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationState.java Fri Nov 15 17:10:58 2013
@@ -94,7 +94,7 @@ public class NavigationState implements
}
}
- public String gotoNode(NavigationNode node) {
+ public String gotoNode(final NavigationNode node) {
if (node == null) {
return gotoFirst();
} else {
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationTree.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationTree.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/NavigationTree.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationTree.java Fri Nov 15 17:10:58 2013
@@ -62,17 +62,17 @@ public class NavigationTree implements S
init(list);
}
- protected NavigationTree(List<String> list) {
+ protected NavigationTree(final List<String> list) {
init(list);
}
- protected void init(List<String> list) {
+ protected void init(final List<String> list) {
list.add("/content/root-dummy.xhtml"); // helps to build the tree, this is not an existing file
- List<NavigationNode> nodes = new ArrayList<NavigationNode>();
- for (String path : list) {
+ final List<NavigationNode> nodes = new ArrayList<NavigationNode>();
+ for (final String path : list) {
try {
nodes.add(new NavigationNode(path, this));
- } catch (IllegalStateException e) {
+ } catch (final IllegalStateException e) {
LOG.error("Found file with wrong pattern: '{}'", path);
}
}
@@ -82,12 +82,12 @@ public class NavigationTree implements S
// after sorting the first node is the root node.
tree = nodes.get(0);
- Map<String, NavigationNode> map = new HashMap<String, NavigationNode>();
+ final Map<String, NavigationNode> map = new HashMap<String, NavigationNode>();
// map.put(tree.getBranch(), tree);
- for (NavigationNode node : nodes) {
+ for (final NavigationNode node : nodes) {
map.put(node.getBranch(), node);
- String parent = node.getBranch().substring(0, node.getBranch().lastIndexOf('/'));
+ final String parent = node.getBranch().substring(0, node.getBranch().lastIndexOf('/'));
if (!parent.equals("")) { // is root
map.get(parent).add(node);
}
@@ -96,12 +96,12 @@ public class NavigationTree implements S
}
private static List<String> locateResourcesInWar(
- ServletContext servletContext, String directory, List<String> result) {
+ final ServletContext servletContext, final String directory, final List<String> result) {
- Set<String> resourcePaths = servletContext.getResourcePaths(directory);
+ final Set<String> resourcePaths = servletContext.getResourcePaths(directory);
if (resourcePaths != null) {
- for (String path : resourcePaths) {
+ for (final String path : resourcePaths) {
if (path.endsWith("/.svn/")) {
// ignoring svn files
@@ -125,7 +125,7 @@ public class NavigationTree implements S
return result;
}
- public void selectByViewId(String viewId) {
+ public void selectByViewId(final String viewId) {
gotoNode(findByViewId(viewId));
}
@@ -133,9 +133,9 @@ public class NavigationTree implements S
if (viewId.endsWith(".jspx")) {
viewId = viewId.substring(0, viewId.lastIndexOf(".jspx")) + ".xhtml";
}
- Enumeration enumeration = tree.depthFirstEnumeration();
+ final Enumeration enumeration = tree.depthFirstEnumeration();
while (enumeration.hasMoreElements()) {
- NavigationNode node = ((NavigationNode) enumeration.nextElement());
+ final NavigationNode node = ((NavigationNode) enumeration.nextElement());
if (node.getOutcome() != null && viewId.contains(node.getOutcome())) {
return node;
}
@@ -147,22 +147,22 @@ public class NavigationTree implements S
return tree;
}
- public void gotoNode(NavigationNode node) {
+ public void gotoNode(final NavigationNode node) {
events.fire(new NavigationEvent(node));
}
public String viewSource() {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- ExternalContext externalContext = facesContext.getExternalContext();
- String viewId = facesContext.getViewRoot().getViewId();
- HttpServletResponse response = (HttpServletResponse) externalContext.getResponse();
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ExternalContext externalContext = facesContext.getExternalContext();
+ final String viewId = facesContext.getViewRoot().getViewId();
+ final HttpServletResponse response = (HttpServletResponse) externalContext.getResponse();
response.setContentType("text/html; charset=UTF-8");
try {
- InputStream resourceAsStream = externalContext.getResourceAsStream(viewId);
- InputStreamReader reader = new InputStreamReader(resourceAsStream);
+ final InputStream resourceAsStream = externalContext.getResourceAsStream(viewId);
+ final InputStreamReader reader = new InputStreamReader(resourceAsStream);
JspFormatter.writeJsp(reader, new PrintWriter(response.getOutputStream()));
- } catch (IOException e) {
+ } catch (final IOException e) {
LOG.error("", e);
return "error";
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PageDeclarationLanguage.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PageDeclarationLanguage.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/PageDeclarationLanguage.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PageDeclarationLanguage.java Fri Nov 15 17:10:58 2013
@@ -28,7 +28,7 @@ public enum PageDeclarationLanguage {
private String extension;
private String display;
- PageDeclarationLanguage(String extension, String display) {
+ PageDeclarationLanguage(final String extension, final String display) {
this.extension = extension;
this.display = display;
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PageDeclarationLanguageBean.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PageDeclarationLanguageBean.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/PageDeclarationLanguageBean.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PageDeclarationLanguageBean.java Fri Nov 15 17:10:58 2013
@@ -29,7 +29,7 @@ public class PageDeclarationLanguageBean
return language;
}
- public void setLanguage(PageDeclarationLanguage language) {
+ public void setLanguage(final PageDeclarationLanguage language) {
this.language = language;
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ServerInfo.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ServerInfo.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/ServerInfo.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ServerInfo.java Fri Nov 15 17:10:58 2013
@@ -61,10 +61,10 @@ public class ServerInfo {
file = CONFIG_FILE_DEFAULT;
}
LOG.info("Loading config from file '" + file + "'");
- Properties config = new Properties();
+ final Properties config = new Properties();
config.load(new FileInputStream(file));
enabled = Boolean.parseBoolean(config.getProperty(ENABLED_KEY));
- } catch (IOException e) {
+ } catch (final IOException e) {
LOG.warn("Can't load config: " + e.getMessage());
}
// the tobago version should be set in any case
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SheetFilter.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SheetFilter.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/SheetFilter.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SheetFilter.java Fri Nov 15 17:10:58 2013
@@ -83,7 +83,7 @@ public class SheetFilter {
public String filter() {
filtered.clear();
- for (SolarObject solarObject : demo.getSolarArray()) {
+ for (final SolarObject solarObject : demo.getSolarArray()) {
if (solarObject.getName().toLowerCase().contains(name.toLowerCase())
&& solarObject.getOrbit().toLowerCase().contains(orbit.toLowerCase())
&& distance.getMin() < solarObject.getDistance()
@@ -99,7 +99,7 @@ public class SheetFilter {
return name;
}
- public void setName(String name) {
+ public void setName(final String name) {
this.name = name;
}
@@ -107,7 +107,7 @@ public class SheetFilter {
return orbit;
}
- public void setOrbit(String orbit) {
+ public void setOrbit(final String orbit) {
this.orbit = orbit;
}
@@ -115,7 +115,7 @@ public class SheetFilter {
return distance;
}
- public void setDistance(DistanceRange distance) {
+ public void setDistance(final DistanceRange distance) {
this.distance = distance;
}
@@ -123,7 +123,7 @@ public class SheetFilter {
return discoverer;
}
- public void setDiscoverer(String discoverer) {
+ public void setDiscoverer(final String discoverer) {
this.discoverer = discoverer;
}
@@ -135,7 +135,7 @@ public class SheetFilter {
return state;
}
- public void setState(SheetState state) {
+ public void setState(final SheetState state) {
this.state = state;
}
@@ -152,7 +152,7 @@ public class SheetFilter {
private int min;
private int max;
- private DistanceRange(int min, int max) {
+ private DistanceRange(final int min, final int max) {
this.min = min;
this.max = max;
}
@@ -166,14 +166,14 @@ public class SheetFilter {
}
@Override
- public boolean equals(Object object) {
+ public boolean equals(final Object object) {
if (this == object) {
return true;
}
if (object == null || getClass() != object.getClass()) {
return false;
}
- DistanceRange that = (DistanceRange) object;
+ final DistanceRange that = (DistanceRange) object;
return max == that.max && min == that.min;
}
@@ -185,7 +185,7 @@ public class SheetFilter {
}
public class DistanceRangeConverter implements Converter {
- public Object getAsObject(FacesContext context, UIComponent component, String value)
+ public Object getAsObject(final FacesContext context, final UIComponent component, final String value)
throws ConverterException {
if (StringUtils.isBlank(value)) {
return distanceRangeList.get(0);
@@ -195,7 +195,7 @@ public class SheetFilter {
}
public String getAsString(
- FacesContext context, UIComponent component, Object value) throws ConverterException {
+ final FacesContext context, final UIComponent component, final Object value) throws ConverterException {
if (value == null) {
return Integer.toString(0);
} else {
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SynchronizeNavigationPhaseListener.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SynchronizeNavigationPhaseListener.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/SynchronizeNavigationPhaseListener.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SynchronizeNavigationPhaseListener.java Fri Nov 15 17:10:58 2013
@@ -30,13 +30,13 @@ import javax.faces.event.PhaseListener;
//todo @JsfPhaseListener
public class SynchronizeNavigationPhaseListener implements PhaseListener {
- public void beforePhase(PhaseEvent event) {
+ public void beforePhase(final PhaseEvent event) {
if (PhaseId.RENDER_RESPONSE.equals(event.getPhaseId())) {
synchronizeState();
}
}
- public void afterPhase(PhaseEvent event) {
+ public void afterPhase(final PhaseEvent event) {
if (PhaseId.RESTORE_VIEW.equals(event.getPhaseId())) {
synchronizeState();
}
@@ -48,12 +48,12 @@ public class SynchronizeNavigationPhaseL
private void synchronizeState() {
// synchronizing current site with
- FacesContext facesContext = FacesContext.getCurrentInstance();
- UIViewRoot viewRoot = facesContext.getViewRoot();
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final UIViewRoot viewRoot = facesContext.getViewRoot();
// in case of direct links the ViewRoot is empty after "restore view".
if (viewRoot != null && viewRoot.getChildCount() == 0) {
- String viewId = viewRoot.getViewId();
- NavigationTree navigation
+ final String viewId = viewRoot.getViewId();
+ final NavigationTree navigation
= (NavigationTree) VariableResolverUtils.resolveVariable(facesContext, "navigationTree");
navigation.gotoNode(navigation.findByViewId(viewId));
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.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/TobagoDemoController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.java Fri Nov 15 17:10:58 2013
@@ -133,7 +133,7 @@ public class TobagoDemoController implem
public TobagoDemoController() {
- String[] salutationKeys = {
+ final String[] salutationKeys = {
"salutation_unknown",
"salutation_mr",
"salutation_mrs",
@@ -169,7 +169,7 @@ public class TobagoDemoController implem
solarArrayColumnLayout = "3*; 3*; 3*";
tree = CategoryTree.createSample();
- String[] values = {"none", "single", "singleLeafOnly", "multi", "multiLeafOnly"};
+ final String[] values = {"none", "single", "singleLeafOnly", "multi", "multiLeafOnly"};
selectionItems = getSelectItems(values, "demo");
selectionType = (String) selectionItems[0].getValue();
@@ -180,12 +180,12 @@ public class TobagoDemoController implem
solar = new Solar();
- String[] toolbarIconKeys
+ final String[] toolbarIconKeys
= {UIToolBar.ICON_OFF, UIToolBar.ICON_SMALL, UIToolBar.ICON_BIG};
toolbarIconItems = getSelectItems(toolbarIconKeys, "demo");
toolbarIconSize = UIToolBar.ICON_SMALL;
- String[] toolbarTextKeys =
+ final String[] toolbarTextKeys =
{UIToolBar.LABEL_OFF, UIToolBar.LABEL_BOTTOM, UIToolBar.LABEL_RIGHT};
toolbarTextItems = getSelectItems(toolbarTextKeys, "demo");
toolbarTextPosition = UIToolBar.LABEL_BOTTOM;
@@ -198,21 +198,21 @@ public class TobagoDemoController implem
}
public boolean isJsp() {
- String viewId = FacesContext.getCurrentInstance().getViewRoot().getViewId();
- int end = viewId.lastIndexOf(".xhtml");
+ final String viewId = FacesContext.getCurrentInstance().getViewRoot().getViewId();
+ final int end = viewId.lastIndexOf(".xhtml");
return end < 0;
}
public boolean isDoubleDefined() {
- String viewId = FacesContext.getCurrentInstance().getViewRoot().getViewId();
- String name = viewId.substring(1, viewId.lastIndexOf("."));
- String path = ResourceManagerUtils.getImageWithPath(FacesContext.getCurrentInstance(), name + ".xhtml", true);
+ final String viewId = FacesContext.getCurrentInstance().getViewRoot().getViewId();
+ final String name = viewId.substring(1, viewId.lastIndexOf("."));
+ final String path = ResourceManagerUtils.getImageWithPath(FacesContext.getCurrentInstance(), name + ".xhtml", true);
return path != null;
}
public String asJsp() {
- String viewId = FacesContext.getCurrentInstance().getViewRoot().getViewId();
- int end = viewId.lastIndexOf(".xhtml");
+ final String viewId = FacesContext.getCurrentInstance().getViewRoot().getViewId();
+ final int end = viewId.lastIndexOf(".xhtml");
if (end >= 0) {
return viewId.substring(1, end) + ".jspx";
}
@@ -221,8 +221,8 @@ public class TobagoDemoController implem
}
public String asFacelet() {
- String viewId = FacesContext.getCurrentInstance().getViewRoot().getViewId();
- int end = viewId.lastIndexOf(".jspx");
+ final String viewId = FacesContext.getCurrentInstance().getViewRoot().getViewId();
+ final int end = viewId.lastIndexOf(".jspx");
if (end >= 0) {
return viewId.substring(1, end) + ".xhtml";
}
@@ -232,12 +232,12 @@ public class TobagoDemoController implem
public String resetSession() throws IOException {
LOG.info("Resetting the session.");
- FacesContext facesContext = FacesContext.getCurrentInstance();
- HttpSession session = (HttpSession) facesContext.getExternalContext().getSession(false);
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final HttpSession session = (HttpSession) facesContext.getExternalContext().getSession(false);
if (session != null) {
session.invalidate();
}
- ExternalContext externalContext = facesContext.getExternalContext();
+ final ExternalContext externalContext = facesContext.getExternalContext();
externalContext.redirect("/" + externalContext.getRequestContextPath());
facesContext.responseComplete();
return null;
@@ -248,17 +248,17 @@ public class TobagoDemoController implem
return tabChangeListener;
}
- public void setTabChangeListener(TabChangeListener tabChangeListener) {
+ public void setTabChangeListener(final TabChangeListener tabChangeListener) {
LOG.debug("Setting TabChangeListener " + tabChangeListener);
this.tabChangeListener = tabChangeListener;
}
private List<UIColumn> createSolarArrayColumns() {
- List<UIColumn> columns = new ArrayList<UIColumn>(3);
+ final List<UIColumn> columns = new ArrayList<UIColumn>(3);
- FacesContext facesContext = FacesContext.getCurrentInstance();
- UIIn in = (UIIn)
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final UIIn in = (UIIn)
CreateComponentUtils.createComponent(facesContext, UIIn.COMPONENT_TYPE, RendererTypes.IN, "sac1i");
in.setValueBinding(
Attributes.VALUE, facesContext.getApplication().createValueBinding("#{luminary.population}"));
@@ -275,11 +275,11 @@ public class TobagoDemoController implem
return columns;
}
- public static SelectItem[] getSelectItems(String[] keys, String bundle) {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- SelectItem[] items = new SelectItem[keys.length];
+ public static SelectItem[] getSelectItems(final String[] keys, final String bundle) {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final SelectItem[] items = new SelectItem[keys.length];
for (int i = 0; i < items.length; i++) {
- String label = ResourceManagerUtils.getPropertyNotNull(facesContext, bundle, keys[i]);
+ final String label = ResourceManagerUtils.getPropertyNotNull(facesContext, bundle, keys[i]);
items[i] = new SelectItem(keys[i], label);
}
return items;
@@ -302,7 +302,7 @@ public class TobagoDemoController implem
return salutation;
}
- public void setSalutation(String[] salutation) {
+ public void setSalutation(final String[] salutation) {
this.salutation = salutation;
}
@@ -310,7 +310,7 @@ public class TobagoDemoController implem
return salutationItems;
}
- public void setSalutationItems(SelectItem[] salutationItems) {
+ public void setSalutationItems(final SelectItem[] salutationItems) {
this.salutationItems = salutationItems;
}
@@ -322,7 +322,7 @@ public class TobagoDemoController implem
return boolTest;
}
- public void setBoolTest(Boolean boolTest) {
+ public void setBoolTest(final Boolean boolTest) {
this.boolTest = boolTest;
}
@@ -330,7 +330,7 @@ public class TobagoDemoController implem
return text;
}
- public void setText(String[] text) {
+ public void setText(final String[] text) {
this.text = text;
}
@@ -338,7 +338,7 @@ public class TobagoDemoController implem
return solarArray;
}
- public void setSolarArray(SolarObject[] solarArray) {
+ public void setSolarArray(final SolarObject[] solarArray) {
this.solarArray = solarArray;
}
@@ -350,10 +350,10 @@ public class TobagoDemoController implem
return solarTree;
}
- public void selectOrbit(ActionEvent event) {
- SolarObject clicked = (SolarObject) ComponentUtils.findParameter(event.getComponent(), "luminary");
+ public void selectOrbit(final ActionEvent event) {
+ final SolarObject clicked = (SolarObject) ComponentUtils.findParameter(event.getComponent(), "luminary");
boolean add = false;
- List<Integer> selectedRows = sheetState.getSelectedRows();
+ final List<Integer> selectedRows = sheetState.getSelectedRows();
for (int i = 0; i < solarList.size(); i++) {
if (clicked.getOrbit().equals(solarList.get(i).getOrbit())) {
add = !selectedRows.contains(i);
@@ -375,7 +375,7 @@ public class TobagoDemoController implem
}
- public void selectLuminary(ActionEvent actionEvent) {
+ public void selectLuminary(final ActionEvent actionEvent) {
LOG.info("actionEvent=" + actionEvent);
// final List<Integer> selectedRows = sheetState.getSelectedRows();
final UIData data = ComponentUtils.findAncestor(actionEvent.getComponent(), UIData.class);
@@ -388,7 +388,7 @@ public class TobagoDemoController implem
}
}
- public void setSolarList(List<SolarObject> solarList) {
+ public void setSolarList(final List<SolarObject> solarList) {
this.solarList = solarList;
}
@@ -396,7 +396,7 @@ public class TobagoDemoController implem
return solarArrayColumns;
}
- public void setSolarArrayColumns(List<UIColumn> solarArrayColumns) {
+ public void setSolarArrayColumns(final List<UIColumn> solarArrayColumns) {
this.solarArrayColumns = solarArrayColumns;
}
@@ -404,7 +404,7 @@ public class TobagoDemoController implem
return solarArrayColumnLayout;
}
- public void setSolarArrayColumnLayout(String solarArrayColumnLayout) {
+ public void setSolarArrayColumnLayout(final String solarArrayColumnLayout) {
this.solarArrayColumnLayout = solarArrayColumnLayout;
}
@@ -412,7 +412,7 @@ public class TobagoDemoController implem
return tree;
}
- public void setTree(DefaultMutableTreeNode tree) {
+ public void setTree(final DefaultMutableTreeNode tree) {
this.tree = tree;
}
@@ -420,7 +420,7 @@ public class TobagoDemoController implem
return showJunctions;
}
- public void setShowJunctions(boolean showJunctions) {
+ public void setShowJunctions(final boolean showJunctions) {
this.showJunctions = showJunctions;
}
@@ -428,7 +428,7 @@ public class TobagoDemoController implem
return showIcons;
}
- public void setShowIcons(boolean showIcons) {
+ public void setShowIcons(final boolean showIcons) {
this.showIcons = showIcons;
}
@@ -436,7 +436,7 @@ public class TobagoDemoController implem
return showRoot;
}
- public void setShowRoot(boolean showRoot) {
+ public void setShowRoot(final boolean showRoot) {
this.showRoot = showRoot;
}
@@ -444,7 +444,7 @@ public class TobagoDemoController implem
return showRootJunction;
}
- public void setShowRootJunction(boolean showRootJunction) {
+ public void setShowRootJunction(final boolean showRootJunction) {
this.showRootJunction = showRootJunction;
}
@@ -452,7 +452,7 @@ public class TobagoDemoController implem
return multiselect;
}
- public void setMultiselect(boolean multiselect) {
+ public void setMultiselect(final boolean multiselect) {
this.multiselect = multiselect;
}
@@ -460,7 +460,7 @@ public class TobagoDemoController implem
return selectionType;
}
- public void setSelectionType(String selectionType) {
+ public void setSelectionType(final String selectionType) {
this.selectionType = selectionType;
}
@@ -468,7 +468,7 @@ public class TobagoDemoController implem
return selectionItems;
}
- public void setSelectionItems(SelectItem[] selectionItems) {
+ public void setSelectionItems(final SelectItem[] selectionItems) {
this.selectionItems = selectionItems;
}
@@ -476,7 +476,7 @@ public class TobagoDemoController implem
return mutable;
}
- public void setMutable(boolean mutable) {
+ public void setMutable(final boolean mutable) {
this.mutable = mutable;
}
@@ -484,7 +484,7 @@ public class TobagoDemoController implem
return required;
}
- public void setRequired(boolean required) {
+ public void setRequired(final boolean required) {
this.required = required;
}
@@ -492,7 +492,7 @@ public class TobagoDemoController implem
return solar;
}
- public void setSolar(Solar solar) {
+ public void setSolar(final Solar solar) {
this.solar = solar;
}
@@ -500,7 +500,7 @@ public class TobagoDemoController implem
return date;
}
- public void setDate(Date date) {
+ public void setDate(final Date date) {
this.date = date;
}
@@ -508,7 +508,7 @@ public class TobagoDemoController implem
return tabState0;
}
- public void setTabState0(Object tabState0) {
+ public void setTabState0(final Object tabState0) {
this.tabState0 = tabState0;
}
@@ -516,7 +516,7 @@ public class TobagoDemoController implem
return tabState1;
}
- public void setTabState1(Object tabState1) {
+ public void setTabState1(final Object tabState1) {
this.tabState1 = tabState1;
}
@@ -524,7 +524,7 @@ public class TobagoDemoController implem
return tabState2;
}
- public void setTabState2(Object tabState2) {
+ public void setTabState2(final Object tabState2) {
this.tabState2 = tabState2;
}
@@ -532,7 +532,7 @@ public class TobagoDemoController implem
return tabState3;
}
- public void setTabState3(Object tabState3) {
+ public void setTabState3(final Object tabState3) {
this.tabState3 = tabState3;
}
@@ -540,7 +540,7 @@ public class TobagoDemoController implem
return sheetState;
}
- public void setSheetState(SheetState sheetState) {
+ public void setSheetState(final SheetState sheetState) {
this.sheetState = sheetState;
}
@@ -548,12 +548,13 @@ public class TobagoDemoController implem
return sheetTreeState;
}
- public void stateChangeListener(ActionEvent e) {
+ public void stateChangeListener(final ActionEvent e) {
LOG.info("SheetState has Changed: " + e);
}
- 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;
}
@@ -571,7 +572,7 @@ public class TobagoDemoController implem
return toolbarIconSize;
}
- public void setToolbarIconSize(String toolbarIconSize) {
+ public void setToolbarIconSize(final String toolbarIconSize) {
this.toolbarIconSize = toolbarIconSize;
}
@@ -583,7 +584,7 @@ public class TobagoDemoController implem
return toolbarTextPosition;
}
- public void setToolbarTextPosition(String toolbarTextPosition) {
+ public void setToolbarTextPosition(final String toolbarTextPosition) {
this.toolbarTextPosition = toolbarTextPosition;
}
@@ -591,7 +592,7 @@ public class TobagoDemoController implem
return null;
}
- public void setNull(Object o) {
+ public void setNull(final Object o) {
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TreeController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TreeController.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/TreeController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TreeController.java Fri Nov 15 17:10:58 2013
@@ -56,7 +56,7 @@ public class TreeController {
return null;
}
- public void actionListener(ActionEvent event) {
+ public void actionListener(final ActionEvent event) {
LOG.info("actionListener");
}
@@ -97,7 +97,7 @@ public class TreeController {
return tree;
}
- public void setTree(DefaultMutableTreeNode tree) {
+ public void setTree(final DefaultMutableTreeNode tree) {
this.tree = tree;
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TreeEditor.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TreeEditor.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/TreeEditor.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TreeEditor.java Fri Nov 15 17:10:58 2013
@@ -59,7 +59,7 @@ public class TreeEditor {
private DefaultMutableTreeNode findFirstSelected() {
final Enumeration enumeration = categoryTree.depthFirstEnumeration();
while (enumeration.hasMoreElements()) {
- DefaultMutableTreeNode node = (DefaultMutableTreeNode) enumeration.nextElement();
+ final DefaultMutableTreeNode node = (DefaultMutableTreeNode) enumeration.nextElement();
if (((Node) node.getUserObject()).isSelected()) {
return node;
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Upload.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Upload.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/Upload.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Upload.java Fri Nov 15 17:10:58 2013
@@ -46,7 +46,7 @@ public class Upload {
LOG.info("type=" + file.getContentType());
LOG.info("size=" + file.get().length);
String name = file.getName();
- int pos = Math.max(name.lastIndexOf('/'), name.lastIndexOf('\\'));
+ final int pos = Math.max(name.lastIndexOf('/'), name.lastIndexOf('\\'));
if (pos >= 0) {
// some old browsers send the name with path.
// modern browsers doesn't because of security reasons.
@@ -62,7 +62,7 @@ public class Upload {
return file;
}
- public void setFile(FileItem file) {
+ public void setFile(final FileItem file) {
this.file = file;
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/actionlistener/SimpleTabChangeListener.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/actionlistener/SimpleTabChangeListener.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/actionlistener/SimpleTabChangeListener.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/actionlistener/SimpleTabChangeListener.java Fri Nov 15 17:10:58 2013
@@ -32,7 +32,7 @@ public class SimpleTabChangeListener imp
LOG.info("new SimpleTabChangeListener id='" + System.identityHashCode(this) + "'");
}
- public void processTabChange(TabChangeEvent tabChangeEvent) {
+ public void processTabChange(final TabChangeEvent tabChangeEvent) {
LOG.info("TabState has changed: from tabIndex '" + tabChangeEvent.getOldTabIndex()
+ "' to tabIndex '" + tabChangeEvent.getNewTabIndex()
+ "' id='" + tabChangeEvent.getComponent().getClientId() + "'");
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/BestPracticeController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/BestPracticeController.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/bestpractice/BestPracticeController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/BestPracticeController.java Fri Nov 15 17:10:58 2013
@@ -47,9 +47,9 @@ public class BestPracticeController {
return viewPdf(true);
}
- private String viewPdf(boolean outside) {
+ private String viewPdf(final boolean outside) {
- FacesContext facesContext = FacesContext.getCurrentInstance();
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
InputStream inputStream = null;
try {
@@ -57,13 +57,13 @@ public class BestPracticeController {
if (inputStream == null) {
inputStream = facesContext.getExternalContext().getResourceAsStream("/content/12/03/x-sample.pdf");
}
- HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();
+ final HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();
response.setContentType("application/pdf");
if (outside) {
response.setHeader("Content-Disposition", "attachment; filename=x-sample.pdf");
}
IOUtils.copy(inputStream, response.getOutputStream());
- } catch (IOException e) {
+ } catch (final IOException e) {
LOG.warn("Cannot deliver pdf", e);
return "error"; // response via faces
} finally {
@@ -77,7 +77,7 @@ public class BestPracticeController {
return status;
}
- public void setStatus(String status) {
+ public void setStatus(final String status) {
this.status = status;
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/ToolBarCustomizer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/ToolBarCustomizer.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/bestpractice/ToolBarCustomizer.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/ToolBarCustomizer.java Fri Nov 15 17:10:58 2013
@@ -47,18 +47,18 @@ public class ToolBarCustomizer {
return null;
}
- public void itemUp(ActionEvent event) {
- Item item = (Item) ((UIParameter) event.getComponent().getChildren().get(0)).getValue();
- int oldIndex = list.indexOf(item);
+ public void itemUp(final ActionEvent event) {
+ final Item item = (Item) ((UIParameter) event.getComponent().getChildren().get(0)).getValue();
+ final int oldIndex = list.indexOf(item);
if (oldIndex > 0) {
list.remove(item);
list.add(oldIndex - 1, item);
}
}
- public void itemDown(ActionEvent event) {
- Item item = (Item) ((UIParameter) event.getComponent().getChildren().get(0)).getValue();
- int oldIndex = list.indexOf(item);
+ public void itemDown(final ActionEvent event) {
+ final Item item = (Item) ((UIParameter) event.getComponent().getChildren().get(0)).getValue();
+ final int oldIndex = list.indexOf(item);
if (oldIndex < list.size()) {
list.remove(item);
list.add(oldIndex + 1, item);
@@ -76,7 +76,7 @@ public class ToolBarCustomizer {
private boolean visible = true;
- private Item(String label) {
+ private Item(final String label) {
this.label = label;
this.name = "tool-bar-item-" + label.toLowerCase(Locale.ENGLISH) + ".xhtml";
}
@@ -93,7 +93,7 @@ public class ToolBarCustomizer {
return visible;
}
- public void setVisible(boolean visible) {
+ public void setVisible(final boolean visible) {
this.visible = visible;
}
}
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/TransitionController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/TransitionController.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/bestpractice/TransitionController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/TransitionController.java Fri Nov 15 17:10:58 2013
@@ -27,7 +27,7 @@ public class TransitionController {
private static final Logger LOG = LoggerFactory.getLogger(TransitionController.class);
public String sleep5s() throws InterruptedException {
- int sleep = 5000;
+ final int sleep = 5000;
LOG.info("Waiting " + sleep + " millis.");
Thread.sleep(sleep);