tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: svn commit: r1484923 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
Date Wed, 22 May 2013 08:41:30 GMT
On 21/05/2013 23:10, Konstantin Kolinko wrote:
> 2013/5/22  <markt@apache.org>:
>> Author: markt
>> Date: Tue May 21 20:01:02 2013
>> New Revision: 1484923
>>
>> URL: http://svn.apache.org/r1484923
>> Log:
>> Make deletion of the copied WARs used for anti-resource locking more robust if the
context fails to start (there were some circumstances where the original WAR could get deleted).

>> @@ -942,11 +940,8 @@ public class ContextConfig
>>              String docBase = context.getDocBase();
>>              if (docBase == null)
>>                  return;
>> -            if (originalDocBase == null) {
>> -                originalDocBase = docBase;
>> -            } else {
>> -                docBase = originalDocBase;
>> -            }
>> +            originalDocBase = docBase;
>> +
> 
> 2. Why if(originalDocBase == null) check was removed?

It was part of the rotating the original and modified values. Now we
just keep copies of both it the check is irrelevant.

> 1. This change in 6.0 needs to go through voting

Sorry - I was on automatic pilot when doing my back-ports.

Clearly there is a +1 from me. If two other folks +1 it fairly soon I'll
just leave it. If not, I'll revert it and add it to the status file.


> 2. There is a bug in the above line,
> "docBase" should not be there.
> (Though it never executes, as antiLockingDocBase was created as
> file.getAbsolutePath(),)
> It will allow to simplify this block a bit.

I'll clean that up in trunk and 7.0.x and propose it for 6.0.x.

> 3. Wouldn't it be more simple to have the new field as a File instead of String?
> While "docBase" is a String, per API,  this field represents a proper file.

Yes. That allows a few more lines to be removed.

Thanks for the review.

Mark


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


Mime
View raw message