> + } > + } > + > + protected <T> T onlyObjectFromResource(String resourceName, > TypeToken<Map<String, T>> type) { > + // Assume JSON objects passed here will be in the form: { "entity": { > ... } } > + String text = stringFromResource(resourceName); > + Map<String, T> object = json.fromJson(text, type.getType()); > + checkArgument(!object.isEmpty(), "The given json does not contain any > object: %s", text); > + checkArgument(object.keySet().size() == 1, "The given json does not > contain more than one object: %s", text); > + return object.get(getOnlyElement(object.keySet())); > + } > + > + protected <T> T objectFromResource(String resourceName, Class<T> type) { > + String text = stringFromResource(resourceName); > + return json.fromJson(text, type); > + }
Remove all protected methods that are not used. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/225/files#r48141450