This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 30f7e93788ae42287473140ba4046b8122db74d2
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Sep 27 14:29:57 2019 +0100

    Align with 9.0.x. Mostly Javadoc with a little refactoring.
---
 java/org/apache/catalina/core/StandardHost.java | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardHost.java 
b/java/org/apache/catalina/core/StandardHost.java
index 8821701..1739834 100644
--- a/java/org/apache/catalina/core/StandardHost.java
+++ b/java/org/apache/catalina/core/StandardHost.java
@@ -19,6 +19,7 @@ package org.apache.catalina.core;
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -266,10 +267,7 @@ public class StandardHost extends ContainerBase implements 
Host {
 
 
     /**
-     * Return the XML root for this Host.  This can be an absolute
-     * pathname, a relative pathname, or a URL.
-     * If null, defaults to
-     * ${catalina.base}/conf/&lt;engine name&gt;/&lt;host name&gt; directory
+     * ({@inheritDoc}
      */
     @Override
     public String getXmlBase() {
@@ -278,12 +276,7 @@ public class StandardHost extends ContainerBase implements 
Host {
 
 
     /**
-     * Set the Xml root for this Host.  This can be an absolute
-     * pathname, a relative pathname, or a URL.
-     * If null, defaults to
-     * ${catalina.base}/conf/&lt;engine name&gt;/&lt;host name&gt; directory
-     *
-     * @param xmlBase The new XML root
+     * ({@inheritDoc}
      */
     @Override
     public void setXmlBase(String xmlBase) {
@@ -676,9 +669,7 @@ public class StandardHost extends ContainerBase implements 
Host {
                     return;
             }
             // Add this alias to the list
-            String newAliases[] = new String[aliases.length + 1];
-            for (int i = 0; i < aliases.length; i++)
-                newAliases[i] = aliases[i];
+            String newAliases[] = Arrays.copyOf(aliases, aliases.length + 1);
             newAliases[aliases.length] = alias;
             aliases = newAliases;
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to