
com.na.jira.api.Dto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jira-dtos Show documentation
Show all versions of jira-dtos Show documentation
Common artifacts, mostly DTOs shared between jira plug-in and the REST service.
The newest version!
package com.na.jira.api;
import java.lang.reflect.Field;
public class Dto {
/**
* Jackson 1.8 deserializes empty Collection into
* Collection with one element X with all attributes nulled. So there is a
* need to filter such elements.
*/
public boolean isNulled() {
for (Field f : this.getClass().getDeclaredFields()) {
try {
if (f.get(this) != null) {
return false;
}
} catch (IllegalArgumentException e) {
throw new RuntimeException(e);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
}
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy