Zhongxin Yan created LANG-1809:
----------------------------------

             Summary: Typo in method name geStringtVarStringArgs in 
MethodFixtures
                 Key: LANG-1809
                 URL: https://issues.apache.org/jira/browse/LANG-1809
             Project: Commons Lang
          Issue Type: Bug
          Components: lang.*
    Affects Versions: 3.20.0
            Reporter: Zhongxin Yan


The {{MethodFixtures}} class contains a method with a typo in its name 
({{{}geStringtVarStringArgs{}}}) and a corresponding static helper method that 
references this misspelled name, which impacts code readability and 
maintainability: 

1. Misspelled method name

 
{code:java}
// Incorrect: "geStringt" (extra 't' after 'String')
public String geStringtVarStringArgs(final String... strings) {
    return "XYZ";
}{code}
2. Dependent static helper method
The static method getMethodForGetStringVarStringArgs() references the 
misspelled method name via reflection:

 
{code:java}
static Method getMethodForGetStringVarStringArgs() throws 
NoSuchMethodException, SecurityException {
    // References the typo'd method name "geStringtVarStringArgs"
    return getDeclaredMethod("geStringtVarStringArgs", String[].class);
} {code}
 

 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to