-
Notifications
You must be signed in to change notification settings - Fork 15
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
Detect cyclical class hierarchy and prevent infinite recursion when calculating all fields and methods of an object #725
Comments
datho7561
added a commit
to datho7561/quarkus-ls
that referenced
this issue
Sep 1, 2022
If a cycle is detected, don't return any of the properties or methods of the class. Prevent ResolvedJavaTypeInfo from being fetched from qute.jdt multiple times. This prevents completion from freezing when you try to complete the properties and methods of an object whose class is part of an inheritance cycle. Closes redhat-developer#725 Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561
added a commit
to datho7561/quarkus-ls
that referenced
this issue
Sep 1, 2022
If a cycle is detected, don't return any of the properties or methods of the class. Prevent ResolvedJavaTypeInfo from being fetched from qute.jdt multiple times. This prevents completion from freezing when you try to complete the properties and methods of an object whose class is part of an inheritance cycle. Closes redhat-developer#725 Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561
added a commit
to datho7561/quarkus-ls
that referenced
this issue
Sep 7, 2022
If a cycle is detected, don't return any of the properties or methods of the class. Prevent ResolvedJavaTypeInfo from being fetched from qute.jdt multiple times. This prevents completion from freezing when you try to complete the properties and methods of an object whose class is part of an inheritance cycle. Closes redhat-developer#725 Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561
added a commit
to datho7561/quarkus-ls
that referenced
this issue
Sep 7, 2022
If a cycle is detected, don't return any of the properties or methods of the class. Prevent ResolvedJavaTypeInfo from being fetched from qute.jdt multiple times. This prevents completion from freezing when you try to complete the properties and methods of an object whose class is part of an inheritance cycle. Closes redhat-developer#725 Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561
added a commit
to datho7561/quarkus-ls
that referenced
this issue
Sep 7, 2022
If a cycle is detected, don't return any of the properties or methods of the class. Prevent ResolvedJavaTypeInfo from being fetched from qute.jdt multiple times. This prevents completion from freezing when you try to complete the properties and methods of an object whose class is part of an inheritance cycle. Closes redhat-developer#725 Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561
added a commit
to datho7561/quarkus-ls
that referenced
this issue
Sep 7, 2022
Prevent types from being visited twice while collecting type information. This prevents validation, completion, and code actions from freezing when working with objects of classes that have cyclic inheritance. Closes redhat-developer#725 Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561
added a commit
to datho7561/quarkus-ls
that referenced
this issue
Sep 7, 2022
Prevent types from being visited twice while collecting type information. This prevents validation, completion, and code actions from freezing when working with objects of classes that have cyclic inheritance. Closes redhat-developer#725 Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561
added a commit
to datho7561/quarkus-ls
that referenced
this issue
Sep 8, 2022
Prevent types from being visited twice while collecting type information. This prevents validation, completion, and code actions from freezing when working with objects of classes that have cyclic inheritance. Closes redhat-developer#725 Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561
added a commit
to datho7561/quarkus-ls
that referenced
this issue
Sep 8, 2022
Prevent types from being visited twice while collecting type information. This prevents validation, completion, and code actions from freezing when working with objects of classes that have cyclic inheritance. Closes redhat-developer#725 Signed-off-by: David Thompson <davthomp@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Let's say we have the following classes:
ClassA
which extendsClassC
ClassB
which extendsClassA
ClassC
which extendsClassB
JDT reports an error for this since it can't be compiled. If you make a Qute template that includes one of these classes as a parameter, then open up completion:
Then you won't ever get completion back, since qute-ls uses recursion in order to collect the fields and methods of the subtypes, and will be stuck cycling between the 3 types. I'd be nice to prevent the infinite recursion in this case.
The text was updated successfully, but these errors were encountered: