Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Fix NullPointerException
  • Loading branch information
rcosta358 committed Feb 14, 2026
commit 6ac6ff768e44437c4131d2768e477ef9814ca99c
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,24 @@ public <T> void visitCtInterface(CtInterface<T> intrface) {
@Override
public <T> void visitCtConstructor(CtConstructor<T> c) {
context.enterContext();
getRefinementFromAnnotation(c);
mfc.getConstructorRefinements(c);
super.visitCtConstructor(c);
try {
getRefinementFromAnnotation(c);
mfc.getConstructorRefinements(c);
super.visitCtConstructor(c);
} catch (LJError e) {
diagnostics.add(e);
}
context.exitContext();
}

public <R> void visitCtMethod(CtMethod<R> method) {
context.enterContext();
mfc.getMethodRefinements(method);
super.visitCtMethod(method);
try {
mfc.getMethodRefinements(method);
super.visitCtMethod(method);
} catch (LJError e) {
diagnostics.add(e);
}
context.exitContext();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ public <R> void getReturnRefinements(CtReturn<R> ret) throws LJError {
if (method.getParent() instanceof CtClass) {
RefinedFunction fi = rtc.getContext().getFunction(method.getSimpleName(),
((CtClass<?>) method.getParent()).getQualifiedName(), method.getParameters().size());
if (fi == null)
return;
Comment on lines +184 to +185
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just in case.


List<Variable> lv = fi.getArguments();
for (Variable v : lv) {
Expand Down