Remove of unused imports
Policy failures: Code warning - failed on resource DispatchArticleController.java. Reason: The local variable article is never read, line 5 Override reason: yu
This commit is contained in:
@@ -9,10 +9,8 @@ import javax.naming.NamingException;
|
|||||||
|
|
||||||
import org.yacos.core.article.Article;
|
import org.yacos.core.article.Article;
|
||||||
import org.yacos.core.article.IArticleManager;
|
import org.yacos.core.article.IArticleManager;
|
||||||
import org.yacos.core.article.Preference.PreferenceType;
|
|
||||||
import org.yacos.core.conferences.Conference;
|
import org.yacos.core.conferences.Conference;
|
||||||
import org.yacos.core.conferences.IConferenceManager;
|
import org.yacos.core.conferences.IConferenceManager;
|
||||||
import org.yacos.core.evaluation.Criterion;
|
|
||||||
import org.yacos.core.evaluation.IEvaluationManager;
|
import org.yacos.core.evaluation.IEvaluationManager;
|
||||||
import org.yacos.core.exceptions.ConferenceDoesntExistException;
|
import org.yacos.core.exceptions.ConferenceDoesntExistException;
|
||||||
import org.yacos.core.exceptions.PKAlreadyUsedException;
|
import org.yacos.core.exceptions.PKAlreadyUsedException;
|
||||||
@@ -60,7 +58,10 @@ public class Filler {
|
|||||||
// Add role for users
|
// Add role for users
|
||||||
|
|
||||||
// admin
|
// admin
|
||||||
|
cm.addRole(RoleType.CHAIRMAN, admin.getLogin(), conf.getId());
|
||||||
|
cm.addRole(RoleType.PCMEMBER, admin.getLogin(), conf.getId());
|
||||||
|
cm.addRole(RoleType.REFEREE, admin.getLogin(), conf.getId());
|
||||||
|
cm.addRole(RoleType.AUTHOR, admin.getLogin(), conf.getId());
|
||||||
// chairman
|
// chairman
|
||||||
cm.addRole(RoleType.CHAIRMAN, chairman.getLogin(), conf.getId());
|
cm.addRole(RoleType.CHAIRMAN, chairman.getLogin(), conf.getId());
|
||||||
cm.addRole(RoleType.PCMEMBER, chairman.getLogin(), conf.getId());
|
cm.addRole(RoleType.PCMEMBER, chairman.getLogin(), conf.getId());
|
||||||
@@ -98,17 +99,12 @@ public class Filler {
|
|||||||
|
|
||||||
// ajout de critere
|
// ajout de critere
|
||||||
|
|
||||||
Criterion c;
|
em.addCriterion("Les schtroumpfs sont-ils bons ?", 1, 5, 1);
|
||||||
|
em.addCriterion("Les gaulois sont-ils fous ?", 1, 4, 1);
|
||||||
c = em.addCriterion("Les schtroumpfs sont-ils bons ?", 1, 5, 1);
|
em.addCriterion("Un nain est-il vraiment petit ?", 1, 5, 2);
|
||||||
c = em.addCriterion("Les gaulois sont-ils fous ?", 1, 4, 1);
|
em.addCriterion("Un chien peut-il se transformer en chat ?", 1, 4, 2);
|
||||||
c = em.addCriterion("Un nain est-il vraiment petit ?", 1, 5, 2);
|
|
||||||
c = em.addCriterion("Un chien peut-il se transformer en chat ?", 1, 4, 2);
|
|
||||||
|
|
||||||
|
|
||||||
System.out.println("--> FIN OK");
|
System.out.println("--> FIN OK");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
package org.yacos.tests.core;
|
package org.yacos.tests.core;
|
||||||
|
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertFalse;
|
||||||
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package org.yacos.tests.core;
|
package org.yacos.tests.core;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertFalse;
|
||||||
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -9,7 +12,6 @@ import javax.naming.Context;
|
|||||||
import javax.naming.InitialContext;
|
import javax.naming.InitialContext;
|
||||||
import javax.naming.NamingException;
|
import javax.naming.NamingException;
|
||||||
|
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
package org.yacos.tests.core;
|
package org.yacos.tests.core;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertFalse;
|
||||||
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.naming.Context;
|
import javax.naming.Context;
|
||||||
@@ -16,7 +19,6 @@ import org.junit.BeforeClass;
|
|||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.yacos.core.article.Article;
|
import org.yacos.core.article.Article;
|
||||||
import org.yacos.core.article.IArticleManager;
|
import org.yacos.core.article.IArticleManager;
|
||||||
import org.yacos.core.conferences.Conference;
|
|
||||||
import org.yacos.core.conferences.IConferenceManager;
|
import org.yacos.core.conferences.IConferenceManager;
|
||||||
import org.yacos.core.evaluation.Criterion;
|
import org.yacos.core.evaluation.Criterion;
|
||||||
import org.yacos.core.evaluation.IEvaluationManager;
|
import org.yacos.core.evaluation.IEvaluationManager;
|
||||||
@@ -25,6 +27,7 @@ import org.yacos.core.evaluation.Report;
|
|||||||
import org.yacos.core.exceptions.PKAlreadyUsedException;
|
import org.yacos.core.exceptions.PKAlreadyUsedException;
|
||||||
import org.yacos.core.users.IUserManager;
|
import org.yacos.core.users.IUserManager;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public class EvaluationManagerTest {
|
public class EvaluationManagerTest {
|
||||||
|
|
||||||
private static IEvaluationManager em;
|
private static IEvaluationManager em;
|
||||||
|
|||||||
@@ -4,10 +4,14 @@
|
|||||||
package org.yacos.tests.core;
|
package org.yacos.tests.core;
|
||||||
|
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.naming.Context;
|
import javax.naming.Context;
|
||||||
import javax.naming.InitialContext;
|
import javax.naming.InitialContext;
|
||||||
|
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ public class UserManagerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getUserByRoleType(){
|
public void getUserByRoleType(){
|
||||||
|
@SuppressWarnings("unused")
|
||||||
Role role = cm.addRole(RoleType.PCMEMBER, "truc", conf_id);
|
Role role = cm.addRole(RoleType.PCMEMBER, "truc", conf_id);
|
||||||
List<User> list = um.getUsers(conf_id,RoleType.PCMEMBER);
|
List<User> list = um.getUsers(conf_id,RoleType.PCMEMBER);
|
||||||
assertFalse(list.isEmpty());
|
assertFalse(list.isEmpty());
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
package org.yacos.tests.core;
|
package org.yacos.tests.core;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user