Skip to content

Commit 8abb629

Browse files
committed
Clean-up. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1187018 13f79535-47bb-0310-9956-ffa450edef68
1 parent 20bcb6c commit 8abb629

18 files changed

Lines changed: 415 additions & 400 deletions

TOMCAT-NEXT.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,8 @@ but possibly 7.1.x).
4242

4343
8. Review the connector shutdown code for timing and threading issues
4444
particularly any that may result in a client socket being left open after a
45-
connector.stop().
45+
connector.stop().
46+
47+
9. Remove all the static info attributes and associated getters.
48+
49+
10. Remove the svn keywords from all the files.

java/org/apache/catalina/startup/Catalina.java

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
18-
1917
package org.apache.catalina.startup;
2018

2119

@@ -71,7 +69,6 @@
7169
* @author Remy Maucherat
7270
* @version $Id$
7371
*/
74-
7572
public class Catalina {
7673

7774

@@ -277,8 +274,9 @@ protected boolean arguments(String args[]) {
277274
protected File configFile() {
278275

279276
File file = new File(configFile);
280-
if (!file.isAbsolute())
277+
if (!file.isAbsolute()) {
281278
file = new File(System.getProperty(Globals.CATALINA_BASE_PROP), configFile);
279+
}
282280
return (file);
283281

284282
}
@@ -383,8 +381,9 @@ protected Digester createStartDigester() {
383381
digester.addRuleSet(new ClusterRuleSet("Server/Service/Engine/Cluster/"));
384382

385383
long t2=System.currentTimeMillis();
386-
if (log.isDebugEnabled())
384+
if (log.isDebugEnabled()) {
387385
log.debug("Digester for server.xml created " + ( t2-t1 ));
386+
}
388387
return (digester);
389388

390389
}
@@ -457,8 +456,9 @@ public void stopServer(String[] arguments) {
457456
Socket socket = new Socket(s.getAddress(), s.getPort());
458457
OutputStream stream = socket.getOutputStream();
459458
String shutdown = s.getShutdown();
460-
for (int i = 0; i < shutdown.length(); i++)
459+
for (int i = 0; i < shutdown.length(); i++) {
461460
stream.write(shutdown.charAt(i));
461+
}
462462
stream.flush();
463463
stream.close();
464464
socket.close();
@@ -572,16 +572,18 @@ public void load() {
572572
try {
573573
getServer().init();
574574
} catch (LifecycleException e) {
575-
if (Boolean.getBoolean("org.apache.catalina.startup.EXIT_ON_INIT_FAILURE"))
575+
if (Boolean.getBoolean("org.apache.catalina.startup.EXIT_ON_INIT_FAILURE")) {
576576
throw new java.lang.Error(e);
577-
else
577+
} else {
578578
log.error("Catalina.start", e);
579+
}
579580

580581
}
581582

582583
long t2 = System.nanoTime();
583-
if(log.isInfoEnabled())
584+
if(log.isInfoEnabled()) {
584585
log.info("Initialization processed in " + ((t2 - t1) / 1000000) + " ms");
586+
}
585587

586588
}
587589

@@ -592,8 +594,9 @@ public void load() {
592594
public void load(String args[]) {
593595

594596
try {
595-
if (arguments(args))
597+
if (arguments(args)) {
596598
load();
599+
}
597600
} catch (Exception e) {
598601
e.printStackTrace(System.out);
599602
}
@@ -624,8 +627,9 @@ public void start() {
624627
}
625628

626629
long t2 = System.nanoTime();
627-
if(log.isInfoEnabled())
630+
if(log.isInfoEnabled()) {
628631
log.info("Server startup in " + ((t2 - t1) / 1000000) + " ms");
632+
}
629633

630634
try {
631635
// Register shutdown hook
@@ -807,8 +811,9 @@ protected void initNaming() {
807811
value = value + ":" + oldValue;
808812
}
809813
System.setProperty(javax.naming.Context.URL_PKG_PREFIXES, value);
810-
if( log.isDebugEnabled() )
814+
if( log.isDebugEnabled() ) {
811815
log.debug("Setting naming prefix=" + value);
816+
}
812817
value = System.getProperty
813818
(javax.naming.Context.INITIAL_CONTEXT_FACTORY);
814819
if (value == null) {
@@ -889,8 +894,9 @@ public SetParentClassLoaderRule(ClassLoader parentClassLoader) {
889894
public void begin(String namespace, String name, Attributes attributes)
890895
throws Exception {
891896

892-
if (digester.getLogger().isDebugEnabled())
897+
if (digester.getLogger().isDebugEnabled()) {
893898
digester.getLogger().debug("Setting parent class loader");
899+
}
894900

895901
Container top = (Container) digester.peek();
896902
top.setParentClassLoader(parentClassLoader);

0 commit comments

Comments
 (0)