package com.rollbar.notifier.util;

import java.io.Closeable;
import java.io.IOException;
import java.util.Arrays;

/**
 * Helper class that provides Java 7 features.
 */
public class ObjectsUtils {
	
	public static boolean equals(Object object1, Object object2) {
		return object1 == object2 || object1 != null && object1.equals(object2);
	}
	
	public static int hash(Object... objects) {
		return Arrays.hashCode(objects);
	}
	
	public static <T> T requireNonNull(T object, String errorMessage) {
		if (object == null) {
			throw new NullPointerException(errorMessage);
		} else {
			return object;
		}
	}
	
	public static void close(final Closeable closeable) {
		try {
			if (closeable != null) {
				closeable.close();
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}

@@ -29,16 +29,74 @@
 .util;%0A%0A
+import org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0A
 import j
@@ -252,16 +252,95 @@
 ils %7B%0A%09%0A
+%09private static Logger logger = LoggerFactory.getLogger(ObjectsUtils.class);%0A%09%0A
 %09public 
@@ -894,26 +894,49 @@
 %0A%09%09%09
-e.printStackTrace(
+logger.error(%22Unable to close stream.%22, e
 );%0A%09
@@ -942,9 +942,8 @@
 %09%09%7D%0A%09%7D%0A%7D
-%0A

use a Logger for exceptions logging