History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-23809
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Maxim Mossienko
Reporter: Stephen Friedrich
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

InspectionJS: Wrong warning about infinite recursion

Created: 02 Oct 07 03:45   Updated: 11 Dec 07 17:48
Component/s: None
Fix Version/s: Diana 8243, Selena 7.0.3

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: None
Image Attachments:

1. infinite.png
(7 kb)

Build: 7,318
Fixed in build: 7,599


 Description  « Hide
I have no idea whether this is a good way to do this, but it definitely does not recurse infinitely:
function findTrParentNode(node) {
                        if("TR" == node.tagName) {
                            return node;
                        }
                        if(node == null) {
                            return null;
                        }
                        return findTrParentNode(node.parentNode);
                    }


 All   Comments   Work Log   Change History      Sort Order:
Sascha Weinreuter - 02 Oct 07 12:22
I'd make this statement
if(node == null) {
 return null;
}

the first one, but apart from that, I'd say it's pretty common code


Stephen Friedrich - 02 Oct 07 16:47
Oops. Still even with the correct ordering of 'ifs' the warning is shown.