Closed Bug 79858 Opened 24 years ago Closed 17 years ago

ident sometimes gives wrong line numbers for definitions in .java files

Categories

(Webtools Graveyard :: MXR, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: agnew, Assigned: agnew)

References

()

Details

Attachments

(1 file)

I just installed LXR locally and found the same problem- so far I've only found it to occur in .java files. Example: http://lxr.mozilla.org/mozilla/ident?i=ISPDynamicData This (currently) says that the identifier is defined as a class on line 9 and as function on line 29- the 'Referenced in' matches list lines 31 and 51. Checking the file reveals that lines 31 and 51 are the only (non-comment) lines on which it appears. It appears that it is simply not counting the first two sets of comments in this case, but I've also found cases where the line number listed is actually -after- the line number on which the identifier appears, which means it's somehow counting non-existant lines somewhere along the way. I've poked around the genxref file for a bit, but I can't seem to find where this is happening...
Patch submitted- the first two blocks make sure that the java_clean subroutine doesn't remove newlines when clearing out 'import' and 'package' lines, and the 3rd block preserves them in certain patterns of function definitions, thus preventing the newline from being stripped from: ---- public Class () { ---- Unfortunately, I'm STILL getting some cases where the line numbers don't match up. grr.
reassigning endico's bugs to default owner
Assignee: endico → chase
QA Contact: mattyt-bugzilla → timeless
Mass reassign of open bugs for chase@mozilla.org to build@mozilla-org.bugs.
Assignee: chase → build
QA Contact: timeless → lxr
Reassigning all LXR bugs assigned to build@mozilla-org.bugs to the default LXR owner (sorry Bear!) We aren't actively working on these (if that's wrong, please reassign to yourself/a real person).
Assignee: build → bear
QA Contact: lxr → timeless
QA Contact: timeless → lxr
Attachment #33805 - Flags: review?(timeless)
Attachment #33805 - Flags: review?(timeless) → review+
Do we need this patch anymore, or has the bug been fixed?
changeset 37a2794b3244 thanks and very sorry for the delay.
Assignee: bear → agnew
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Blocks: 459616
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: