Add missing java doc.
Clean code.
Fix exception when turning the archived flag on (see #10719)
Merge pull request #1050 from jburel/import-archived

Import archived