Fix the bug of identifying upper case char.
This commit is contained in:
@@ -41,7 +41,7 @@ public abstract class Parser implements ParserInterface {
|
|||||||
|
|
||||||
// Filter out modified actions of changing method names, method parameters, variable names and field names in declaration part.
|
// Filter out modified actions of changing method names, method parameters, variable names and field names in declaration part.
|
||||||
// TODO: variable effects range, sub-actions are these kinds of modification?
|
// TODO: variable effects range, sub-actions are these kinds of modification?
|
||||||
actionSets = new ActionFilter().filterOutUselessActions(allActionSets);
|
actionSets.addAll(new ActionFilter().filterOutUselessActions(allActionSets));
|
||||||
}
|
}
|
||||||
|
|
||||||
return actionSets;
|
return actionSets;
|
||||||
@@ -151,7 +151,8 @@ public abstract class Parser implements ParserInterface {
|
|||||||
} else {
|
} else {
|
||||||
if (actionStr.startsWith("Name")) {
|
if (actionStr.startsWith("Name")) {
|
||||||
actionStr = actionStr.substring(5, 6);
|
actionStr = actionStr.substring(5, 6);
|
||||||
if (!actionStr.equals(actionStr.toLowerCase())) {
|
char c = actionStr.charAt(5);
|
||||||
|
if (Character.isUpperCase(c)) {
|
||||||
singleEdit = singleEdit.replace("SimpleName", "Name");
|
singleEdit = singleEdit.replace("SimpleName", "Name");
|
||||||
} else {
|
} else {
|
||||||
singleEdit = singleEdit.replace("SimpleName", "Variable");
|
singleEdit = singleEdit.replace("SimpleName", "Variable");
|
||||||
|
|||||||
Reference in New Issue
Block a user