haul 2003/01/15 07:55:13 Modified: src/java/org/apache/cocoon/components/modules/input DigestMetaModule.java Log: fix NPE Revision Changes Path 1.11 +20 -12 xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/DigestMetaModule.java Index: DigestMetaModule.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/DigestMetaModule.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- DigestMetaModule.java 19 Dec 2002 10:34:47 -0000 1.10 +++ DigestMetaModule.java 15 Jan 2003 15:55:13 -0000 1.11 @@ -107,18 +107,23 @@ // default vs dynamic Configuration inputConfig = null; String inputName=null; + String algorithm = this.defaultAlgorithm; + String provider = this.defaultProvider; + String salt = this.defaultSalt; + boolean encode = this.defaultEncode; if (modeConf!=null) { inputName = modeConf.getChild("input-module").getAttribute("name",null); if (inputName != null) { inputConfig = modeConf.getChild("input-module"); } + // read necessary parameters + algorithm = modeConf.getAttribute("algorithm", algorithm); + provider = modeConf.getAttribute("provider" , provider ); + salt = modeConf.getAttribute("salt" , salt ); + encode = modeConf.getAttributeAsBoolean("encode" , encode ); } - // read necessary parameters - String algorithm = modeConf.getAttribute("algorithm",this.defaultAlgorithm); - String provider = modeConf.getAttribute("provider" ,this.defaultProvider ); - String salt = modeConf.getAttribute("salt" ,this.defaultSalt ); - boolean encode = modeConf.getAttributeAsBoolean("encode" ,this.defaultEncode ); + Object result = null; @@ -204,18 +209,21 @@ // default vs dynamic Configuration inputConfig = null; String inputName=null; + String algorithm = this.defaultAlgorithm; + String provider = this.defaultProvider; + String salt = this.defaultSalt; + boolean encode = this.defaultEncode; if (modeConf!=null) { inputName = modeConf.getChild("input-module").getAttribute("name",null); if (inputName != null) { inputConfig = modeConf.getChild("input-module"); } + // read necessary parameters + algorithm = modeConf.getAttribute("algorithm", algorithm); + provider = modeConf.getAttribute("provider" , provider ); + salt = modeConf.getAttribute("salt" , salt ); + encode = modeConf.getAttributeAsBoolean("encode" , encode ); } - - // read necessary parameters - String algorithm = modeConf.getAttribute("algorithm",this.defaultAlgorithm); - String provider = modeConf.getAttribute("provider" ,this.defaultProvider ); - String salt = modeConf.getAttribute("salt" ,this.defaultSalt ); - boolean encode = modeConf.getAttributeAsBoolean("encode" ,this.defaultEncode ); Object[] values = getValues(name, objectModel, this.input, this.defaultInput, this.inputConf,
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]