Small refactoring

This commit is contained in:
Ziver Koc 2016-01-10 03:25:09 +01:00
parent 58051dc0f2
commit 1bc3b03b8d

View file

@ -208,8 +208,6 @@ public class Configurator<T> {
* {@link #applyConfiguration()} needs to be called
*/
public void setValue(String v){
if(obj == null)
return;
switch(type){
case STRING:
value = v; break;
@ -221,7 +219,8 @@ public class Configurator<T> {
}
protected void apply() throws IllegalAccessException {
field.set(obj, value);
if(obj != null)
field.set(obj, value);
}