Project: JDT
Bug 126971 [correction] CorrectionMarkerResolutionGenerator his inconsistent hasResolutions and getResolutions for read-only files
Reported: 2006-02-08 15:27:08 | Status: verified fixed

20050208-0800 org.eclipse.jdt.internal.ui.text.correction.CorrectionMarkerResolutionGenerator can return true to hasMarkerResolutions() but returns an empty array when getMarkerResolutions is called. STEPS 1) Create a class than implements Serializable 2) Make the java file read-only 3) Select The serializable class SerializableTest does not declare a static final serialVersionUID field of type long 4) Select Quick fix (enabled because CorrectionMarkerResolutionGenerator returns true for hasMarkerResolutions in this case) 5) Dialog will come up with no resolutions (CorrectionMarkerResolutionGenerator returns an empty array for getMarkerResolutions in this case) This is not an issue if the file is not read-only. Marking major as ClearCase users can run into this issue quite easily as they frequently have read only files.

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/PotentialProgrammingProblemsFix.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionMarkerResolutionGenerator.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionMessages.java