You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2011/11/10 06:54:23 UTC
svn commit: r1200170 - in /tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util:
net/ scan/
Author: kkolinko
Date: Thu Nov 10 05:54:22 2011
New Revision: 1200170
URL: http://svn.apache.org/viewvc?rev=1200170&view=rev
Log:
Merging revision 1187781 from tomcat/trunk:
Whitespace removal from /java/org/apache/tomcat
I won't merge all of it (as it spans bcel etc.), but only our code.
Part 6.
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLSessionManager.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLSupport.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLUtil.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/URL.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/Constants.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/FileUrlJar.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/Jar.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/JarFactory.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/NonClosingJarInputStream.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/UrlJar.java
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLSessionManager.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLSessionManager.java?rev=1200170&r1=1200169&r2=1200170&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLSessionManager.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLSessionManager.java Thu Nov 10 05:54:22 2011
@@ -20,7 +20,7 @@ package org.apache.tomcat.util.net;
/**
* Defines an interface used to manage SSL sessions. The manager operates on a
* single session.
- *
+ *
* $Id$
*/
public interface SSLSessionManager {
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLSupport.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLSupport.java?rev=1200170&r1=1200169&r2=1200170&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLSupport.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLSupport.java Thu Nov 10 05:54:22 2011
@@ -54,7 +54,7 @@ public interface SSLSupport {
public static final String SESSION_MGR =
"javax.servlet.request.ssl_session_mgr";
-
+
/**
* A mapping table to determine the number of effective bits in the key
* when using a cipher suite containing the specified cipher name. The
@@ -86,7 +86,7 @@ public interface SSLSupport {
/**
* The client certificate chain (if any).
- * @param force If <code>true</code>, then re-negotiate the
+ * @param force If <code>true</code>, then re-negotiate the
* connection if necessary.
*/
public Object[] getPeerCertificateChain(boolean force)
@@ -119,19 +119,19 @@ public interface SSLSupport {
* corresponding effective key size. The specified phrase must appear in the
* name of the cipher suite to be recognized.
*/
-
+
final class CipherData {
-
+
public String phrase = null;
-
+
public int keySize = 0;
-
+
public CipherData(String phrase, int keySize) {
this.phrase = phrase;
this.keySize = keySize;
}
-
+
}
-
+
}
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLUtil.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLUtil.java?rev=1200170&r1=1200169&r2=1200170&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLUtil.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SSLUtil.java Thu Nov 10 05:54:22 2011
@@ -23,11 +23,11 @@ import javax.net.ssl.TrustManager;
public interface SSLUtil {
- public SSLContext createSSLContext() throws Exception;
+ public SSLContext createSSLContext() throws Exception;
public KeyManager[] getKeyManagers() throws Exception;
-
+
public TrustManager[] getTrustManagers() throws Exception;
-
+
public void configureSessionContext(SSLSessionContext sslSessionContext);
}
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/URL.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/URL.java?rev=1200170&r1=1200169&r2=1200170&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/URL.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/URL.java Thu Nov 10 05:54:22 2011
@@ -49,7 +49,7 @@ public final class URL implements Serial
private static final long serialVersionUID = 1L;
-
+
// ----------------------------------------------------------- Constructors
/**
@@ -109,7 +109,7 @@ public final class URL implements Serial
}
// Parse out the new protocol
- for (i = start; !aRef && (i < limit) ; i++) {
+ for (i = start; !aRef && (i < limit) ; i++) {
c = spec.charAt(i);
if (c == ':') {
String s = spec.substring(start, i).toLowerCase(Locale.ENGLISH);
@@ -684,7 +684,7 @@ public final class URL implements Serial
at = ipv6-1;
}
}
-
+
int colon = authority.indexOf(':', at+1);
if (colon >= 0) {
try {
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/Constants.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/Constants.java?rev=1200170&r1=1200169&r2=1200170&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/Constants.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/Constants.java Thu Nov 10 05:54:22 2011
@@ -5,9 +5,9 @@
* 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.
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/FileUrlJar.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/FileUrlJar.java?rev=1200170&r1=1200169&r2=1200170&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/FileUrlJar.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/FileUrlJar.java Thu Nov 10 05:54:22 2011
@@ -5,9 +5,9 @@
* 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.
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/Jar.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/Jar.java?rev=1200170&r1=1200169&r2=1200170&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/Jar.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/Jar.java Thu Nov 10 05:54:22 2011
@@ -5,9 +5,9 @@
* 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.
@@ -32,18 +32,18 @@ public interface Jar {
/**
* Determines if a specific entry exists within the JAR.
- *
+ *
* @param name Entry to look for
* @return <code>true</code> if the specified entry exists else
* <code>false</code>
*/
boolean entryExists(String name) throws IOException;
-
-
+
+
/**
* Obtain an {@link InputStream} for a given entry in a JAR. The caller is
* responsible for closing the stream.
- *
+ *
* @param name Entry to obtain an {@link InputStream} for
* @return An {@link InputStream} for the specified entry or null if
* the entry does not exist
@@ -54,31 +54,31 @@ public interface Jar {
* Close any resources associated with this JAR.
*/
void close();
-
+
/**
* Moves the internal pointer to the next entry in the JAR.
*/
void nextEntry();
-
+
/**
* Obtains the name of the current entry.
- *
+ *
* @return The entry name
*/
String getEntryName();
-
+
/**
* Obtains the input stream for the current entry.
- *
+ *
* @return The input stream
* @throws IOException If the stream cannot be obtained
*/
InputStream getEntryInputStream() throws IOException;
-
+
/**
* Resets the internal pointer used to track JAR entries to the beginning of
* the JAR.
- *
+ *
* @throws IOException If the pointer cannot be reset
*/
void reset() throws IOException;
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/JarFactory.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/JarFactory.java?rev=1200170&r1=1200169&r2=1200170&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/JarFactory.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/JarFactory.java Thu Nov 10 05:54:22 2011
@@ -5,9 +5,9 @@
* 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.
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/NonClosingJarInputStream.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/NonClosingJarInputStream.java?rev=1200170&r1=1200169&r2=1200170&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/NonClosingJarInputStream.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/NonClosingJarInputStream.java Thu Nov 10 05:54:22 2011
@@ -5,9 +5,9 @@
* 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.
@@ -24,7 +24,7 @@ import java.util.jar.JarInputStream;
* When using a {@link JarInputStream} with an XML parser, the stream will be
* closed by the parser. This causes problems if multiple entries from the JAR
* need to be parsed. This implementation makes {{@link #close()} a NO-OP and
- * adds {@link #reallyClose()} that will close the stream.
+ * adds {@link #reallyClose()} that will close the stream.
*/
public class NonClosingJarInputStream extends JarInputStream {
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java?rev=1200170&r1=1200169&r2=1200170&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java Thu Nov 10 05:54:22 2011
@@ -57,7 +57,7 @@ public class StandardJarScanner implemen
private static final Log log = LogFactory.getLog(StandardJarScanner.class);
private static final Set<String> defaultJarsToSkip = new HashSet<String>();
-
+
/**
* The string resources for this package.
*/
@@ -111,7 +111,7 @@ public class StandardJarScanner implemen
/**
* Scan the provided ServletContext and classloader for JAR files. Each JAR
* file found will be passed to the callback handler to be processed.
- *
+ *
* @param context The ServletContext - used to locate and access
* WEB-INF/lib
* @param classloader The classloader - used to access JARs not in
@@ -119,7 +119,7 @@ public class StandardJarScanner implemen
* @param callback The handler to process any JARs found
* @param jarsToSkip List of JARs to ignore. If this list is null, a
* default list will be read from the system property
- * defined by {@link Constants#SKIP_JARS_PROPERTY}
+ * defined by {@link Constants#SKIP_JARS_PROPERTY}
*/
@Override
public void scan(ServletContext context, ClassLoader classloader,
@@ -174,23 +174,23 @@ public class StandardJarScanner implemen
}
}
}
-
+
// Scan the classpath
if (scanClassPath) {
if (log.isTraceEnabled()) {
log.trace(sm.getString("jarScan.classloaderStart"));
}
- ClassLoader loader =
+ ClassLoader loader =
Thread.currentThread().getContextClassLoader();
-
+
while (loader != null) {
if (loader instanceof URLClassLoader) {
URL[] urls = ((URLClassLoader) loader).getURLs();
for (int i=0; i<urls.length; i++) {
// Extract the jarName if there is one to be found
String jarName = getJarName(urls[i]);
-
+
// Skip JARs known not to be interesting and JARs
// in WEB-INF/lib we have already scanned
if (jarName != null &&
@@ -263,16 +263,16 @@ public class StandardJarScanner implemen
}
}
}
-
+
}
/*
* Extract the JAR name, if present, from a URL
*/
private String getJarName(URL url) {
-
+
String name = null;
-
+
String path = url.getPath();
int end = path.indexOf(Constants.JAR_EXT);
if (end != -1) {
@@ -282,7 +282,7 @@ public class StandardJarScanner implemen
int start = path.lastIndexOf('/');
name = path.substring(start + 1);
}
-
+
return name;
}
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/UrlJar.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/UrlJar.java?rev=1200170&r1=1200169&r2=1200170&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/UrlJar.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/UrlJar.java Thu Nov 10 05:54:22 2011
@@ -5,9 +5,9 @@
* 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.
@@ -47,7 +47,7 @@ public class UrlJar implements Jar {
}
entry = jarInputStream.getNextJarEntry();
}
-
+
return entry != null;
}
@@ -60,7 +60,7 @@ public class UrlJar implements Jar {
}
entry = jarInputStream.getNextJarEntry();
}
-
+
if (entry == null) {
return null;
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org