petite modif
This commit is contained in:
parent
2058bf5b19
commit
e98bf1436a
@ -38,7 +38,7 @@ public class AbstractChangementFactoryNP implements AbstractChangementFactory {
|
||||
// la méthode value() d'un hashmap retourne la collection des valeurs.
|
||||
// Il faut transformer la collection en Set.
|
||||
// Un constructeur de HashSet permet de faire cette opération.
|
||||
Set<Changement> out = new HashSet(this.brain.values());
|
||||
Set<Changement> out = new HashSet<Changement>(this.brain.values());
|
||||
return out;
|
||||
}
|
||||
|
||||
|
@ -115,20 +115,25 @@ public class Connexion extends JOptionPane{
|
||||
}
|
||||
if(choose==User.ROOT){
|
||||
if(password.getText().equals("root")){
|
||||
fenetre.dispose();
|
||||
return User.ROOT;
|
||||
}
|
||||
}
|
||||
if(choose==User.PROF){
|
||||
if(password.getText().equals("prof")){
|
||||
fenetre.dispose();
|
||||
return User.PROF;
|
||||
}
|
||||
}
|
||||
if(choose==User.ETUDIANT){
|
||||
if(password.getText().equals("etuiutsen")){
|
||||
fenetre.dispose();
|
||||
return User.ETUDIANT;
|
||||
}
|
||||
}
|
||||
return Connexion.retry(choose, fenetre);
|
||||
User ret=Connexion.retry(choose, fenetre);
|
||||
fenetre.dispose();
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static int Persistant(){
|
||||
@ -144,9 +149,11 @@ public class Connexion extends JOptionPane{
|
||||
return 0;
|
||||
}
|
||||
if(result.equals(value[0])){
|
||||
fenetre.dispose();
|
||||
return 1;
|
||||
}
|
||||
if(result.equals(value[1])){
|
||||
fenetre.dispose();
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user