commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David WIlkinson" <d...@iquo.co.uk>
Subject [PATCH] Error with the use of call-param-rule when using xml to configure the digester. Also removed calls to deprecated functions.
Date Wed, 21 Aug 2002 16:33:21 GMT
cvs diff -w -i DigesterRuleParser.java (in directory
D:\CVS\jakarta-commons\digester\src\java\org\apache\commons\digester\xml
rules\)
Index: DigesterRuleParser.java
===================================================================
RCS file:
/home/cvspublic/jakarta-commons/digester/src/java/org/apache/commons/dig
ester/xmlrules/DigesterRuleParser.java,v
retrieving revision 1.8
diff -w -i -r1.8 DigesterRuleParser.java
222c222
<         digester.addRule("*/pattern", new PatternRule(digester,
"value"));
---
>           digester.addRule("*/pattern", new PatternRule("value"));
224c224
<         digester.addRule("*/include", new IncludeRule(digester));
---
>           digester.addRule("*/include", new IncludeRule());
227c227
<         digester.addRule("*/call-method-rule", new
PatternRule(digester, "pattern"));
---
>           digester.addRule("*/call-method-rule", new
PatternRule("pattern"));
229a230,233
>           digester.addFactoryCreate("*/call-param-rule", new
CallParamRuleFactory());
>           digester.addRule("*/call-param-rule", new
PatternRule("pattern"));
>           digester.addSetNext("*/call-param-rule", "add",
ruleClassName);
> 
231c235
<         digester.addRule("*/factory-create-rule", new
PatternRule(digester, "pattern"));
---
>           digester.addRule("*/factory-create-rule", new
PatternRule("pattern"));
235c239
<         digester.addRule("*/object-create-rule", new
PatternRule(digester, "pattern"));
---
>           digester.addRule("*/object-create-rule", new
PatternRule("pattern"));
239c243
<         digester.addRule("*/set-properties-rule", new
PatternRule(digester, "pattern"));
---
>           digester.addRule("*/set-properties-rule", new
PatternRule("pattern"));
242c246
<         digester.addRule("*/set-properties-rule/alias", new
SetPropertiesAliasRule(digester));
---
>           digester.addRule("*/set-properties-rule/alias", new
SetPropertiesAliasRule());
245c249
<         digester.addRule("*/set-property-rule", new
PatternRule(digester, "pattern"));
---
>           digester.addRule("*/set-property-rule", new
PatternRule("pattern"));
249c253
<         digester.addRule("*/set-top-rule", new PatternRule(digester,
"pattern"));
---
>           digester.addRule("*/set-top-rule", new
PatternRule("pattern"));
253c257
<         digester.addRule("*/set-next-rule", new PatternRule(digester,
"pattern"));
---
>           digester.addRule("*/set-next-rule", new
PatternRule("pattern"));
275,276c279,280
<         public PatternRule(Digester digester, String attrName) {
<             super(digester);
---
>           public PatternRule(String attrName) {
>                 super();
312,313c316,317
<         public IncludeRule(Digester digester) {
<             super(digester);
---
>           public IncludeRule() {
>                 super();
344c348
<             URL fileURL =
getDigester().getClassLoader().getResource(fileName);
---
>                 URL fileURL =
DigesterRuleParser.this.getClass().getClassLoader().getResource(fileName
);
357d360
< 
359,361d361
<
digester.setUseContextClassLoader(getDigester().getUseContextClassLoader
());
<             digester.setClassLoader(getDigester().getClassLoader());
<             digester.setErrorHandler(getDigester().getErrorHandler());
380c380
<             Class cls = Class.forName(className, true,
digester.getClassLoader());
---
>                 Class cls = Class.forName(className);
508,509c508
<                     callMethodRule = new
CallMethodRule(targetDigester, methodName,
<                                                         paramCount);
---
>                             callMethodRule = new
CallMethodRule(methodName, paramCount);
518,520c517
<                     callMethodRule = new CallMethodRule(
<                                                     targetDigester, 
<                                                     methodName, 
---
>                             callMethodRule = new CallMethodRule(
methodName,
530c527
<      * Factory for creating a CallMethodRule.
---
>      * Factory for creating a CallParamRule.
535,540c532,536
<             // create callmethodrule
<             int paramNumber =
Integer.parseInt(attributes.getValue("paramnumber"));
<             String methodName = attributes.getValue("attrname");
<             Rule callMethodRule = new CallMethodRule(targetDigester,
methodName,
<                     paramNumber);
<             return callMethodRule;
---
>                 // create callparamrule
>                 int paramIndex =
Integer.parseInt(attributes.getValue("paramnumber"));
>                 String attributeName =
attributes.getValue("attrname");
>                 Rule callParamRule = new CallParamRule( paramIndex,
attributeName );
>                 return callParamRule;
552c548
<                     new FactoryCreateRule(targetDigester, className)
---
>                             new FactoryCreateRule( className)
554c550
<                     new FactoryCreateRule(targetDigester, className,
attrName);
---
>                             new FactoryCreateRule( className,
attrName);
566c562
<                     new ObjectCreateRule(targetDigester, className)
---
>                             new ObjectCreateRule( className)
568c564
<                     new ObjectCreateRule(targetDigester, className,
attrName);
---
>                             new ObjectCreateRule( className,
attrName);
577c573
<             return new SetPropertiesRule(targetDigester);
---
>                 return new SetPropertiesRule();
588c584
<             return new SetPropertyRule(targetDigester, name, value);
---
>                 return new SetPropertyRule( name, value);
600c596
<                     new SetTopRule(targetDigester, methodName)
---
>                             new SetTopRule( methodName)
602c598
<                     new SetTopRule(targetDigester, methodName,
paramType);
---
>                             new SetTopRule( methodName, paramType);
614c610
<                     new SetNextRule(targetDigester, methodName)
---
>                             new SetNextRule( methodName)
616c612
<                     new SetNextRule(targetDigester, methodName,
paramType);
---
>                             new SetNextRule( methodName, paramType);
631,632c627,628
<         public SetPropertiesAliasRule(Digester digester) {
<             super(digester);
---
>           public SetPropertiesAliasRule() {
>                 super();
 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message