Bug 513423 - Quick Fix provides incorrect placement of @Nullable
Summary: Quick Fix provides incorrect placement of @Nullable
Status: REOPENED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2017-03-09 17:31 EST by Matthew DOnofrio CLA
Modified: 2022-06-21 16:37 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew DOnofrio CLA 2017-03-09 17:31:16 EST
Given the class:
@NonNullByDefault
public class UncheckedException extends RuntimeException {
   public void printStackTrace(
      // Illegal redefinition of parameter s, inherited method from Throwable
      // does not constrain this parameter
      java.io.PrintStream s)
   {
      synchronized (s) {
         s.print(getClass().getName() + ": ");
         s.print(stackTrace);
      }
   }
}


According to:
http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-using_null_annotations.htm

Type annotation should be:
java.io.@Nullable PrintWriter s

But Quick Fix provides it as:
@Nullable java.io.PrintWriter s

I am also not provided a "Move type annotation" fix as suggested by 4.7-M5:
https://www.eclipse.org/eclipse/news/4.7/M5/
Comment 1 Eclipse Genie CLA 2020-04-12 19:19:31 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Stephan Herrmann CLA 2020-04-13 08:31:19 EDT
Still valid, tentatively scheduling for 4.16.
Comment 3 Stephan Herrmann CLA 2020-06-10 03:35:22 EDT
.
Comment 4 Eclipse Genie CLA 2022-06-21 16:37:21 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.