Re: Bug in CleanOldVersionsJob

sito <[email protected]>
Newsgroups gmane.comp.cms.infoglue.devel
Message-ID <[email protected]>
perfect,

Regards,  Sito

Bogeblad Mattias escribió:
> Hi,
>
> I will change to
>
> if(numberOfVersionsToKeepDuringCleanInteger.intValue() < 3 && numberOfVersionsToKeepDuringCleanInteger.intValue() > -1)
> 			
> This way one can never save less than 3 versions but also state -1 for all. Ok for you? 
>
> Great that you found this bug. 
>
> Regards
> Mattias Bogeblad
>
> -----Original Message-----
> From: sito [mailto:[email protected]] 
> Sent: den 29 januari 2009 09:31
> To: [email protected]
> Subject: [Infoglue-developer] Bug in CleanOldVersionsJob
>
> We have come across a bug at Infoglue 2.9.6.3., 
> org.infoglue.cms.jobs.CleanOldVersionsJob (v 1.9)
>
> At line 74, numberOfVersionsToKeepDuringCleanInteger is set to be at 
> least 3, and if you want to keep all versions, the number has been set 
> to -1. The condition to check if the value is higher than -1, to clean 
> some versions, is checked just after being set to 3, so the condition is 
> always met and we cannot keep all versions.
> *****
> if(numberOfVersionsToKeepDuringCleanInteger.intValue() < 3)
>     numberOfVersionsToKeepDuringCleanInteger = new Integer(3);
> if(numberOfVersionsToKeepDuringCleanInteger.intValue() > -1)
> {
>    ... this condition will always be satisfied, so you can never keep 
> all versions
> *****
> Best regards,
>
>   

-- 
--------------======ooOO000OOoo======---------------
Vicente Javier Rosselló Ferrer
E-mail: vrossello [arroba] uib.es
Tel: 971 17 2884
Centre de Tecnologies de la Informació a la UIB
CTI - http://www.cti.uib.es
Edifici Anselm Turmeda
Ctra. Valldemossa 7.5km
Universitat de les Illes Balears - http://www.uib.es
==================================================== 



------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.