Community
Participate
Working Groups
Follow-up to bug 302470 The encoding/decoding of problem arguments in a Marker fails if the argument contains a "#". Steps to reproduce: - setup from bug 302470 comment 0 - select problem "The method getTaskListeners() is undefined for the type Task<capture#1-of ?>" in the Problems view - Ctrl+1 In Util.getProblemArgumentsFromMarker(String), the arguments string is: "3:Task<capture#1-of ?>#getTaskListeners# ". => The method fails and returns null because the first argument contains a "#" Note that the encoding is specified in org.eclipse.jdt.core.IJavaModelMarker.ARGUMENTS, so this definition also needs to be fixed. Since this never worked in the past, it's OK to fix the encoding, as long as existing argument strings that don't contain arguments with a # keep their meaning. Please also fix the Javadoc of IJavaModelMarker.ARGUMENTS: - '{ } is encoded as "0: "' is wrong, that should end with "0:" - the spec does not tell that empty argument strings are actually encoded as " " - the spec should contain @see CorrectionEngine#getProblemArguments(IMarker) Encoding # inside an argument as ## would work (only because the empty argument is actually encoded as " ").
Created attachment 158898 [details] Proposed fix + regression tests
Created attachment 158901 [details] More regression tests Same patch with more regression tests.
Released for 3.6M6. Regression tests added in: org.eclipse.jdt.core.tests.model.UtilTests
Verified for 3.6M6 using build I20100307-2000.