title: HashMap not saving entries
body: <p>My problem is that, I'm trying to make a resource loader that saves past textures to a HashMap with their locations as their key. It works perfectly when it is loading images outside of the package but when it is trying to load an internal image it just wont save.</p>
  
  <p>This is my code for my resource loader</p>
  
  <pre><code>public Map&lt;String,BufferedImage&gt; loads = new HashMap&lt;String,BufferedImage&gt;();
  
  public BufferedImage loadImage(String imagePath){
  
      BufferedImage temp = new BufferedImage(9, 16, BufferedImage.TYPE_INT_RGB);
  
      String location = imagePath.replaceAll("[.]", "/");
      location += ".png";
  
      //internal
      if(location.startsWith("CLASS_")){
          if(loads.get(location) != null){
              System.out.println("OLD");
              return loads.get(location);
          }else{
              location = location.replaceAll("CLASS_", "");
              try{
                  temp = ImageIO.read(this.getClass().getClassLoader().getResource("net/minegeek360/platformer/assets/"+location));
                  loads.put(location, temp);
              }catch(Exception e){System.err.println("CANT LOAD IMAGE");}
              System.out.println("NEW | "+temp);
          }
      //external
      }else{
          try{
              if(loads.get(location) != null){
                  //System.out.println("LOADED ORIGIONAL IMAGE");
                  return loads.get(location);
              }else{
                  temp = ImageIO.read(new File("assets/textures/"+location));
                  //System.out.println("LOADED NEW IMAGE");
              }
          }catch(Exception e){ e.printStackTrace(); }
          loads.put(location, temp);
      }
  
      return temp;
  }
  </code></pre>
  
  <p>As I said the external loading works perfectly, its just the internal loading that the problem. It loads all of the images correctly so I know the BufferedImages are not the issue, that's why I think its the HashMaps.</p>