archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maria Odea Ching <och...@exist.com>
Subject Re: svn commit: r568146 - /maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java
Date Wed, 22 Aug 2007 02:25:02 GMT
Hi Brett,

I think this could be reproducible in the tests, I just need to tweak it 
a little :)

-Deng

Brett Porter wrote:
> Deng,
>
> Is this something that could be reproduced with a test? I'm concerned 
> when I merge MRM-462 back I might break it accidentally :)
>
> - Brett
>
> On 22/08/2007, at 12:35 AM, oching@apache.org wrote:
>
>> Author: oching
>> Date: Tue Aug 21 07:35:15 2007
>> New Revision: 568146
>>
>> URL: http://svn.apache.org/viewvc?rev=568146&view=rev
>> Log:
>> - Updated the code for escaping/unescaping cron expressions in 
>> DefaultArchivaConfiguration as the escape character '\' is displayed 
>> in the
>> repositories.jsp
>>
>>
>> Modified:
>> maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java

>>
>>
>> Modified: 
>> maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java

>>
>> URL: 
>> http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java?rev=568146&r1=568145&r2=568146&view=diff

>>
>> ============================================================================== 
>>
>> --- 
>> maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java

>> (original)
>> +++ 
>> maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java

>> Tue Aug 21 07:35:15 2007
>> @@ -95,10 +95,9 @@
>> if ( configuration == null )
>> {
>> configuration = load();
>> + configuration = processExpressions( configuration );
>> }
>>
>> - configuration = processExpressions( configuration );
>> -
>> return configuration;
>> }
>>
>> @@ -178,12 +177,23 @@
>> }
>> }
>>
>> - configuration = escapeCronExpressions( configuration );
>> + // escape all cron expressions to handle ','
>> + for ( Iterator i = configuration.getRepositories().iterator(); 
>> i.hasNext(); )
>> + {
>> + RepositoryConfiguration c = (RepositoryConfiguration) i.next();
>> + c.setRefreshCronExpression( escapeCronExpression( 
>> c.getRefreshCronExpression() ) );
>> + }
>> +
>> + if ( configuration.getDatabaseScanning() != null )
>> + {
>> + configuration.getDatabaseScanning().setCronExpression( 
>> escapeCronExpression(
>> + configuration.getDatabaseScanning().getCronExpression() ) );
>> + }
>>
>> new ConfigurationRegistryWriter().write( configuration, section );
>> section.save();
>>
>> - this.configuration = configuration;
>> + this.configuration = processExpressions( configuration );
>> }
>>
>> private Registry createDefaultConfigurationFile()
>> @@ -295,24 +305,4 @@
>>
>> return config;
>> }
>> -
>> - private Configuration escapeCronExpressions( Configuration config )
>> - {
>> - for ( Iterator i = config.getRepositories().iterator(); i.hasNext(); )
>> - {
>> - RepositoryConfiguration c = (RepositoryConfiguration) i.next();
>> -
>> - c.setRefreshCronExpression( escapeCronExpression( 
>> c.getRefreshCronExpression() ) );
>> - }
>> -
>> - DatabaseScanningConfiguration databaseScanning = 
>> config.getDatabaseScanning();
>> - if ( databaseScanning != null )
>> - {
>> - String cron = databaseScanning.getCronExpression();
>> - databaseScanning.setCronExpression( escapeCronExpression( cron ) );
>> - }
>> -
>> - return config;
>> - }
>> -
>> }
>>
>


Mime
View raw message