Changed to the new exceptions.

This commit is contained in:
Ulrik Sandberg
2007-01-14 19:41:44 +00:00
parent 1a58e1086b
commit 2fa080e5ba
2 changed files with 4 additions and 4 deletions

View File

@@ -8,9 +8,9 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.ldap.NameNotFoundException;
import org.springframework.ldap.samples.person.domain.Group;
import org.springframework.ldap.samples.person.domain.SearchCriteria;
import org.springframework.ldap.support.EntryNotFoundException;
public class DummyGroupDao implements GroupDao {
private static Map GROUPS;
@@ -54,7 +54,7 @@ public class DummyGroupDao implements GroupDao {
if (GROUPS.get(name) != null) {
return (Group) GROUPS.get(name);
} else {
throw new EntryNotFoundException("Could not find group with name '"
throw new NameNotFoundException("Could not find group with name '"
+ name + "'");
}
}

View File

@@ -8,9 +8,9 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.ldap.NameNotFoundException;
import org.springframework.ldap.samples.person.domain.Person;
import org.springframework.ldap.samples.person.domain.SearchCriteria;
import org.springframework.ldap.support.EntryNotFoundException;
public class DummyPersonDao implements PersonDao {
private static Map PERSONS;
@@ -67,7 +67,7 @@ public class DummyPersonDao implements PersonDao {
if (PERSONS.get(fullname) != null) {
return (Person) PERSONS.get(fullname);
} else {
throw new EntryNotFoundException(
throw new NameNotFoundException(
"Could not find person with name '" + fullname + "'");
}
}