Skip to content

Commit 8fa4cad

Browse files
author
Vladimir Kotal
committed
fix comments
1 parent 4dd83a6 commit 8fa4cad

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/web/PageConfig.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -911,17 +911,13 @@ protected SortedSet<String> getRequestedProjects(
911911
return projectNames;
912912
}
913913

914-
/**
915-
* Use a project determined directly from the URL
916-
*/
914+
// Use a project determined directly from the URL
917915
if (getProject() != null && getProject().isIndexed()) {
918916
projectNames.add(getProject().getName());
919917
return projectNames;
920918
}
921919

922-
/**
923-
* Use a project if the application has only single project.
924-
*/
920+
// Use a project if there is just a single project.
925921
if (projects.size() == 1) {
926922
Project p = projects.get(0);
927923
if (p.isIndexed() && authFramework.isAllowed(req, p)) {
@@ -930,9 +926,7 @@ protected SortedSet<String> getRequestedProjects(
930926
return projectNames;
931927
}
932928

933-
/**
934-
* Add all projects which match the project parameter name values
935-
*/
929+
// Add all projects which match the project parameter name values/
936930
List<String> names = getParamVals(projectParamName);
937931
for (String projectName : names) {
938932
Project project = Project.getByName(projectName);
@@ -941,9 +935,7 @@ protected SortedSet<String> getRequestedProjects(
941935
}
942936
}
943937

944-
/**
945-
* Add all projects which are part of a group that matches the group parameter name
946-
*/
938+
// Add all projects which are part of a group that matches the group parameter name.
947939
names = getParamVals(groupParamName);
948940
for (String groupName : names) {
949941
Group group = Group.getByName(groupName);
@@ -956,6 +948,7 @@ protected SortedSet<String> getRequestedProjects(
956948
}
957949
}
958950

951+
// Add projects based on cookie.
959952
if (projectNames.isEmpty()) {
960953
List<String> cookies = getCookieVals(cookieName);
961954
for (String s : cookies) {
@@ -966,6 +959,7 @@ protected SortedSet<String> getRequestedProjects(
966959
}
967960
}
968961

962+
// Add default projects.
969963
if (projectNames.isEmpty()) {
970964
Set<Project> defaultProjects = env.getDefaultProjects();
971965
if (defaultProjects != null) {

0 commit comments

Comments
 (0)