On 05/04/2017 08:06, violet...@apache.org wrote:
Author: violetagg
Date: Wed Apr  5 07:06:13 2017
New Revision: 1790180

URL: http://svn.apache.org/viewvc?rev=1790180&view=rev
Log:
add missing copyright header
ws police

Thanks. You beat me to it. For reasons I won't bore you with, I had to set up a temporary dev environment and I forgot some parts.

Mark


Modified:
    tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java
    tomcat/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java
    
tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java

Modified: tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java?rev=1790180&r1=1790179&r2=1790180&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java Wed Apr  
5 07:06:13 2017
@@ -152,9 +152,9 @@ public final class ExtensionValidator {
                 String jarName = manifestResource.getURL().toExternalForm();
                 Manifest jmanifest = manifestResource.getManifest();
                 if (jmanifest != null) {
-                       ManifestResource mre = new ManifestResource(jarName,
-                               jmanifest, ManifestResource.APPLICATION);
-                       appManifestResources.add(mre);
+                    ManifestResource mre = new ManifestResource(jarName,
+                            jmanifest, ManifestResource.APPLICATION);
+                    appManifestResources.add(mre);
                 }
             }
         }

Modified: 
tomcat/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java?rev=1790180&r1=1790179&r2=1790180&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java 
Wed Apr  5 07:06:13 2017
@@ -109,25 +109,25 @@ public class JarWarResourceSet extends A
                         JarEntry entry = jarIs.getNextJarEntry();
                         boolean hasMetaInf = false;
                         while (entry != null) {
-                               if (!hasMetaInf && 
entry.getName().startsWith("META-INF/")) {
-                                       hasMetaInf = true;
-                               }
+                            if (!hasMetaInf && 
entry.getName().startsWith("META-INF/")) {
+                                hasMetaInf = true;
+                            }
                             archiveEntries.put(entry.getName(), entry);
                             entry = jarIs.getNextJarEntry();
                         }
                         setManifest(jarIs.getManifest());
-                       // Hacks to work-around JarInputStream swallowing these
+                        // Hacks to work-around JarInputStream swallowing these
                         // entries. The attributes for these entries will be
                         // incomplete. Making the attributes available would
                         // require (re-)reading the stream as a ZipInputStream
                         // and creating JarEntry objects from the ZipEntries.
                         if (hasMetaInf) {
-                               JarEntry metaInfDir = new JarEntry("META-INF/");
-                               archiveEntries.put(metaInfDir.getName(), 
metaInfDir);
+                            JarEntry metaInfDir = new JarEntry("META-INF/");
+                            archiveEntries.put(metaInfDir.getName(), 
metaInfDir);
                         }
                         if (jarIs.getManifest() != null) {
-                               JarEntry manifest = new 
JarEntry("META-INF/MANIFEST.MF");
-                               archiveEntries.put(manifest.getName(), 
manifest);
+                            JarEntry manifest = new 
JarEntry("META-INF/MANIFEST.MF");
+                            archiveEntries.put(manifest.getName(), manifest);
                         }
                     }
                 } catch (IOException ioe) {

Modified: 
tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java?rev=1790180&r1=1790179&r2=1790180&view=diff
==============================================================================
--- 
tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java 
(original)
+++ 
tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java 
Wed Apr  5 07:06:13 2017
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.catalina.webresources;

 import java.io.File;
@@ -19,22 +35,22 @@ public class TestJarWarResourceSet exten
         TomcatURLStreamHandlerFactory.register();
     }

-
-       @Test
-       public void testJarWarMetaInf() throws LifecycleException  {
+
+    @Test
+    public void testJarWarMetaInf() throws LifecycleException  {
         Tomcat tomcat = getTomcatInstance();

-               File warFile = new 
File("test/webresources/war-url-connection.war");
+        File warFile = new File("test/webresources/war-url-connection.war");
         Context ctx = tomcat.addContext("", warFile.getAbsolutePath());
-
+
         tomcat.start();

         StandardRoot root = (StandardRoot) ctx.getResources();
-
-               WebResource[] results = 
root.getClassLoaderResources("/META-INF");
-               
-               Assert.assertNotNull(results);
-               Assert.assertEquals(1, results.length);
-               Assert.assertNotNull(results[0].getURL());
-       }
+
+        WebResource[] results = root.getClassLoaderResources("/META-INF");
+
+        Assert.assertNotNull(results);
+        Assert.assertEquals(1, results.length);
+        Assert.assertNotNull(results[0].getURL());
+    }
 }



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



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

Reply via email to