Summary: | NPE on JavaAnnotationImageProvider.getQuickFixErrorImage(): No Display | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Niko Stotz <eclipse> |
Component: | UI | Assignee: | Niko Stotz <eclipse> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | loskutov, ma.becker, noopur_gupta |
Version: | 4.14 | ||
Target Milestone: | 4.14 M3 | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=553044 https://git.eclipse.org/r/152898 https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=ebcfc6623310e06b2dc70668bf225aa4f73480e6 https://bugs.eclipse.org/bugs/show_bug.cgi?id=559665 |
||
Whiteboard: | |||
Bug Depends on: | |||
Bug Blocks: | 547665 |
Description
Niko Stotz
2019-11-06 16:26:26 EST
What's your proposal to resolve this problem? (In reply to Noopur Gupta from comment #1) > What's your proposal to resolve this problem? What about: At the beginning of org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider.getImage(IJavaAnnotation, int) Check if Display.getCurrent() is null and abort. The upstream code seems to handle null results. (In reply to Niko Stotz from comment #2) > (In reply to Noopur Gupta from comment #1) > > What's your proposal to resolve this problem? > > What about: > At the beginning of > org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationImageProvider. > getImage(IJavaAnnotation, int) > > Check if Display.getCurrent() is null and abort. > > The upstream code seems to handle null results. Please provide Gerrit. Gerrit change https://git.eclipse.org/r/152898 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=ebcfc6623310e06b2dc70668bf225aa4f73480e6 As this bug is fixed. Can we remove the workaround in AnnotationCodeMiningFilter#isPaintable currently it catches NPEs like this: private boolean isPaintable(Annotation a) { // workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=552760 // (NPE on JavaAnnotationImageProvider.getQuickFixErrorImage(): No Display) try { return annotationAccess.isPaintable(a); } catch (NullPointerException e) { return false; } } New Gerrit change created: https://git.eclipse.org/r/156822 Gerrit change https://git.eclipse.org/r/156822 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=b34d3e266290b9a685f957d6363fbeb6e3a9d31c |