cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Gallardo" <agalla...@agssa.net>
Subject Re: svn commit: r123799 - /cocoon/branches/BRANCH_2_1_X/src/blocks/repository/java/org/apache/co coon/components/repository/SourceRepositoryImpl.java
Date Fri, 31 Dec 2004 17:46:55 GMT
On Vie, 31 de Diciembre de 2004, 11:15, Joerg Heinicke dijo:
> On 31.12.2004 16:12, antonio@apache.org wrote:
>
>> Author: antonio
>> Date: Fri Dec 31 07:12:59 2004
>> New Revision: 123799
>>
>> URL: http://svn.apache.org/viewcvs?view=rev&rev=123799
>> Log:
>> Remove unused code
>> Modified:
>>    cocoon/branches/BRANCH_2_1_X/src/blocks/repository/java/org/apache/cocoon/components/repository/SourceRepositoryImpl.java
>>
>> Modified:
>> cocoon/branches/BRANCH_2_1_X/src/blocks/repository/java/org/apache/cocoon/components/repository/SourceRepositoryImpl.java
>> Url:
>> http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/repository/java/org/apache/cocoon/components/repository/SourceRepositoryImpl.java?view=diff&rev=123799&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/repository/java/org/apache/cocoon/components/repository/SourceRepositoryImpl.java&r1=123798&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/repository/java/org/apache/cocoon/components/repository/SourceRepositoryImpl.java&r2=123799
>> ==============================================================================
>> ---
>> cocoon/branches/BRANCH_2_1_X/src/blocks/repository/java/org/apache/cocoon/components/repository/SourceRepositoryImpl.java
(original)
>> +++
>> cocoon/branches/BRANCH_2_1_X/src/blocks/repository/java/org/apache/cocoon/components/repository/SourceRepositoryImpl.java
Fri
>> Dec 31 07:12:59 2004
>> @@ -226,17 +226,9 @@
>>                  int status = STATUS_OK;
>>                  final Iterator iter = ((TraversableSource)
>> source).getChildren().iterator();
>>                  while (iter.hasNext()) {
>> -                    Source child = null;
>> -                    try {
>> -                        status = remove((Source) iter.next());
>> -                        if (status != STATUS_OK) {
>> -                            return status;
>> -                        }
>> -                    }
>> -                    finally {
>> -                        if (child != null) {
>> -                            m_resolver.release(child);
>
> ------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>> -                        }
>> +                    status = remove((Source) iter.next());
>> +                    if (status != STATUS_OK) {
>> +                        return status;
>>                      }
>>                  }
>>              }
>
> What about releasing the Source's??

'child' is always = null. The condition never happen to be true. Then it
is unnecesary code.

WDYT?

Best Regards,

Antonio Gallardo


Mime
View raw message