You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2009/10/08 12:17:59 UTC

svn commit: r823114 [2/2] - in /harmony/enhanced/classlib/trunk/modules/archive/src/main/java: java/util/jar/ java/util/zip/ org/apache/harmony/archive/internal/nls/ org/apache/harmony/archive/util/

Modified: harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipOutputStream.java?rev=823114&r1=823113&r2=823114&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipOutputStream.java (original)
+++ harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipOutputStream.java Thu Oct  8 10:17:58 2009
@@ -1,13 +1,13 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -79,7 +79,7 @@
     /**
      * Constructs a new {@code ZipOutputStream} with the specified output
      * stream.
-     * 
+     *
      * @param p1
      *            the {@code OutputStream} to write the data to.
      */
@@ -90,7 +90,7 @@
     /**
      * Closes the current {@code ZipEntry}, if any, and the underlying output
      * stream. If the stream is already closed this method does nothing.
-     * 
+     *
      * @throws IOException
      *             If an error occurs closing the stream.
      */
@@ -106,7 +106,7 @@
     /**
      * Closes the current {@code ZipEntry}. Any entry terminal data is written
      * to the underlying stream.
-     * 
+     *
      * @throws IOException
      *             If an error occurs closing the entry.
      */
@@ -191,7 +191,7 @@
     /**
      * Indicates that all entries have been written to the stream. Any terminal
      * information is written to the underlying stream.
-     * 
+     *
      * @throws IOException
      *             if an error occurs while terminating the stream.
      */
@@ -235,7 +235,7 @@
      * the entry can then be written using {@code write()}. After data is
      * written {@code closeEntry()} must be called to complete the writing of
      * the entry to the underlying stream.
-     * 
+     *
      * @param ze
      *            the {@code ZipEntry} to store.
      * @throws IOException
@@ -323,7 +323,7 @@
 
     /**
      * Sets the {@code ZipFile} comment associated with the file being written.
-     * 
+     *
      * @param comment
      *            the comment associated with the file.
      */
@@ -338,7 +338,7 @@
      * Sets the compression level to be used for writing entry data. This level
      * may be set on a per entry basis. The level must have a value between -1
      * and 8 according to the {@code Deflater} compression level bounds.
-     * 
+     *
      * @param level
      *            the compression level (ranging from -1 to 8).
      * @see Deflater
@@ -355,7 +355,7 @@
      * Sets the compression method to be used when compressing entry data.
      * method must be one of {@code STORED} (for no compression) or {@code
      * DEFLATED}.
-     * 
+     *
      * @param method
      *            the compression method to use.
      */
@@ -385,7 +385,7 @@
 
     /**
      * Writes data for the current entry to the underlying stream.
-     * 
+     *
      * @exception IOException
      *                If an error occurs writing to the stream
      */

Modified: harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/nls/Messages.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/nls/Messages.java?rev=823114&r1=823113&r2=823114&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/nls/Messages.java (original)
+++ harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/nls/Messages.java Thu Oct  8 10:17:58 2009
@@ -1,13 +1,13 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,7 +17,7 @@
 
 /*
  * THE FILE HAS BEEN AUTOGENERATED BY MSGTOOL TOOL.
- * All changes made to this file manually will be overwritten 
+ * All changes made to this file manually will be overwritten
  * if this tool runs again. Better make changes in the template file.
  */
 
@@ -43,7 +43,7 @@
  * is looked up, or resource bundle support is not available, the key itself
  * will be returned as the associated message. This means that the <em>KEY</em>
  * should a reasonable human-readable (english) string.
- * 
+ *
  */
 public class Messages {
 
@@ -52,14 +52,15 @@
 
     /**
      * Retrieves a message which has no arguments.
-     * 
+     *
      * @param msg
      *            String the key to look up.
      * @return String the message for that key in the system message bundle.
      */
     static public String getString(String msg) {
-        if (bundle == null)
+        if (bundle == null) {
             return msg;
+        }
         try {
             return bundle.getString(msg);
         } catch (MissingResourceException e) {
@@ -69,7 +70,7 @@
 
     /**
      * Retrieves a message which takes 1 argument.
-     * 
+     *
      * @param msg
      *            String the key to look up.
      * @param arg
@@ -82,7 +83,7 @@
 
     /**
      * Retrieves a message which takes 1 integer argument.
-     * 
+     *
      * @param msg
      *            String the key to look up.
      * @param arg
@@ -95,7 +96,7 @@
 
     /**
      * Retrieves a message which takes 1 character argument.
-     * 
+     *
      * @param msg
      *            String the key to look up.
      * @param arg
@@ -108,7 +109,7 @@
 
     /**
      * Retrieves a message which takes 2 arguments.
-     * 
+     *
      * @param msg
      *            String the key to look up.
      * @param arg1
@@ -123,7 +124,7 @@
 
     /**
      * Retrieves a message which takes several arguments.
-     * 
+     *
      * @param msg
      *            String the key to look up.
      * @param args
@@ -153,7 +154,7 @@
      * To insert the "{" character into the output, use a single backslash
      * character to escape it (i.e. "\{"). The "}" character does not need to be
      * escaped.
-     * 
+     *
      * @param format
      *            String the format to use when printing.
      * @param args
@@ -165,18 +166,20 @@
                 + (args.length * 20));
         String[] argStrings = new String[args.length];
         for (int i = 0; i < args.length; ++i) {
-            if (args[i] == null)
+            if (args[i] == null) {
                 argStrings[i] = "<null>"; //$NON-NLS-1$
-            else
+            } else {
                 argStrings[i] = args[i].toString();
+            }
         }
         int lastI = 0;
         for (int i = format.indexOf('{', 0); i >= 0; i = format.indexOf('{',
                 lastI)) {
             if (i != 0 && format.charAt(i - 1) == '\\') {
                 // It's escaped, just print and loop.
-                if (i != 1)
+                if (i != 1) {
                     answer.append(format.substring(lastI, i - 1));
+                }
                 answer.append('{');
                 lastI = i + 1;
             } else {
@@ -195,23 +198,25 @@
                     } else {
                         // Got a good one!
                         answer.append(format.substring(lastI, i));
-                        if (argnum >= argStrings.length)
+                        if (argnum >= argStrings.length) {
                             answer.append("<missing argument>"); //$NON-NLS-1$
-                        else
+                        } else {
                             answer.append(argStrings[argnum]);
+                        }
                         lastI = i + 3;
                     }
                 }
             }
         }
-        if (lastI < format.length())
+        if (lastI < format.length()) {
             answer.append(format.substring(lastI, format.length()));
+        }
         return answer.toString();
     }
 
     /**
      * Changes the locale of the messages.
-     * 
+     *
      * @param locale
      *            Locale the locale to change to.
      */

Modified: harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/util/Util.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/util/Util.java?rev=823114&r1=823113&r2=823114&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/util/Util.java (original)
+++ harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/util/Util.java Thu Oct  8 10:17:58 2009
@@ -1,13 +1,13 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.