All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.na.jira.api.Dto Maven / Gradle / Ivy

Go to download

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