Community
Participate
Working Groups
In plugin org.eclipse.objectteams.otdt.jdt.ui several warnings are raised against those synthetic variables that are internally used to translate safe lowering: Description Resource Path Location Type Null comparison always yields false: The variable _OT$unlowered$2909 cannot be null at this location DOMAdaptor.java /org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/corext line 79 Java Problem Null comparison always yields false: The variable _OT$unlowered$2991 cannot be null at this location DOMAdaptor.java /org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/corext line 81 Java Problem Null comparison always yields false: The variable _OT$unlowered$7535 cannot be null at this location CreateMethodMappingCompletionProposal.java /org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/CompletionAdaptor line 178 Java Problem Null comparison always yields false: The variable _OT$unlowered$9054 cannot be null at this location OTQuickFixes.java /org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist line 192 Java Problem Null comparison always yields false: The variable _OT$unlowered$23347 cannot be null at this location CompletionAdaptor.java /org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist line 507 Java Problem Null comparison always yields false: The variable _OT$unlowered$23706 cannot be null at this location CompletionAdaptor.java /org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist line 511 Java Problem We might either: suppress this warning or avoiding generating that unnecessary null check.
Created attachment 202266 [details] test & fix This patch fixes the problem in two steps: - avoid null checks for syntactically non-null values (this, new) - mark check as generated and don't analyse null-comparison for these.
Patch has been released for 2.1 M2 (r1976/77)
Verified using build 2.2.1.201209182002