com.softicar.platform.common.core.utils.DevNull Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of platform-common Show documentation
Show all versions of platform-common Show documentation
The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.
package com.softicar.platform.common.core.utils;
/**
* Simple class to ignore values and prevent unnecessary warnings.
*
* When writing tests, it is sometimes necessary to instantiate new objects
* without using them, e.g. when testing that a constructor throws a desired
* exception.
*
* @author Oliver Richers
*/
public class DevNull {
/**
* Swallows and returns the given object.
*
* The return value can be ignored.
*
* @param object
* the object to swallow
* @return the given object
*/
public static T swallow(T object) {
return object;
}
}