From 186d8d50a30ee4a85b30755b483ce0db0a5403fd Mon Sep 17 00:00:00 2001 From: Ziver Koc Date: Thu, 26 Aug 2010 16:09:44 +0000 Subject: [PATCH] fixed warnings --- src/zutil/MultiPrintStream.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/zutil/MultiPrintStream.java b/src/zutil/MultiPrintStream.java index c5d0c4d..25370f6 100644 --- a/src/zutil/MultiPrintStream.java +++ b/src/zutil/MultiPrintStream.java @@ -202,11 +202,12 @@ public class MultiPrintStream extends PrintStream { * @param head is the string that will be put in front of every line * @return A String with all the printed data */ - @SuppressWarnings("unchecked") + private String dumpToString( Object o , String head) { - if(o == null) return "NULL"; + if(o == null) + return "NULL"; StringBuffer buffer = new StringBuffer(); - Class oClass = o.getClass(); + Class oClass = o.getClass(); buffer.append( oClass.getName() ); String nextHead = head + "\t"; // Prints out Arrays @@ -226,7 +227,7 @@ public class MultiPrintStream extends PrintStream { } // Prints out a list else if(o instanceof Collection){ - Iterator it = ((Collection)o).iterator(); + Iterator it = ((Collection)o).iterator(); buffer.append( "{" ); while(it.hasNext()){ Object value = it.next(); @@ -242,11 +243,11 @@ public class MultiPrintStream extends PrintStream { } // Prints out a Map else if(o instanceof Map){ - Iterator it = ((Map)o).keySet().iterator(); + Iterator it = ((Map)o).keySet().iterator(); buffer.append( "{" ); while(it.hasNext()){ Object key = it.next(); - Object value = ((Map)o).get(key); + Object value = ((Map)o).get(key); buffer.append("\n"); buffer.append(nextHead); buffer.append( key ); @@ -330,7 +331,6 @@ public class MultiPrintStream extends PrintStream { /** * An helper function for the dump function. */ - @SuppressWarnings("unchecked") private boolean dumbCapable(Object o){ if(o != null){ if(o.getClass().isArray()) return true;