The following document contains the results of PMD's CPD 5.3.5.

Duplications

File Line
org/woehlke/simpleworklist/control/TaskController.java 327
org/woehlke/simpleworklist/control/TaskController.java 363
            taskService.setFocus(task, userAccount);
            if(back != null && back.contentEquals("project")){
                if(task.getProject() != null) {
                    return "redirect:/project/" + task.getProject().getId();
                } else {
                    return "redirect:/project/0";
                }
            }
            switch (task.getTaskState()) {
                case TODAY:
                    return "redirect:/tasks/today";
                case NEXT:
                    return "redirect:/tasks/next";
                case WAITING:
                    return "redirect:/tasks/waiting";
                case SCHEDULED:
                    return "redirect:/tasks/scheduled";
                case SOMEDAY:
                    return "redirect:/tasks/someday";
                case COMPLETED:
                    return "redirect:/tasks/completed";
                default:
                    return "redirect:/tasks/inbox";
            }
        } else {
            return "redirect:/tasks/inbox";
        }
    }

    @RequestMapping(value = "/task/unsetfocus/{taskId}", method = RequestMethod.GET)
File Line
org/woehlke/simpleworklist/control/TaskStateController.java 49
org/woehlke/simpleworklist/control/TaskStateController.java 75
org/woehlke/simpleworklist/control/TaskStateController.java 101
org/woehlke/simpleworklist/control/TaskStateController.java 127
org/woehlke/simpleworklist/control/TaskStateController.java 153
org/woehlke/simpleworklist/control/TaskStateController.java 179
org/woehlke/simpleworklist/control/TaskStateController.java 205
org/woehlke/simpleworklist/control/TaskStateController.java 231
            taskPage = taskStateService.getInbox(thisUser, context, request);
        }
        int current = taskPage.getNumber() + 1;
        int begin = Math.max(1, current - 5);
        int end = Math.min(begin + 10, taskPage.getTotalPages());
        model.addAttribute("beginIndex", begin);
        model.addAttribute("endIndex", end);
        model.addAttribute("currentIndex", current);
        model.addAttribute("dataList", taskPage.getContent());
        model.addAttribute("totalPages", taskPage.getTotalPages());
        model.addAttribute("focustype", "Inbox");

Back to top

Reflow Maven skin by Andrius Velykis.