Mercurial > hg > Database > Christie
changeset 70:dcf906f7ff41
update DataGear runnable superclass
author | akahori |
---|---|
date | Sat, 01 Sep 2018 09:58:33 +0900 |
parents | 251e306094d4 |
children | 36c5c050394d |
files | src/main/java/christie/datagear/dg/DataGear.java |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/christie/datagear/dg/DataGear.java Sat Sep 01 08:10:55 2018 +0900 +++ b/src/main/java/christie/datagear/dg/DataGear.java Sat Sep 01 09:58:33 2018 +0900 @@ -23,7 +23,9 @@ public void setData(T data) { - if (data.getClass() == this.clazz){ + Class dataClazz = data.getClass(); + if (dataClazz == this.clazz || + dataClazz.getSuperclass() == this.clazz){ this.data = data; } }