On Sun, Nov 9, 2008 at 8:03 PM, Daniel Cheng <j16sdiz+freenet at gmail.com> 
wrote:
> On Sat, Nov 8, 2008 at 10:08 AM, Matthew Toseland
> <toad at amphibian.dyndns.org> wrote:
>> On Thursday 06 November 2008 08:44, j16sdiz at freenetproject.org wrote:
>>> Author: j16sdiz
>>> Date: 2008-11-06 08:44:54 +0000 (Thu, 06 Nov 2008)
>>> New Revision: 23340
>>>
>>> Modified:
>>>    trunk/freenet/src/freenet/support/FileLoggerHook.java
>>> Log:
>>> refactor 1: remove local variable
>>>
>>> Modified: trunk/freenet/src/freenet/support/FileLoggerHook.java
>>> ===================================================================
>>> --- trunk/freenet/src/freenet/support/FileLoggerHook.java     2008-11-06
>> 08:44:34 UTC (rev 23339)
>>> +++ trunk/freenet/src/freenet/support/FileLoggerHook.java     2008-11-06
>> 08:44:54 UTC (rev 23340)
>>> @@ -218,7 +218,6 @@
>>>                       long startTime;
>>>                       long nextHour = -1;
>>>                       GregorianCalendar gc = null;
>>> -                     String filename = null;
>>>                       if (baseFilename != null) {
>>>                               latestFile = new 
>>> File(baseFilename+"-latest.log");
>>>                               previousFile = new 
>>> File(baseFilename+"-previous.log");
>>> @@ -244,8 +243,7 @@
>>>                                       int x = gc.get(INTERVAL);
>>>                                       gc.set(INTERVAL, (x / 
>>> INTERVAL_MULTIPLIER) * INTERVAL_MULTIPLIER);
>>>                               }
>>> -                             filename = getHourLogName(gc, true);
>>> -                             currentFilename = new File(filename);
>>> +                             currentFilename = new File(getHourLogName(gc, 
>>> true));
>>>                               synchronized(logFiles) {
>>>                                       if ((!logFiles.isEmpty()) &&
>> logFiles.getLast().filename.equals(currentFilename)) {
>>>                                               logFiles.removeLast();
>>> @@ -268,6 +266,7 @@
>>>                                       thisTime = System.currentTimeMillis();
>>>                                       if (baseFilename != null) {
>>>                                               if ((thisTime > nextHour) || 
>>> switchedBaseFilename) {
>>> +                                                     {
>>
>> What's with the extra braces?
>
> nothing, just prepare for the next commit.
>
>>>                                                       // Switch logs
>>>                                                       try {
>>>                                                               
>>> logStream.flush();
>>> @@ -284,16 +283,14 @@
>>>                                                       }
>>>                                                       long length = 
>>> currentFilename.length();
>>>                                                       OldLogFile olf = new 
>>> OldLogFile(currentFilename, lastTime, nextHour,
>> length);
>>> -                                                     lastTime = nextHour;
>>
>> And the removal of lastTime  = nextHour ? That might affect behaviour, no?
>
> Ya. Sorry.
> I see you have reverted it in r23351.
>

Oops, not really.
I have fixed it in 23441

Reply via email to