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:
Frederic Debuire
2008-02-13 14:29:30 +00:00
parent 72892d3c21
commit 305696e066
7 changed files with 34 additions and 20 deletions

View File

@@ -9,10 +9,8 @@ import javax.naming.NamingException;
import org.yacos.core.article.Article;
import org.yacos.core.article.IArticleManager;
import org.yacos.core.article.Preference.PreferenceType;
import org.yacos.core.conferences.Conference;
import org.yacos.core.conferences.IConferenceManager;
import org.yacos.core.evaluation.Criterion;
import org.yacos.core.evaluation.IEvaluationManager;
import org.yacos.core.exceptions.ConferenceDoesntExistException;
import org.yacos.core.exceptions.PKAlreadyUsedException;
@@ -60,7 +58,10 @@ public class Filler {
// Add role for users
// 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
cm.addRole(RoleType.CHAIRMAN, chairman.getLogin(), conf.getId());
cm.addRole(RoleType.PCMEMBER, chairman.getLogin(), conf.getId());
@@ -98,17 +99,12 @@ public class Filler {
// ajout de critere
Criterion c;
c = em.addCriterion("Les schtroumpfs sont-ils bons ?", 1, 5, 1);
c = em.addCriterion("Les gaulois sont-ils fous ?", 1, 4, 1);
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);
em.addCriterion("Les schtroumpfs sont-ils bons ?", 1, 5, 1);
em.addCriterion("Les gaulois sont-ils fous ?", 1, 4, 1);
em.addCriterion("Un nain est-il vraiment petit ?", 1, 5, 2);
em.addCriterion("Un chien peut-il se transformer en chat ?", 1, 4, 2);
System.out.println("--> FIN OK");
}
}

View File

@@ -1,7 +1,10 @@
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.Date;

View File

@@ -1,6 +1,9 @@
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.List;
@@ -9,7 +12,6 @@ import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

View File

@@ -1,9 +1,12 @@
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.Date;
import java.util.List;
import javax.naming.Context;
@@ -16,7 +19,6 @@ import org.junit.BeforeClass;
import org.junit.Test;
import org.yacos.core.article.Article;
import org.yacos.core.article.IArticleManager;
import org.yacos.core.conferences.Conference;
import org.yacos.core.conferences.IConferenceManager;
import org.yacos.core.evaluation.Criterion;
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.users.IUserManager;
@SuppressWarnings("unused")
public class EvaluationManagerTest {
private static IEvaluationManager em;

View File

@@ -4,10 +4,14 @@
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.List;
import javax.naming.Context;
import javax.naming.InitialContext;

View File

@@ -110,6 +110,7 @@ public class UserManagerTest {
@Test
public void getUserByRoleType(){
@SuppressWarnings("unused")
Role role = cm.addRole(RoleType.PCMEMBER, "truc", conf_id);
List<User> list = um.getUsers(conf_id,RoleType.PCMEMBER);
assertFalse(list.isEmpty());

View File

@@ -1,6 +1,11 @@
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.List;