Mercurial > hg > Database > Christie
changeset 11:4e5f6db22033
minor change
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 30 Dec 2017 20:11:36 +0900 |
parents | 4b608ce0c483 |
children | b49a926cbdd9 |
files | src/main/java/christie/codegear/CodeGear.java |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/christie/codegear/CodeGear.java Sat Dec 30 18:30:04 2017 +0900 +++ b/src/main/java/christie/codegear/CodeGear.java Sat Dec 30 20:11:36 2017 +0900 @@ -47,6 +47,7 @@ } public void checkAndSetCommand(Field field, String name){ + if (!field.getName().equals(name)){ throw new IllegalArgumentException("key and DataGearName do not match"); } @@ -58,6 +59,10 @@ e.printStackTrace(); } + if (dg.getClazz() == null){ + throw new NullPointerException("please initialize DataGear"); + } + commandList.add(new Command(this, dg, "local", name, CommandType.TAKE)); } }