People occasionally report class loading problems which go away when the Remoting cache is cleared. (Incoherent InvalidClassException; empty ZIP.) Root cause is TBD, but in the meantime FileSystemJarCache.retrieve is not sufficiently robust.
- After calling JarLoaderImpl.writeJarTo, it does not verify that tmp actually has the expected checksum. What if the other side sent corrupt content, or a zero-length stream?
- File.renameTo is not guaranteed to be atomic. If on Java 7, should use Files.move(tmp.toPath(), target.toPath(), StandardCopyOption.ATOMIC_MOVE) to be sure there is no race condition.