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 2022/08/04 12:55:53 UTC
[myfaces-tobago] branch main updated: Main checkstyle (#3049)
This is an automated email from the ASF dual-hosted git repository.
lofwyr pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
The following commit(s) were added to refs/heads/main by this push:
new d7ad33e452 Main checkstyle (#3049)
d7ad33e452 is described below
commit d7ad33e45236f9a00a535dd63b56cc678fd19cc3
Author: Udo Schnurpfeil <gi...@schnurpfeil.de>
AuthorDate: Thu Aug 4 14:55:48 2022 +0200
Main checkstyle (#3049)
* checkstyle
* Update NavigationTree.java
Co-authored-by: Udo Schnurpfeil <ud...@irian.eu>
---
.../org/apache/myfaces/tobago/example/demo/NavigationTree.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationTree.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationTree.java
index df218d108f..7eb7c205df 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationTree.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/NavigationTree.java
@@ -71,10 +71,9 @@ public class NavigationTree implements Serializable {
final List<NavigationNode> nodes = new ArrayList<>();
- final List<String> listWar = locateResourcesInWar(servletContext, "/content", new ArrayList<>());
+ final List<String> listWar = locateResourcesInWar("/content", new ArrayList<>());
addToResult(listWar, nodes);
-
final List<String> listClasspath = getResourcesFromClasspath();
addToResult(listClasspath, nodes);
@@ -106,8 +105,7 @@ public class NavigationTree implements Serializable {
}
}
- protected List<String> locateResourcesInWar(
- final ServletContext servletContext, final String directory, final List<String> result) {
+ protected List<String> locateResourcesInWar(final String directory, final List<String> result) {
final Set<String> resourcePaths = servletContext.getResourcePaths(directory);
@@ -118,7 +116,7 @@ public class NavigationTree implements Serializable {
if (path.endsWith("/") // is directory
|| path.lastIndexOf('.') < path.lastIndexOf('/')) { // quarkus has no '/' at the end of a dir.
- locateResourcesInWar(servletContext, path.substring(path.indexOf("/content")), result);
+ locateResourcesInWar(path.substring(path.indexOf("/content")), result);
continue;
}