This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch the
in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git
The following commit(s) were added to refs/heads/the by this push:
new 15e9943 More conventional variable names
15e9943 is described below
commit 15e9943ceeae8b9f8ddfc23d53ad25eb5b299bba
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Mon Jun 30 06:23:39 2025 -0400
More conventional variable names
---
.../rules/BanDependencyManagementScope.java | 4 +--
.../org/apache/maven/enforcer/rules/RequireOS.java | 40 +++++++++++-----------
.../enforcer/rules/version/RequireJavaVersion.java | 24 ++++++-------
.../internal/DefaultEnforcementRuleHelper.java | 24 ++++++-------
.../maven/plugins/enforcer/MockEnforcerRule.java | 6 ++--
5 files changed, 49 insertions(+), 49 deletions(-)
diff --git
a/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/BanDependencyManagementScope.java
b/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/BanDependencyManagementScope.java
index 0be93eb..da8f453 100644
---
a/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/BanDependencyManagementScope.java
+++
b/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/BanDependencyManagementScope.java
@@ -113,8 +113,8 @@ public final class BanDependencyManagementScope extends
AbstractStandardEnforcer
+ System.lineSeparator();
}
- public void setExcludes(List<String> theExcludes) {
- this.excludes = theExcludes;
+ public void setExcludes(List<String> excludes) {
+ this.excludes = excludes;
}
@Override
diff --git
a/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/RequireOS.java
b/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/RequireOS.java
index a8f7bd4..8c680e3 100644
---
a/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/RequireOS.java
+++
b/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/RequireOS.java
@@ -231,52 +231,52 @@ public final class RequireOS extends
AbstractStandardEnforcerRule {
* </ul>
* Note: '!' is allowed at the beginning of the string and still
considered valid.
*
- * @param theFamily the family to check.
- * @return true if one of the valid families.
+ * @param family the family to check
+ * @return true if one of the valid families
*/
- public boolean isValidFamily(String theFamily) {
+ public boolean isValidFamily(String family) {
// in case they are checking !family
- theFamily = StringUtils.stripStart(theFamily, "!");
+ family = StringUtils.stripStart(family, "!");
- return (theFamily == null || theFamily.isEmpty())
- || Os.getValidFamilies().contains(theFamily);
+ return (family == null || family.isEmpty())
+ || Os.getValidFamilies().contains(family);
}
/**
- * Sets the arch.
+ * Sets the architecture.
*
- * @param theArch the arch to set
+ * @param architecture the architecture to set
*/
- public void setArch(String theArch) {
- this.arch = theArch;
+ public void setArch(String architecture) {
+ this.arch = architecture;
}
/**
* Sets the family.
*
- * @param theFamily the family to set
+ * @param family the family to set
*/
- public void setFamily(String theFamily) {
- this.family = theFamily;
+ public void setFamily(String family) {
+ this.family = family;
}
/**
* Sets the name.
*
- * @param theName the name to set
+ * @param name the name to set
*/
- public void setName(String theName) {
- this.name = theName;
+ public void setName(String name) {
+ this.name = name;
}
/**
* Sets the version.
*
- * @param theVersion the version to set
+ * @param version the version to set
*/
- public void setVersion(String theVersion) {
- this.version = theVersion;
+ public void setVersion(String version) {
+ this.version = version;
}
/**
@@ -288,7 +288,7 @@ public final class RequireOS extends
AbstractStandardEnforcerRule {
@Override
public String getCacheId() {
- // return the hashcodes of all the parameters
+ // return the hash codes of all the parameters
StringBuilder b = new StringBuilder();
if (version != null && !version.isEmpty()) {
b.append(version.hashCode());
diff --git
a/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/version/RequireJavaVersion.java
b/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/version/RequireJavaVersion.java
index 657ed54..caee647 100644
---
a/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/version/RequireJavaVersion.java
+++
b/enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/version/RequireJavaVersion.java
@@ -50,19 +50,19 @@ public final class RequireJavaVersion extends
AbstractVersionEnforcer {
private boolean display = false;
@Override
- public void setVersion(String theVersion) {
+ public void setVersion(String version) {
- if ("8".equals(theVersion)) {
+ if ("8".equals(version)) {
super.setVersion("1.8");
return;
}
- if (!theVersion.contains("8")) {
- super.setVersion(theVersion);
+ if (!version.contains("8")) {
+ super.setVersion(version);
return;
}
- Matcher matcher = JDK8_VERSION_PATTERN.matcher(theVersion);
+ Matcher matcher = JDK8_VERSION_PATTERN.matcher(version);
StringBuffer result = new StringBuffer();
while (matcher.find()) {
@@ -102,17 +102,17 @@ public final class RequireJavaVersion extends
AbstractVersionEnforcer {
}
/**
- * Converts a jdk string from 1.5.0-11b12 to a single 3 digit version like
1.5.0-11
+ * Converts a JDK string from 1.5.0-11b12 to a single 3 digit version like
1.5.0-11
*
- * @param theJdkVersion to be converted.
- * @return the converted string.
+ * @param jdkVersion to be converted
+ * @return the converted string
*/
- public static String normalizeJDKVersion(String theJdkVersion) {
+ public static String normalizeJDKVersion(String jdkVersion) {
- theJdkVersion = theJdkVersion.replaceAll("_|-", ".");
- String tokenArray[] = StringUtils.split(theJdkVersion, ".");
+ jdkVersion = jdkVersion.replaceAll("_|-", ".");
+ String tokenArray[] = StringUtils.split(jdkVersion, ".");
List<String> tokens = Arrays.asList(tokenArray);
- StringBuilder buffer = new StringBuilder(theJdkVersion.length());
+ StringBuilder buffer = new StringBuilder(jdkVersion.length());
Iterator<String> iter = tokens.iterator();
for (int i = 0; i < tokens.size() && i < 4; i++) {
diff --git
a/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/internal/DefaultEnforcementRuleHelper.java
b/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/internal/DefaultEnforcementRuleHelper.java
index 51536d6..617475b 100644
---
a/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/internal/DefaultEnforcementRuleHelper.java
+++
b/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/internal/DefaultEnforcementRuleHelper.java
@@ -79,13 +79,13 @@ public class DefaultEnforcementRuleHelper implements
EnforcerRuleHelper {
}
@Override
- public File alignToBaseDirectory(File theFile) {
- return evaluator.alignToBaseDirectory(theFile);
+ public File alignToBaseDirectory(File file) {
+ return evaluator.alignToBaseDirectory(file);
}
@Override
- public Object evaluate(String theExpression) throws
ExpressionEvaluationException {
- return evaluator.evaluate(theExpression);
+ public Object evaluate(String expression) throws
ExpressionEvaluationException {
+ return evaluator.evaluate(expression);
}
@Override
@@ -94,23 +94,23 @@ public class DefaultEnforcementRuleHelper implements
EnforcerRuleHelper {
}
@Override
- public Object getComponent(String theComponentKey) throws
ComponentLookupException {
- return container.lookup(theComponentKey);
+ public Object getComponent(String componentKey) throws
ComponentLookupException {
+ return container.lookup(componentKey);
}
@Override
- public Object getComponent(String theRole, String theRoleHint) throws
ComponentLookupException {
- return container.lookup(theRole, theRoleHint);
+ public Object getComponent(String role, String roleHint) throws
ComponentLookupException {
+ return container.lookup(role, roleHint);
}
@Override
- public List<Object> getComponentList(String theRole) throws
ComponentLookupException {
- return container.lookupList(theRole);
+ public List<Object> getComponentList(String role) throws
ComponentLookupException {
+ return container.lookupList(role);
}
@Override
- public Map<String, Object> getComponentMap(String theRole) throws
ComponentLookupException {
- return container.lookupMap(theRole);
+ public Map<String, Object> getComponentMap(String role) throws
ComponentLookupException {
+ return container.lookupMap(role);
}
@Override
diff --git
a/maven-enforcer-plugin/src/test/java/org/apache/maven/plugins/enforcer/MockEnforcerRule.java
b/maven-enforcer-plugin/src/test/java/org/apache/maven/plugins/enforcer/MockEnforcerRule.java
index 3e3cb3a..0f969bc 100644
---
a/maven-enforcer-plugin/src/test/java/org/apache/maven/plugins/enforcer/MockEnforcerRule.java
+++
b/maven-enforcer-plugin/src/test/java/org/apache/maven/plugins/enforcer/MockEnforcerRule.java
@@ -63,10 +63,10 @@ public class MockEnforcerRule implements EnforcerRule {
}
/**
- * @param theFailRule the failRule to set
+ * @param failRule the failRule to set
*/
- public void setFailRule(boolean theFailRule) {
- this.failRule = theFailRule;
+ public void setFailRule(boolean failRule) {
+ this.failRule = failRule;
}
/**