Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 93969 invoked from network); 6 May 2009 09:06:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 May 2009 09:06:53 -0000 Received: (qmail 73177 invoked by uid 500); 6 May 2009 09:06:53 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 73139 invoked by uid 500); 6 May 2009 09:06:53 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 73130 invoked by uid 99); 6 May 2009 09:06:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 May 2009 09:06:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 May 2009 09:06:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7592023889D5; Wed, 6 May 2009 09:06:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r772104 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main/java: java/net/ org/apache/harmony/luni/util/ Date: Wed, 06 May 2009 09:06:29 -0000 To: commits@harmony.apache.org From: tellison@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090506090629.7592023889D5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tellison Date: Wed May 6 09:06:28 2009 New Revision: 772104 URL: http://svn.apache.org/viewvc?rev=772104&view=rev Log: Minor javadoc corrections and updates. Fix some uses of error message construction. Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/Inet6Address.java harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetSocketAddress.java harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/NegativeCache.java harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/ExternalMessages.properties Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/Inet6Address.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/Inet6Address.java?rev=772104&r1=772103&r2=772104&view=diff ============================================================================== --- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/Inet6Address.java (original) +++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/Inet6Address.java Wed May 6 09:06:28 2009 @@ -172,9 +172,11 @@ /** * Returns {@code true} if one of following cases applies: *

- *

  • 1. both addresses are site local
  • - *
  • 2. both addresses are link local
  • - *
  • 3. {@code ia} is neither site local nor link local
  • + *
      + *
    1. both addresses are site local
    2. + *
    3. both addresses are link local
    4. + *
    5. {@code ia} is neither site local nor link local
    6. + *
    */ private boolean compareLocalType(Inet6Address ia) { if (ia.isSiteLocalAddress() && isSiteLocalAddress()) { Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java?rev=772104&r1=772103&r2=772104&view=diff ============================================================================== --- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java (original) +++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java Wed May 6 09:06:28 2009 @@ -491,7 +491,7 @@ * * @param name * the host name to lookup - * @param preferIPv6Addresses + * @param preferIPv6Address * address preference if underlying platform is V4/V6 * @return InetAddress the host address * @throws UnknownHostException Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetSocketAddress.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetSocketAddress.java?rev=772104&r1=772103&r2=772104&view=diff ============================================================================== --- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetSocketAddress.java (original) +++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetSocketAddress.java Wed May 6 09:06:28 2009 @@ -90,7 +90,7 @@ } /* - * Internal contructor for InetSocketAddress(String, int) and + * Internal constructor for InetSocketAddress(String, int) and * createUnresolved(String, int); */ InetSocketAddress(String host, int port, boolean needResolved) { Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/NegativeCache.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/NegativeCache.java?rev=772104&r1=772103&r2=772104&view=diff ============================================================================== --- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/NegativeCache.java (original) +++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/NegativeCache.java Wed May 6 09:06:28 2009 @@ -41,9 +41,15 @@ private static final float LOADING = 0.75F; /** - * Returns the hostname for the cache element. + * Constructs a negative cache for name lookups. * - * @return hostName name of the host for which the lookup failed. + * @param initialCapacity + * the initial size of the cache. + * @param loadFactor + * the load factor of the backing map. + * @param accessOrder + * if {@code true} indicates that traversal order should begin + * with most recently accessed element. */ NegativeCache(int initialCapacity, float loadFactor, boolean accessOrder) { super(initialCapacity, loadFactor, accessOrder); Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java?rev=772104&r1=772103&r2=772104&view=diff ============================================================================== --- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java (original) +++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java Wed May 6 09:06:28 2009 @@ -338,10 +338,12 @@ portMax = Integer.valueOf(strPortMax).intValue(); if (portMin > portMax) { - throw new IllegalArgumentException(Msg.getString("K0049") + " " + port); //$NON-NLS-1$ + // K0049=MinPort is greater than MaxPort\: {0} + throw new IllegalArgumentException(Msg.getString("K0049", port)); //$NON-NLS-1$ } } catch (NumberFormatException e) { - throw new IllegalArgumentException(Msg.getString("K004a") + " " + port); //$NON-NLS-1$ + // K004a=Invalid port number specified\: {0} + throw new IllegalArgumentException(Msg.getString("K004a", port)); //$NON-NLS-1$ } } @@ -390,15 +392,20 @@ } /** - * Get the host part from the host[:port] one. - * The host should be + * Get the host part from the host[:port] one. The host should be + * + *
          *      host = (hostname | IPv4address | IPv6reference | IPv6 in full uncompressed form)
    -     * The wildcard "*" may be included once in a DNS name host specification. If it is included, 
    -     * it must be in the leftmost position
    +     * 
    + * + * The wildcard "*" may be included once in a DNS name host specification. + * If it is included, it must be in the leftmost position * * @param host - * @return - * @throws IllegalArgumentException if the host is invalid. + * the {@code host[:port]} string. + * @return the host name. + * @throws IllegalArgumentException + * if the host is invalid. */ private String getHostString(String host) throws IllegalArgumentException { host = host.trim(); @@ -443,21 +450,22 @@ if (Inet6Util.isIP6AddressInFullForm(host)) { return host.toLowerCase(); } - throw new IllegalArgumentException(Msg.getString("K004a") + " " - + host); + // K004a=Invalid port number specified\: {0} + throw new IllegalArgumentException(Msg.getString("K004a", host)); } // forward bracket found int bbracketIdx = host.indexOf(']'); if (-1 == bbracketIdx) { // no back bracket found, wrong - throw new IllegalArgumentException(Msg.getString("K004a") + " " - + host); + // K004a=Invalid port number specified\: {0} + throw new IllegalArgumentException(Msg.getString("K004a", host)); } host = host.substring(0, bbracketIdx + 1); if (Inet6Util.isValidIP6Address(host)) { return host.toLowerCase(); } - throw new IllegalArgumentException(Msg.getString("K004a") + " " + host); + // K004a=Invalid port number specified\: {0} + throw new IllegalArgumentException(Msg.getString("K004a", host)); } /** Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/ExternalMessages.properties URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/ExternalMessages.properties?rev=772104&r1=772103&r2=772104&view=diff ============================================================================== --- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/ExternalMessages.properties (original) +++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/ExternalMessages.properties Wed May 6 09:06:28 2009 @@ -61,8 +61,8 @@ K0046=Local port declared out of range K0047=buffer is null K0048=Invalid action specified\: {0} -K0049=MinPort is greater than MaxPort -K004a=Invalid port number specified +K0049=MinPort is greater than MaxPort\: {0} +K004a=Invalid port number specified\: {0} K004b=Attempt to set factory more than once. K004c=Package is sealed K004d=Does not support writing to the input stream