[Title] Fix potential bug as sonar
authorBonyong.lee <bonyong.lee@samsung.com>
Sun, 16 Jun 2013 11:47:51 +0000 (20:47 +0900)
committerBonyong.lee <bonyong.lee@samsung.com>
Sun, 16 Jun 2013 11:47:51 +0000 (20:47 +0900)
[Desc.] Remove read method
[Issue]

org.tizen.common.sdblib/src/org/tizen/sdblib/service/FileEntryInputStream.java
org.tizen.common.sdblib/src/org/tizen/sdblib/util/Log.java

index 4375452..0a42085 100644 (file)
@@ -193,37 +193,6 @@ extends InputStream
         }\r
        }\r
        \r
-       @Override\r
-       public int read(byte[] b, int off, int len) throws IOException\r
-       {\r
-               if (b == null) {\r
-                       throw new NullPointerException();\r
-               } else if (off < 0 || len < 0 || len > b.length - off) {\r
-                       throw new IndexOutOfBoundsException();\r
-               } else if (len == 0) {\r
-                       return 0;\r
-               }\r
-\r
-               int c = read();\r
-               if (c == -1) {\r
-                       return -1;\r
-               }\r
-               b[off] = (byte)c;\r
-\r
-               int i = 1;\r
-               try {\r
-                       for (; i < len ; i++) {\r
-                               c = read();\r
-                               if (c == -1) {\r
-                                       break;\r
-                               }\r
-                               b[off + i] = (byte)c;\r
-                       }\r
-               } catch (IOException ee) {\r
-               }\r
-               return i;\r
-       }\r
-\r
        /* (non-Javadoc)\r
         * @see java.io.InputStream#read()\r
         */\r
index ebf3f5a..4eac00d 100644 (file)
@@ -223,6 +223,7 @@ Log
             }
             catch( final Throwable e )
             {
+               e.printStackTrace();
                 System.out.println("Failed to make log file");
             }
         }