Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed #555 #556

Merged
merged 1 commit into from
Aug 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.eclipse.jdt.core.dom.MemberValuePair;
import org.eclipse.jdt.core.dom.MethodDeclaration;
import org.eclipse.jdt.core.dom.NormalAnnotation;
import org.eclipse.jdt.core.dom.SimpleName;
import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
import org.eclipse.jdt.core.dom.StringLiteral;
Expand Down Expand Up @@ -148,9 +149,15 @@ protected void record(MethodDeclaration method, StringLiteral value){
protected void record(MethodDeclaration method, ArrayInitializer values) {
List<?> literals = values.expressions();
List<String> paramNames = new ArrayList<String>(literals.size());
for(int i= 0; i < literals.size(); i++) {
StringLiteral str = (StringLiteral) literals.get(i);
paramNames.add(str.getLiteralValue());
for(Object expr : literals) {
if (expr instanceof StringLiteral) {
StringLiteral str = (StringLiteral) expr;
paramNames.add(str.getLiteralValue());
} else if (expr instanceof SimpleName) {
SimpleName sn = (SimpleName) expr;
paramNames.add(sn.getIdentifier());
}

}

record(method, paramNames);
Expand Down