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 2020/06/11 07:26:53 UTC
[myfaces-tobago] branch tobago-4.x updated: lint
This is an automated email from the ASF dual-hosted git repository.
lofwyr pushed a commit to branch tobago-4.x
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
The following commit(s) were added to refs/heads/tobago-4.x by this push:
new 8446355 lint
8446355 is described below
commit 84463550ced4cdd7c4b6d8d0a8d01300e3533a65
Author: Udo Schnurpfeil <ud...@irian.eu>
AuthorDate: Thu Jun 11 09:25:31 2020 +0200
lint
(cherry picked from commit 263c9a421f324a913ed0c0d0d90b65e7e68656c2)
---
.../org/apache/myfaces/tobago/example/demo/CantorInterval.java | 6 +++---
.../org/apache/myfaces/tobago/example/demo/EventController.java | 7 ++++---
.../org/apache/myfaces/tobago/example/demo/NavigationNode.java | 5 ++---
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/CantorInterval.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/CantorInterval.java
index 49aeb6b..e9c8b26 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/CantorInterval.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/CantorInterval.java
@@ -31,8 +31,8 @@ import java.util.Enumeration;
*/
public class CantorInterval extends DefaultMutableTreeNode {
- private Fraction begin;
- private Fraction end;
+ private final Fraction begin;
+ private final Fraction end;
private boolean initialized;
public CantorInterval() {
@@ -72,7 +72,7 @@ public class CantorInterval extends DefaultMutableTreeNode {
}
@Override
- public Enumeration children() {
+ public Enumeration<TreeNode> children() {
init();
return super.children();
}
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/EventController.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/EventController.java
index 5aee1de..e467fbf 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/EventController.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/EventController.java
@@ -94,14 +94,14 @@ import java.util.TreeSet;
@Named
public class EventController implements Serializable {
- private List<EventsOnComponent> eventsOnComponents = new ArrayList<>();
+ private final List<EventsOnComponent> eventsOnComponents = new ArrayList<>();
private EventsOnComponent selectedComponent;
private String eventName;
private int action = 0;
private int actionListener = 0;
private int ajaxListener = 0;
private int valueChangeListener = 0;
- private List<SolarObject> planets = new ArrayList<>();
+ private final List<SolarObject> planets = new ArrayList<>();
public EventController() {
eventsOnComponents.add(new EventsOnComponent(new UIBar()));
@@ -235,7 +235,7 @@ public class EventController implements Serializable {
return planets;
}
- public class EventsOnComponent implements Serializable {
+ public static class EventsOnComponent implements Serializable {
private final String tagName;
private final Collection<String> eventNames = new TreeSet<>();
@@ -315,6 +315,7 @@ public class EventController implements Serializable {
for (final CommonEvent commonEvent : CommonEvent.values()) {
if (name.equals(commonEvent.name())) {
isSpecialEvent = false;
+ break;
}
}
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationNode.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationNode.java
index 4e385d0..616f5da 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationNode.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationNode.java
@@ -28,7 +28,7 @@ import javax.swing.tree.DefaultMutableTreeNode;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-public class NavigationNode extends DefaultMutableTreeNode implements Comparable {
+public class NavigationNode extends DefaultMutableTreeNode implements Comparable<NavigationNode> {
private static final Logger LOG = LoggerFactory.getLogger(NavigationNode.class);
@@ -65,8 +65,7 @@ public class NavigationNode extends DefaultMutableTreeNode implements Comparable
}
@Override
- public int compareTo(final Object o) {
- final NavigationNode other = (NavigationNode) o;
+ public int compareTo(final NavigationNode other) {
return branch.compareTo(other.getBranch());
}