Author: ab
Date: Wed May  4 06:53:18 2005
New Revision: 168125

URL: http://svn.apache.org/viewcvs?rev=168125&view=rev
Log:
Whitespace changes + one forgotten check for null values.

Modified:
    incubator/nutch/trunk/src/java/org/apache/nutch/io/WritableUtils.java

Modified: incubator/nutch/trunk/src/java/org/apache/nutch/io/WritableUtils.java
URL: 
http://svn.apache.org/viewcvs/incubator/nutch/trunk/src/java/org/apache/nutch/io/WritableUtils.java?rev=168125&r1=168124&r2=168125&view=diff
==============================================================================
--- incubator/nutch/trunk/src/java/org/apache/nutch/io/WritableUtils.java 
(original)
+++ incubator/nutch/trunk/src/java/org/apache/nutch/io/WritableUtils.java Wed 
May  4 06:53:18 2005
@@ -117,8 +117,8 @@
    */
   public static void writeStringArray(DataOutput out, String[] s) throws 
IOException{
     out.writeInt(s.length);
-    for(int i=0;i < s.length;i++){
-      writeString(out,s[i]);
+    for(int i = 0; i < s.length; i++) {
+      writeString(out, s[i]);
     }
   }
 
@@ -134,7 +134,7 @@
       return;
     }
     out.writeInt(s.length);
-    for(int i = 0; i < s.length; i++){
+    for(int i = 0; i < s.length; i++) {
       writeCompressedString(out, s[i]);
     }
   }
@@ -148,7 +148,7 @@
     int len = in.readInt();
     if (len == -1) return null;
     String[] s = new String[len];
-    for(int i = 0; i < len; i++){
+    for(int i = 0; i < len; i++) {
       s[i] = readString(in);
     }
     return s;
@@ -162,8 +162,9 @@
    */
   public static  String[] readCompressedStringArray(DataInput in) throws 
IOException {
     int len = in.readInt();
+    if (len == -1) return null;
     String[] s = new String[len];
-    for(int i = 0; i < len; i++){
+    for(int i = 0; i < len; i++) {
       s[i] = readCompressedString(in);
     }
     return s;




-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r 
_______________________________________________
Nutch-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-cvs

Reply via email to