package com.rollbar.notifier.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

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

/**
 * Helper class that provides Java 7 features.
 */
public class ObjectsUtils {
	
	private static Logger logger = LoggerFactory.getLogger(ObjectsUtils.class);
	
	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) {
			logger.error("Unable to close stream.", e);
		}
	}
}
@@ -252,17 +252,18 @@
 ils %7B%0A%09%0A
-%09
+  
 private 
@@ -332,17 +332,18 @@
 ass);%0A%09%0A
-%09
+  
 public s
@@ -393,26 +393,28 @@
  object2) %7B%0A
-%09%09
+    
 return objec
@@ -474,22 +474,24 @@
 ject2);%0A
-%09
+  
 %7D%0A%09%0A
-%09
+  
 public s
@@ -526,18 +526,20 @@
 ects) %7B%0A
-%09%09
+    
 return A
@@ -563,22 +563,24 @@
 jects);%0A
-%09
+  
 %7D%0A%09%0A
-%09
+  
 public s
@@ -639,18 +639,20 @@
 sage) %7B%0A
-%09%09
+    
 if (obje
@@ -665,19 +665,22 @@
 null) %7B%0A
-%09%09%09
+      
 throw ne
@@ -717,18 +717,20 @@
 ssage);%0A
-%09%09
+    
 %7D else %7B
@@ -730,19 +730,21 @@
  else %7B%0A
-%09%09%09
+  %09  
 return o
@@ -754,18 +754,22 @@
 ct;%0A
-%09%09%7D%0A%09
+    %7D%0A  
 %7D%0A%09%0A
-%09
+  
 publ
@@ -822,19 +822,24 @@
 ) %7B%0A
-%09%09
+  %09 
 try %7B%0A
-%09%09%09
+  %09   
 if (
@@ -863,12 +863,16 @@
 ) %7B%0A
-%09%09%09%09
+  %09  %09  
 clos
@@ -890,15 +890,20 @@
 ();%0A
-%09%09%09%7D%0A%09%09
+  %09   %7D%0A  %09 
 %7D ca
@@ -928,11 +928,14 @@
 ) %7B%0A
-%09%09%09
+  %09   
 logg
@@ -978,12 +978,15 @@
 e);%0A
-%09%09%7D%0A%09
+  %09 %7D%0A  
 %7D%0A%7D

reformat code for ObjectsUtils