djencks     2004/05/30 11:14:55

  Modified:    
modules/connector/src/java/org/apache/geronimo/connector/deployment
                        RAR_1_0ConfigBuilder.java RAR_1_5ConfigBuilder.java
  Log:
  remove unnecessary existence checks (element required by schema)
  
  Revision  Changes    Path
  1.8       +4 -7      
incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilder.java
  
  Index: RAR_1_0ConfigBuilder.java
  ===================================================================
  RCS file: 
/home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilder.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- RAR_1_0ConfigBuilder.java 6 May 2004 03:58:22 -0000       1.7
  +++ RAR_1_0ConfigBuilder.java 30 May 2004 18:14:55 -0000      1.8
  @@ -159,19 +159,16 @@
           return gbean;
       }
   
  -//ManagedConnectionFactories are extremely restricted as to the attribute 
types.
  +    //ManagedConnectionFactories are extremely restricted as to the 
attribute types.
       private void setDynamicAttributes(GBeanMBean gBean, ConfigPropertyType[] 
configProperties, GerConfigPropertySettingType[] configPropertySettings) throws 
DeploymentException, ReflectionException, MBeanException, 
InvalidAttributeValueException, AttributeNotFoundException {
           for (int i = 0; i < configProperties.length; i++) {
               ConfigPropertyType configProperty = configProperties[i];
  -            if (configProperty.getConfigPropertyType() == null) {
  -                continue;
  -            }
               Object value;
               try {
                   PropertyEditor editor = 
PropertyEditors.findEditor(configProperty.getConfigPropertyType().getStringValue());
                   String valueString = null;
                   if (editor != null) {
  -//look for explicit value setting
  +                    //look for explicit value setting
                       for (int j = 0; j < configPropertySettings.length; j++) {
                           GerConfigPropertySettingType configPropertySetting = 
configPropertySettings[j];
                           if 
(configPropertySetting.getName().equals(configProperty.getConfigPropertyName().getStringValue()))
 {
  @@ -179,7 +176,7 @@
                               break;
                           }
                       }
  -//look for default value
  +                    //look for default value
                       if (valueString == null) {
                           if (configProperty.getConfigPropertyValue() != null) 
{
                               valueString = 
configProperty.getConfigPropertyValue().getStringValue();
  
  
  
  1.13      +5 -8      
incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilder.java
  
  Index: RAR_1_5ConfigBuilder.java
  ===================================================================
  RCS file: 
/home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilder.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- RAR_1_5ConfigBuilder.java 29 May 2004 05:13:52 -0000      1.12
  +++ RAR_1_5ConfigBuilder.java 30 May 2004 18:14:55 -0000      1.13
  @@ -239,19 +239,16 @@
           return gbean;
       }
   
  -//ManagedConnectionFactories are extremely restricted as to the attribute 
types.
  +    //ManagedConnectionFactories are extremely restricted as to the 
attribute types.
       private void setDynamicAttributes(GBeanMBean gBean, ConfigPropertyType[] 
configProperties, GerConfigPropertySettingType[] configPropertySettings) throws 
DeploymentException, ReflectionException, MBeanException, 
InvalidAttributeValueException, AttributeNotFoundException {
           for (int i = 0; i < configProperties.length; i++) {
               ConfigPropertyType configProperty = configProperties[i];
  -            if (configProperty.getConfigPropertyValue() == null) {
  -                continue;
  -            }
               Object value;
               try {
                   PropertyEditor editor = 
PropertyEditors.findEditor(configProperty.getConfigPropertyType().getStringValue());
                   String valueString = null;
                   if (editor != null) {
  -//look for explicit value setting
  +                    //look for explicit value setting
                       for (int j = 0; j < configPropertySettings.length; j++) {
                           GerConfigPropertySettingType configPropertySetting = 
configPropertySettings[j];
                           if 
(configPropertySetting.getName().equals(configProperty.getConfigPropertyName().getStringValue()))
 {
  @@ -259,7 +256,7 @@
                               break;
                           }
                       }
  -//look for default value
  +                    //look for default value
                       if (valueString == null) {
                           if (configProperty.getConfigPropertyValue() != null) 
{
                               valueString = 
configProperty.getConfigPropertyValue().getStringValue();
  @@ -271,7 +268,7 @@
                           
gBean.setAttribute(configProperty.getConfigPropertyName().getStringValue(), 
value);
                       }
                   } else {
  -                    throw new DeploymentException("No property editor for 
type: " + configProperty.getConfigPropertyType());
  +                    throw new DeploymentException("No property editor for 
type: " + configProperty.getConfigPropertyType().getStringValue());
                   }
               } catch (ClassNotFoundException e) {
                   throw new DeploymentException("Could not load attribute 
class: attribute: " + configProperty.getConfigPropertyName() + ", type: " + 
configProperty.getConfigPropertyType(), e);
  
  
  

Reply via email to