Project

General

Profile

Actions

Architecture #3136

closed

Make sure all the recursive calls are tail-recursive and considered as this by the compiler

Added by Nicolas CHARLES almost 12 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
5 (lowest)
Assignee:
-
Category:
Architecture - Code maintenance
Effort required:
Name check:
Fix check:
Regression:

Description

We tried our best to have tail-recursive methods in our code. However, if the method is neither private nor final, the compiler won't consider it as this, and won't optimize it. This may lead to dreaded java.lang.StackOverflowError
To make sure the compiler is optimizing it, we should @tailrec all these calls

Actions

Also available in: Atom PDF