Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-JSR-5
-
Fix Version/s: 1.0-JSR-6
-
Component/s: class generator
-
Labels:None
-
Environment:WindowsXP/SP2 + jdk1.5.0_05
-
Number of attachments :
Description
The following program does not generate error:
class Person {
@Property String firstName
@Property String lastName
@Property int id
String toString() {"${firstName} ${lastName} has id ${id}"}
}
interface PersonService {
Person[] getPersons()
Person findPerson( int id)
}
class PersonServiceImpl implements PersonService {
private List persons = new ArrayList()
PersonServiceImpl() { persons = [ new Person(firstName:"Guillaume", lastName:"Laforge", id:0), new Person(firstName:"Jochen", lastName:"Theodorou", id:1), new Person(firstName:"Dierk", lastName:"Koenig", id:2)] }
Person findPerson(int id) { return persons[id] }
}
Class[] ati = PersonServiceImpl.class.getInterfaces()
ati.each{println "-> $it" }
println PersonServiceImpl.name
ps = new PersonServiceImpl()
println ps.findPerson(2)
looks like the vm does not enforce you to make a class abstract if you don't implement all methods form the interface... Anyway, it should be fixed now