This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 129272 - Computation of element attributes "leaks" into next element
Summary: Computation of element attributes "leaks" into next element
Status: RESOLVED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Text-Edit (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks: 129027
  Show dependency tree
 
Reported: 2008-03-05 13:15 UTC by Andrei Badea
Modified: 2008-03-23 20:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed patch (761 bytes, text/plain)
2008-03-05 13:16 UTC, Andrei Badea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Badea 2008-03-05 13:15:43 UTC
For the following markup:

<bean id="foo" class="FooAbstractController" p: />
<bean id="bar" class="SomeOtherClass"/>

the XML parser in xml.text returns an Element whose class attribute is "SomeOtherClass". This is because when computing
attributes in org.netbeans.modules.xml.text.syntax.dom.Tag.getAttributes(), the parser skips over error tokens (such as
the "p:" at the end of the first bean element). The parser should stop on the first error token. since that is
consistent with what the lexer does.

Please consider applying the attached patch.
Comment 1 Andrei Badea 2008-03-05 13:16:32 UTC
Created attachment 57806 [details]
Proposed patch
Comment 2 Samaresh Panda 2008-03-17 05:00:03 UTC
Please go ahead, apply the patch and mark it fixed.
Comment 3 Andrei Badea 2008-03-23 20:35:36 UTC
Fixed in 75aea4d72208.