Changeset 24

Show
Ignore:
Timestamp:
07/25/05 18:37:54 (3 years ago)
Author:
niels
Message:

if attribute is missing for constructor, than throw exception, if attribute does not exist, dont try call setter method

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/net/schst/XJConf/TagDefinition.java

    r22 r24  
    208208        for (int i = 0; i < conParams.size(); i++) { 
    209209            paramDef = (Definition)conParams.get(i); 
    210             Object val = paramDef.convertValue(tag,loader);                
     210            Object val = paramDef.convertValue(tag,loader); 
     211            if (val == null) { 
     212                //TODO schst Definition interface braucht noch type method 
     213                throw new RuntimeException("argument for constructor must be available!!"); 
     214            } 
    211215            cParamTypes[i] = val.getClass(); 
    212216            cParams[i] = val; 
     
    232236            AttributeDefinition att = (AttributeDefinition)this.atts.get(i); 
    233237            Object val = att.convertValue(tag,loader); 
    234              
     238            if (val == null) { 
     239                continue; 
     240            } 
     241             
    235242            try { 
    236243                methodName = att.getSetterMethod();