title: How to use Java 7 HashMaps in Java 8?
body: <p>I'm in the process of upgrading an application that relies on the Java 7 iteration order of HashMap. The Java 8 HashMap changed its iteration order, which is incompatible with some of this application (probably bad design), I have to use Java 7 HashMaps to successfully migrate the application to Java 8. This is the way I thought of doing it:</p>
  
  <ol>
  <li>Make a Java7HashMap that extends the regular Java 8 HashMap</li>
  <li>Look up the source code of the Java 7 HashMap, copy and paste.</li>
  <li>Replace the "import java.util.HashMap;" with "import (...).Java7HashMap;"</li>
  <li>Thoroughly test it all.</li>
  </ol>
  
  <p>Would this be a good way of doing it? It is unfortunately not an option to rewrite the parts that rely on the Java 7 version of the HashMap.</p>