title: Unchecked or unsafe operations at ObjectInputStream
body: <p>I'm getting a "Unchecked or unsafe operations" error at this method:</p>
  
  <pre><code>public static MyClass initApp(){
          MyClass obj = new MyClass(); 
          try{
              ObjectInputStream oin = 
                  new ObjectInputStream(new FileInputStream("file.dat"));
  
              obj.setSomeList ( (Map&lt;String,MyOtherClass&gt;) oin.readObject()); //error line
  
          }catch(IOException e)
              { System.out.println(e.getMessage()); }
           catch(ClassNotFoundException e)
              { System.out.println(e.getMessage()); }
  
          return obj; 
      }
  </code></pre>
  
  <p>Isn't Map the most abstract as possible in this case? How can I solve this? </p>
  
  <p>Method setSomeList (NOTE! It is placed in another class! If that helps):</p>
  
  <pre><code>public void setSomeList(Map&lt;String,MyOtherClass&gt; l){
          for(Map.Entry&lt;String,MyOtherClass&gt; entrada : l.entrySet())
              someList.put(entrada.getKey(),entrada.getValue().clone());
      }
  </code></pre>