There are very similar posts to this topic but most of them discuss the fact that you can run a program which was compiled with a later Java version than the JRE's that are running the program. So a program compiled with Java 7 would run with a JRE Java version 8.
My question however is this. Say someone wrote a program a couple of years ago and at that time the latest Java version was Java 5. So they wrote their program using Java 5 features and they compiled their code using Java 5.
Then I come along years later and I want to take their exact code (without changing anything) and recompile it. Can I use Java 8? Or is it safer for me to compile the code using Java 5.
So in short, are there any safety concerns with compiling old code using the newest Java version?