Policy failures:
Code warning - failed on resource DispatchArticleController.java. Reason: The local variable article is never read, line 5 Override reason: r
This commit is contained in:
@@ -33,20 +33,20 @@ public class DispatchArticleController extends SimpleFormController{
|
||||
|
||||
protected Object formBackingObject(HttpServletRequest request) {
|
||||
logger.info("Returning dispatcher view");
|
||||
/*test temporaire !!!!*/
|
||||
/*test temporaire !!!!
|
||||
Article a = new Article(1,"title1","topic","url","autor",new ArrayList(),1);
|
||||
Article a2 = new Article(2,"title2","topic","url","autor",new ArrayList(),1);
|
||||
Collection<Article> articles = new ArrayList<Article>();
|
||||
articles.add(a);
|
||||
articles.add(a2);
|
||||
articles.add(a2);*/
|
||||
User m = new User("max","max","maxime","dagnicourt","ipint","m@truc.fr",new ArrayList<Role>());
|
||||
User m2 = new User("bob","bob","bob","dupont","lifl","b@bb.fr",new ArrayList<Role>());
|
||||
Collection<User> members = new ArrayList<User>();
|
||||
members.add(m);
|
||||
members.add(m2);
|
||||
request.getSession().setAttribute("members",members);
|
||||
request.getSession().setAttribute("articles",articles);
|
||||
/*fin de test*/
|
||||
request.getSession().setAttribute("articles",articleManager.getArticles());
|
||||
logger.info(articleManager.getArticles());
|
||||
return new FormDispatcher();
|
||||
}
|
||||
|
||||
@@ -56,48 +56,17 @@ public class DispatchArticleController extends SimpleFormController{
|
||||
|
||||
FormDispatcher fd = (FormDispatcher)formDispatcher;
|
||||
Article article = articleManager.getArticle(fd.getIdArticle());
|
||||
|
||||
|
||||
/*test temporaire !!!!*/
|
||||
Article a = new Article(1,"title1","topic","url","autor",new ArrayList(),1);
|
||||
Article a2 = new Article(2,"title2","topic","url","autor",new ArrayList(),1);
|
||||
Collection<Article> articles = new ArrayList<Article>();
|
||||
articles.add(a);
|
||||
articles.add(a2);
|
||||
User m = new User("max","max","maxime","dagnicourt","ipint","m@truc.fr",new ArrayList<Role>());
|
||||
User m2 = new User("bob","bob","bob","dupont","lifl","b@bb.fr",new ArrayList<Role>());
|
||||
User m = new User("bob","bob","maurice","dupont","lifl","b@bb.fr",new ArrayList<Role>());
|
||||
User m2 = new User("max","max","maxime","dagnicourt","ipint","m@truc.fr",new ArrayList<Role>());
|
||||
//article.assignToPCMember(m);
|
||||
Collection<User> members = new ArrayList<User>();
|
||||
members.add(m);
|
||||
members.add(m2);
|
||||
|
||||
request.getSession().setAttribute("members",members);
|
||||
/*fin de test*/
|
||||
|
||||
return new ModelAndView("dispatchArticle", "articles", articles);
|
||||
return new ModelAndView("dispatchArticle", "articles", articleManager.getArticles());
|
||||
}
|
||||
|
||||
/*public ModelAndView handleRequest(HttpServletRequest arg0,
|
||||
HttpServletResponse arg1) throws Exception {
|
||||
Date date = new Date();
|
||||
//Conference conf = new Conference(1,"lalal","lalala","lalala",date,date,date,date,date);
|
||||
//conferenceManager.addConference(conf);
|
||||
//conf = conferenceManager.getConference(1);
|
||||
|
||||
Article a = new Article(1,"title1","topic","url","autor",new ArrayList(),1);
|
||||
Article a2 = new Article(1,"title2","topic","url","autor",new ArrayList(),1);
|
||||
Collection<Article> articles = new ArrayList<Article>();
|
||||
articles.add(a);
|
||||
articles.add(a2);
|
||||
//conf.setArticles(articles);
|
||||
//logger.info(conferenceManager.getConference(1).getArticles());
|
||||
//articles = conferenceManager.getArticles(1);
|
||||
User m = new User("max","max","maxime","dagnicourt","ipint","m@truc.fr",new ArrayList<Role>());
|
||||
User m2 = new User("bob","bob","bob","dupont","lifl","b@bb.fr",new ArrayList<Role>());
|
||||
Collection<User> members = new ArrayList<User>();
|
||||
members.add(m);
|
||||
members.add(m2);
|
||||
arg0.getSession().setAttribute("members",members);
|
||||
return new ModelAndView("dispatchArticle","articles",articles);
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user