This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-digester.git
The following commit(s) were added to refs/heads/master by this push:
new 7b556217 Update the GitHub pull request template for AI
7b556217 is described below
commit 7b55621723b3cfc61da8444f6e824a72ec59c73d
Author: Gary D. Gregory <[email protected]>
AuthorDate: Sun Jul 20 17:44:05 2025 -0400
Update the GitHub pull request template for AI
Better grammar
---
.../commons/digester3/SetNestedPropertiesRule.java | 2 +-
.../commons/digester3/plugins/Declaration.java | 4 ++--
.../digester3/plugins/PluginCreateRule.java | 22 +++++++++++-----------
.../commons/digester3/plugins/PluginManager.java | 6 +++---
.../commons/digester3/plugins/PluginRules.java | 6 +++---
.../digester3/BeanPropertySetterRuleTestCase.java | 4 ++--
.../commons/digester3/CallMethodRuleTestCase.java | 12 ++++++------
.../commons/digester3/LocationTrackerTestCase.java | 10 ++++++++--
.../digester3/SetNestedPropertiesRuleTestCase.java | 4 ++--
.../substitution/VariableExpansionTestCase.java | 12 ++++++------
10 files changed, 44 insertions(+), 38 deletions(-)
diff --git
a/commons-digester3-core/src/main/java/org/apache/commons/digester3/SetNestedPropertiesRule.java
b/commons-digester3-core/src/main/java/org/apache/commons/digester3/SetNestedPropertiesRule.java
index b7c43bf6..9957abed 100644
---
a/commons-digester3-core/src/main/java/org/apache/commons/digester3/SetNestedPropertiesRule.java
+++
b/commons-digester3-core/src/main/java/org/apache/commons/digester3/SetNestedPropertiesRule.java
@@ -188,7 +188,7 @@ public class SetNestedPropertiesRule
}
catch ( final NullPointerException e )
{
- log.error( "NullPointerException: " + "top=" + top +
",propName=" + propName + ",value=" + text + "!" );
+ log.error( "NullPointerException: top=" + top + ",propName=" +
propName + ",value=" + text + "!" );
throw e;
}
}
diff --git
a/commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/Declaration.java
b/commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/Declaration.java
index 527ad135..971f27d9 100644
---
a/commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/Declaration.java
+++
b/commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/Declaration.java
@@ -194,13 +194,13 @@ public class Declaration
{
if ( ruleLoader == null )
{
- log.debug( "No ruleLoader found for plugin declaration" + " id
[" + id + "]" + ", class ["
+ log.debug( "No ruleLoader found for plugin declaration id [" +
id + "], class ["
+ pluginClass.getName() + "]." );
}
else
{
log.debug( "RuleLoader of type [" +
ruleLoader.getClass().getName()
- + "] associated with plugin declaration" + " id [" + id +
"]" + ", class ["
+ + "] associated with plugin declaration id [" + id + "],
class ["
+ pluginClass.getName() + "]." );
}
}
diff --git
a/commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/PluginCreateRule.java
b/commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/PluginCreateRule.java
index 37a98a19..1294f905 100644
---
a/commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/PluginCreateRule.java
+++
b/commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/PluginCreateRule.java
@@ -136,7 +136,7 @@ public class PluginCreateRule
final boolean debug = log.isDebugEnabled();
if ( debug )
{
- log.debug( "PluginCreateRule.begin" + ": pattern=[" + pattern +
"]" + " match=[" + getDigester().getMatch()
+ log.debug( "PluginCreateRule.begin: pattern=[" + pattern + "]
match=[" + getDigester().getMatch()
+ "]" );
}
@@ -247,8 +247,8 @@ public class PluginCreateRule
getDigester().push( instance );
if ( debug )
{
- log.debug( "PluginCreateRule.begin" + ": pattern=[" + pattern +
"]" + " match=[" + getDigester().getMatch()
- + "]" + " pushed instance of plugin [" + pluginClass.getName()
+ "]" );
+ log.debug( "PluginCreateRule.begin: pattern=[" + pattern + "]
match=[" + getDigester().getMatch()
+ + "] pushed instance of plugin [" + pluginClass.getName() +
"]" );
}
// and now we have to fire any custom rules which would have
@@ -437,7 +437,7 @@ public class PluginCreateRule
final boolean debug = log.isDebugEnabled();
if ( debug )
{
- log.debug( "PluginCreateRule.postRegisterInit" + ": rule
registered for pattern [" + matchPattern + "]" );
+ log.debug( "PluginCreateRule.postRegisterInit: rule registered for
pattern [" + matchPattern + "]" );
}
if ( getDigester() == null )
@@ -447,7 +447,7 @@ public class PluginCreateRule
// to a Rules object which has not yet been added to a
// Digester object.
initException =
- new PluginConfigurationException( "Invalid invocation of
postRegisterInit" + ": digester not set." );
+ new PluginConfigurationException( "Invalid invocation of
postRegisterInit: digester not set." );
throw initException;
}
@@ -480,8 +480,8 @@ public class PluginCreateRule
// as done by PluginRules. Without wildcards, "below"
// just means startsWith, which is easy to check.
initException =
- new PluginConfigurationException( "A PluginCreateRule instance
has been mapped to" + " pattern ["
- + matchPattern + "]." + " This pattern includes a wildcard
character."
+ new PluginConfigurationException( "A PluginCreateRule instance
has been mapped to pattern ["
+ + matchPattern + "]. This pattern includes a wildcard
character."
+ " This is not supported by the plugin architecture." );
throw initException;
}
@@ -529,13 +529,13 @@ public class PluginCreateRule
if ( debug )
{
- log.debug( "init: pluginClassAttr set to per-digester values
[" + "ns=" + pluginClassAttrNs + ", name="
+ log.debug( "init: pluginClassAttr set to per-digester values
[ns=" + pluginClassAttrNs + ", name="
+ pluginClassAttr + "]" );
}
}
else if ( debug )
{
- log.debug( "init: pluginClassAttr set to rule-specific values [" +
"ns=" + pluginClassAttrNs
+ log.debug( "init: pluginClassAttr set to rule-specific values
[ns=" + pluginClassAttrNs
+ ", name=" + pluginClassAttr + "]" );
}
@@ -548,13 +548,13 @@ public class PluginCreateRule
if ( debug )
{
- log.debug( "init: pluginIdAttr set to per-digester values [" +
"ns=" + pluginIdAttrNs + ", name="
+ log.debug( "init: pluginIdAttr set to per-digester values
[ns=" + pluginIdAttrNs + ", name="
+ pluginIdAttr + "]" );
}
}
else if ( debug )
{
- log.debug( "init: pluginIdAttr set to rule-specific values [" +
"ns=" + pluginIdAttrNs + ", name="
+ log.debug( "init: pluginIdAttr set to rule-specific values [ns=" +
pluginIdAttrNs + ", name="
+ pluginIdAttr + "]" );
}
}
diff --git
a/commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/PluginManager.java
b/commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/PluginManager.java
index db5802dd..3188a501 100644
---
a/commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/PluginManager.java
+++
b/commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/PluginManager.java
@@ -100,7 +100,7 @@ public class PluginManager
declarationsById.put( id, decl );
if ( debug )
{
- log.debug( "Indexing plugin-id [" + id + "]" + " -> class [" +
pluginClass.getName() + "]" );
+ log.debug( "Indexing plugin-id [" + id + "] -> class [" +
pluginClass.getName() + "]" );
}
}
}
@@ -147,8 +147,8 @@ public class PluginManager
}
catch ( final PluginException e )
{
- throw new PluginException( "Unable to locate plugin rules for
plugin" + " with id [" + id + "]"
- + ", and class [" + pluginClass.getName() + "]" + ":" +
e.getMessage(), e.getCause() );
+ throw new PluginException( "Unable to locate plugin rules for
plugin with id [" + id + "]"
+ + ", and class [" + pluginClass.getName() + "]:" +
e.getMessage(), e.getCause() );
}
}
log.debug( "scanned ruleFinders." );
diff --git
a/commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/PluginRules.java
b/commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/PluginRules.java
index 7c04d8ee..1f1f5280 100644
---
a/commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/PluginRules.java
+++
b/commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/PluginRules.java
@@ -159,7 +159,7 @@ public class PluginRules
if ( debug )
{
- log.debug( "add entry" + ": mapping pattern [" + pattern + "]" + "
to rule of type ["
+ log.debug( "add entry: mapping pattern [" + pattern + "] to rule
of type ["
+ rule.getClass().getName() + "]" );
}
@@ -179,7 +179,7 @@ public class PluginRules
// alas, can't throw exception
log.warn( "An attempt was made to add a rule with a pattern that"
- + "is not at or below the mountpoint of the current" + "
PluginRules object." + " Rule pattern: "
+ + "is not at or below the mountpoint of the current
PluginRules object. Rule pattern: "
+ pattern + ", mountpoint: " + mountPoint + ", rule type: " +
rule.getClass().getName() );
return;
}
@@ -210,7 +210,7 @@ public class PluginRules
if ( debug )
{
- log.debug( "add exit" + ": mapped pattern [" + pattern + "]" + "
to rule of type ["
+ log.debug( "add exit: mapped pattern [" + pattern + "] to rule of
type ["
+ rule.getClass().getName() + "]" );
}
}
diff --git
a/commons-digester3-core/src/test/java/org/apache/commons/digester3/BeanPropertySetterRuleTestCase.java
b/commons-digester3-core/src/test/java/org/apache/commons/digester3/BeanPropertySetterRuleTestCase.java
index fa03ec1c..38fb54d4 100644
---
a/commons-digester3-core/src/test/java/org/apache/commons/digester3/BeanPropertySetterRuleTestCase.java
+++
b/commons-digester3-core/src/test/java/org/apache/commons/digester3/BeanPropertySetterRuleTestCase.java
@@ -46,8 +46,8 @@ public class BeanPropertySetterRuleTestCase
/**
* Simple test XML document used in the tests.
*/
- protected static final String TEST_XML = "<?xml version='1.0'?>" +
"<root>ROOT BODY" + "<alpha>ALPHA BODY</alpha>"
- + "<beta>BETA BODY</beta>" + "<gamma>GAMMA BODY</gamma>" +
"<delta>DELTA BODY</delta>" + "</root>";
+ protected static final String TEST_XML = "<?xml version='1.0'?><root>ROOT
BODY" + "<alpha>ALPHA BODY</alpha>"
+ + "<beta>BETA BODY</beta><gamma>GAMMA BODY</gamma>" + "<delta>DELTA
BODY</delta>" + "</root>";
/**
* Test that you can successfully automatically set properties.
diff --git
a/commons-digester3-core/src/test/java/org/apache/commons/digester3/CallMethodRuleTestCase.java
b/commons-digester3-core/src/test/java/org/apache/commons/digester3/CallMethodRuleTestCase.java
index 31d0eef9..5906b697 100644
---
a/commons-digester3-core/src/test/java/org/apache/commons/digester3/CallMethodRuleTestCase.java
+++
b/commons-digester3-core/src/test/java/org/apache/commons/digester3/CallMethodRuleTestCase.java
@@ -271,8 +271,8 @@ public class CallMethodRuleTestCase
{
final StringReader reader =
- new StringReader( "<?xml version='1.0' ?><root>" +
"<spam>Simple</spam>"
- +
"<spam>Complex<spam>Deep<spam>Deeper<spam>Deepest</spam></spam></spam></spam>"
+ "</root>" );
+ new StringReader( "<?xml version='1.0' ?><root><spam>Simple</spam>"
+ +
"<spam>Complex<spam>Deep<spam>Deeper<spam>Deepest</spam></spam></spam></spam></root>"
);
final Digester digester = new Digester();
@@ -443,8 +443,8 @@ public class CallMethodRuleTestCase
throws Exception
{
final String xml =
- "<?xml version='1.0'?><main>" + "<alpha><beta>Ignore
this</beta></alpha>"
- + "<beta><epsilon><gamma>Ignore that</gamma></epsilon></beta>"
+ "</main>";
+ "<?xml version='1.0'?><main><alpha><beta>Ignore
this</beta></alpha>"
+ + "<beta><epsilon><gamma>Ignore
that</gamma></epsilon></beta></main>";
final SimpleTestBean bean = new SimpleTestBean();
bean.setAlphaBeta( "[UNSET]", "[UNSET]" );
@@ -654,8 +654,8 @@ public class CallMethodRuleTestCase
{
final StringReader reader =
- new StringReader( "<?xml version='1.0' ?><root>" + "<param
class='int' coolness='true'>25</param>"
- + "<param class='long'>50</param>" + "<param class='float'
coolness='false'>90</param></root>" );
+ new StringReader( "<?xml version='1.0' ?><root><param class='int'
coolness='true'>25</param>"
+ + "<param class='long'>50</param><param class='float'
coolness='false'>90</param></root>" );
final Digester digester = new Digester();
// SimpleLog log = new SimpleLog("{testTwoCalls:Digester]");
diff --git
a/commons-digester3-core/src/test/java/org/apache/commons/digester3/LocationTrackerTestCase.java
b/commons-digester3-core/src/test/java/org/apache/commons/digester3/LocationTrackerTestCase.java
index d9086145..97af6413 100644
---
a/commons-digester3-core/src/test/java/org/apache/commons/digester3/LocationTrackerTestCase.java
+++
b/commons-digester3-core/src/test/java/org/apache/commons/digester3/LocationTrackerTestCase.java
@@ -73,9 +73,15 @@ public class LocationTrackerTestCase
void testAll()
throws Exception
{
+ // @formatter:off
final String TEST_XML =
- "<?xml version='1.0'?>\n" + "<box id='root'>\n" + " <subBox
id='box1'/>\n" + " <ignoreme/>\n"
- + " <subBox id='box2'/> <subBox id='box3'/>\n" + "</box>";
+ "<?xml version='1.0'?>\n" +
+ "<box id='root'>\n" +
+ " <subBox id='box1'/>\n" +
+ " <ignoreme/>\n" +
+ " <subBox id='box2'/> <subBox id='box3'/>\n" +
+ "</box>";
+ // @formatter:on
final LocationTracker locnTracker = new LocationTracker();
diff --git
a/commons-digester3-core/src/test/java/org/apache/commons/digester3/SetNestedPropertiesRuleTestCase.java
b/commons-digester3-core/src/test/java/org/apache/commons/digester3/SetNestedPropertiesRuleTestCase.java
index 7c4b3c0c..e5c91241 100644
---
a/commons-digester3-core/src/test/java/org/apache/commons/digester3/SetNestedPropertiesRuleTestCase.java
+++
b/commons-digester3-core/src/test/java/org/apache/commons/digester3/SetNestedPropertiesRuleTestCase.java
@@ -45,8 +45,8 @@ public class SetNestedPropertiesRuleTestCase
/**
* Simple test XML document used in the tests.
*/
- protected static final String TEST_XML = "<?xml version='1.0'?>" +
"<root>ROOT BODY" + "<alpha>ALPHA BODY</alpha>"
- + "<beta>BETA BODY</beta>" + "<gamma>GAMMA BODY</gamma>" +
"<delta>DELTA BODY</delta>" + "</root>";
+ protected static final String TEST_XML = "<?xml version='1.0'?><root>ROOT
BODY<alpha>ALPHA BODY</alpha>"
+ + "<beta>BETA BODY</beta><gamma>GAMMA BODY</gamma><delta>DELTA
BODY</delta></root>";
/**
* Test that you can successfully automatically set properties.
diff --git
a/commons-digester3-core/src/test/java/org/apache/commons/digester3/substitution/VariableExpansionTestCase.java
b/commons-digester3-core/src/test/java/org/apache/commons/digester3/substitution/VariableExpansionTestCase.java
index 49fe6877..d99de3d8 100644
---
a/commons-digester3-core/src/test/java/org/apache/commons/digester3/substitution/VariableExpansionTestCase.java
+++
b/commons-digester3-core/src/test/java/org/apache/commons/digester3/substitution/VariableExpansionTestCase.java
@@ -93,7 +93,7 @@ public class VariableExpansionTestCase
throws SAXException, IOException
{
- final String xml = "<root>" + "Twas noun{1} and the noun{2}" + " did
verb{1} and verb{2} in the noun{3}" + "</root>";
+ final String xml = "<root>" + "Twas noun{1} and the noun{2} did
verb{1} and verb{2} in the noun{3}" + "</root>";
final StringReader input = new StringReader( xml );
final Digester digester = new Digester();
@@ -121,7 +121,7 @@ public class VariableExpansionTestCase
assertNotNull( root, "Digester returned no object" );
- assertEquals( "Twas brillig and the slithy toves" + " did gyre and
gimble in the wabe", root.getAlpha() );
+ assertEquals( "Twas brillig and the slithy toves did gyre and gimble
in the wabe", root.getAlpha() );
}
/**
@@ -162,8 +162,8 @@ public class VariableExpansionTestCase
throws SAXException, IOException
{
final String xml =
- "<root>" + "<property name='attr1' value='prop.value1'/>"
- + "<property name='attr2' value='substituted-${attr1}'/>" +
"<bean alpha='${attr2}'/>" + "</root>";
+ "<root><property name='attr1' value='prop.value1'/>"
+ + "<property name='attr2' value='substituted-${attr1}'/><bean
alpha='${attr2}'/>" + "</root>";
final StringReader input = new StringReader( xml );
final Digester digester = createDigesterThatCanDoAnt();
@@ -186,7 +186,7 @@ public class VariableExpansionTestCase
{
final String xml =
- "<root>" + "<bean alpha='${attr1}' beta='var{attr1}'/>" + "<bean
alpha='${attr2}' beta='var{attr2}'/>"
+ "<root>" + "<bean alpha='${attr1}' beta='var{attr1}'/><bean
alpha='${attr2}' beta='var{attr2}'/>"
+ "</root>";
final StringReader input = new StringReader( xml );
@@ -244,7 +244,7 @@ public class VariableExpansionTestCase
void testExpansionWithMutableSource()
throws SAXException, IOException
{
- final String xml = "<root>" + "<property name='attr'
value='prop.value'/>" + "<bean alpha='${attr}'/>" + "</root>";
+ final String xml = "<root>" + "<property name='attr'
value='prop.value'/>" + "<bean alpha='${attr}'/></root>";
final StringReader input = new StringReader( xml );
final Digester digester = createDigesterThatCanDoAnt();