No, but based upon the error whatever getAppContext() returns is an implementation of Map. Use the above advice to parametize the Map, if you cannot change the implementation of what getAppContext()...