This particular case is in test code but I've seen "with" on the main side, so I used that. I did not do an exhaustive search. We should use the same prefix all over IMO, it does not look very pro otherwise (IMO again). I do not care if it is "set" or "with", I care more that it is consistent.
Gary On Tue, Aug 9, 2016 at 10:10 PM, Matt Sicker <[email protected]> wrote: > I brought this topic up a while back on using with or set, and I don't > recall which one we agreed on. It would be nice to be consistent, though, > as both styles are currently in use (and I've written at least one of each > unfortunately). > > ---------- Forwarded message ---------- > From: <[email protected]> > Date: 9 August 2016 at 19:27 > Subject: logging-log4j2 git commit: Use "with" as the Builder setter > method prefix. > To: [email protected] > > > Repository: logging-log4j2 > Updated Branches: > refs/heads/master f95a85b8d -> e9cec779d > > > Use "with" as the Builder setter method prefix. > > Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo > Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit > /e9cec779 > Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/e9cec779 > Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/e9cec779 > > Branch: refs/heads/master > Commit: e9cec779d2f6722f97c6e403502a5789ebcaeaa8 > Parents: f95a85b > Author: Gary Gregory <[email protected]> > Authored: Tue Aug 9 17:27:19 2016 -0700 > Committer: Gary Gregory <[email protected]> > Committed: Tue Aug 9 17:27:19 2016 -0700 > > ---------------------------------------------------------------------- > .../log4j/core/config/plugins/validation/ValidatingPlugin.java | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > ---------------------------------------------------------------------- > > > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e > 9cec779/log4j-core/src/test/java/org/apache/logging/log4j/co > re/config/plugins/validation/ValidatingPlugin.java > ---------------------------------------------------------------------- > diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/con > fig/plugins/validation/ValidatingPlugin.java > b/log4j-core/src/test/java/org/apache/logging/log4j/core/con > fig/plugins/validation/ValidatingPlugin.java > index 95a4209..6068f46 100644 > --- a/log4j-core/src/test/java/org/apache/logging/log4j/core/con > fig/plugins/validation/ValidatingPlugin.java > +++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/con > fig/plugins/validation/ValidatingPlugin.java > @@ -57,7 +57,7 @@ public class ValidatingPlugin { > @Required(message = "The name given by the builder is null") > private String name; > > - public Builder setName(final String name) { > + public Builder withName(final String name) { > this.name = name; > return this; > } > > > > > -- > Matt Sicker <[email protected]> > -- E-Mail: [email protected] | [email protected] Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> Spring Batch in Action <http://www.manning.com/templier/> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory
