private void loadIndex(String path) { Gson gson = new Gson(); try { JsonReader reader = new JsonReader(new FileReader(path + "/index.json")); Type type = new TypeToken<Map<String, String>>() { }.getType(); oldIdentityHash = gson.fromJson(reader, type); } catch (FileNotFoundException ex) { //The Index doesn't exist yet, it will be generated after the Repository visitor is used for the first time. } }