10000 Avoid unnecessary downcast in `CompletionTests2.testBug397070` by datho7561 · Pull Request #3818 · eclipse-jdt/eclipse.jdt.core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Avoid unnecessary downcast in CompletionTests2.testBug397070 #3818

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 @@ -32,7 +32,6 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.*;
import org.eclipse.jdt.core.tests.util.Util;
import org.eclipse.jdt.internal.codeassist.InternalCompletionContext;
import org.eclipse.jdt.internal.codeassist.RelevanceConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.eclipse.jdt.internal.core.SourceType;
Expand Down Expand Up @@ -5618,12 +5617,9 @@ class CompletionRequestor2 extends CompletionRequestor {
SourceType type = null;
public void acceptContext(CompletionContext con) {
this.type = null;
if (con instanceof InternalCompletionContext) {
InternalCompletionContext context = (InternalCompletionContext) con;
IJavaElement element = context.getEnclosingElement();
if (element instanceof org.eclipse.jdt.internal.core.SourceType) {
this.type = (SourceType) element;
}
IJavaElement element = con.getEnclosingElement();
if (element instanceof org.eclipse.jdt.internal.core.SourceType) {
this.type = (SourceType) element;
}
}
public boolean isExtendedContextRequired() {
Expand Down
Loading
0