Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2023 - in development/main/metro: activation/providers/avalon/src/main/net/dpml/activation/avalon composition/impl/src/main/net/dpml/composition/model/impl

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: niclas AT hedhman.org
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2023 - in development/main/metro: activation/providers/avalon/src/main/net/dpml/activation/avalon composition/impl/src/main/net/dpml/composition/model/impl
  • Date: Thu, 10 Mar 2005 17:42:28 -0500

Author: niclas AT hedhman.org
Date: Thu Mar 10 17:42:28 2005
New Revision: 2023

Modified:

development/main/metro/activation/providers/avalon/src/main/net/dpml/activation/avalon/AvalonParameters.java

development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultComponentModel.java
Log:
Cleaned up the stuff using the Parameters.merge() method.

Modified:
development/main/metro/activation/providers/avalon/src/main/net/dpml/activation/avalon/AvalonParameters.java
==============================================================================
---
development/main/metro/activation/providers/avalon/src/main/net/dpml/activation/avalon/AvalonParameters.java
(original)
+++
development/main/metro/activation/providers/avalon/src/main/net/dpml/activation/avalon/AvalonParameters.java
Thu Mar 10 17:42:28 2005
@@ -5,9 +5,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -283,24 +283,4 @@
{
return m_params.getParameterAsBoolean( name, defaultValue );
}
-
- /**
- * Merge parameters from another <code>Parameters</code> instance
- * into this.
- *
- * @param other the other Parameters
- * @return This <code>Parameters</code> instance.
- */
- public org.apache.avalon.framework.parameters.Parameters merge( final
org.apache.avalon.framework.parameters.Parameters other )
- {
- final Properties properties = new Properties();
- final String[] names = other.getNames();
- for( int i = 0; i < names.length; ++i )
- {
- properties.setProperty( names[ i ], other.getParameter( names[ i
], "" ) );
- }
- Parameters params = new DefaultParameters( properties );
- return new AvalonParameters( m_params.merge( params ) );
- }
-
}

Modified:
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultComponentModel.java
==============================================================================
---
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultComponentModel.java
(original)
+++
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultComponentModel.java
Thu Mar 10 17:42:28 2005
@@ -183,9 +183,10 @@
}
else
{
- m_parameters = new DefaultParameters();
- m_parameters.merge( staticDefaults );
- m_parameters.merge( parameters );
+ DefaultParameters temp = new DefaultParameters();
+ temp.merge( staticDefaults );
+ temp.merge( parameters );
+ m_parameters = temp;
}
}
else



  • svn commit: r2023 - in development/main/metro: activation/providers/avalon/src/main/net/dpml/activation/avalon composition/impl/src/main/net/dpml/composition/model/impl, niclas, 03/10/2005

Archive powered by MHonArc 2.6.24.

Top of Page