← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12800: Removed unused method

 

------------------------------------------------------------
revno: 12800
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-10-22 19:59:17 +0200
message:
  Removed unused method
modified:
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/StreamUtils.java
  dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/StreamUtilsTest.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/StreamUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/StreamUtils.java	2013-09-26 15:37:32 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/StreamUtils.java	2013-10-22 17:59:17 +0000
@@ -28,8 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.hisp.dhis.system.comparator.FileLastModifiedComparator;
-
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
 import java.io.BufferedReader;
@@ -53,12 +51,13 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
-import java.util.Scanner;
 import java.util.zip.GZIPInputStream;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 import java.util.zip.ZipOutputStream;
 
+import org.hisp.dhis.system.comparator.FileLastModifiedComparator;
+
 /**
  * @author Lars Helge Overland
  * @version $Id$
@@ -600,18 +599,4 @@
     {
         return new File( path ).exists();
     }
-
-    /**
-     * Converts an InputStream to String with encoding as UTF-8
-     * 
-     * @since 2.12
-     * @param inputStream the InputStream
-     * @return String after reading the InputStream
-     */
-    @Deprecated
-    public static String convertStreamToString( InputStream inputStream )
-    {
-        Scanner s = new Scanner( inputStream, ENCODING_UTF8 ).useDelimiter( "\\A" );
-        return s.hasNext() ? s.next() : "";
-    }
 }

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/StreamUtilsTest.java'
--- dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/StreamUtilsTest.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/StreamUtilsTest.java	2013-10-22 17:59:17 +0000
@@ -106,13 +106,4 @@
         assertEquals( 'm', reader.read() );
         assertEquals( 'l', reader.read() );
     }
-    
-    @Test
-    public void testConvertStreamToString()
-        throws Exception
-    {
-        String str = StreamUtils.convertStreamToString(plainStream);
-        assertTrue( str.contains("<dxf>") );
-        assertTrue( str.startsWith("<?xml version=\'1.0\'?>") );
-    }
 }