LPS-35555 Refactoring getLastModified() from recursive to iterative.
LPS-35555 source formatting