Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#231 LXR doesn't parse some Java file correctly

v1.1
closed-fixed
Andre-Littoz
Java (1)
5
2013-08-31
2013-03-08
Yimin Li
No

Current LXR doesn't parse this Java file correctly: CameraHolder.java. From a web client, nothing is printed out after line 0019.

Please see attached for CameraHolder.java.

Thanks!

1 Attachments

Discussion

  • Andre-Littoz
    Andre-Littoz
    2013-03-08

    Hi,

    I'm not familiar at all with Java and the examples I read did not show that keyword "static" could follow "import". "static" leads to parse failure for "import" statement in 1.1.0 implementation.

    While waiting for a corrected version, here is a patch for lib/LXR/Lang/Java.pm:

    1/ Change line 69 from
    (import\s+)
    to
    (import\s+(?:static\s+)?)

    2/ This uncovered a secondary bug a few lines after; change line 102 from
    if (defined($link)) {
    to
    if ($link =~ m!^<!) {

    Thanks for reporting.
    ajl

     
  • Andre-Littoz
    Andre-Littoz
    2013-03-08

    • status: open --> pending
    • assigned_to: Andre-Littoz
     
  • Andre-Littoz
    Andre-Littoz
    2013-04-12

    • status: pending --> closed
     
  • Andre-Littoz
    Andre-Littoz
    2013-04-12

    Fixed in CVS with a better protected "include" processing shared by all parsers

     
  • Andre-Littoz
    Andre-Littoz
    2013-08-31

    • status: closed --> closed-fixed