public Resource getResource(String name) {
public synchronized Resource getResource(String name) {
    public Resource getResource(String name) {        update();        Resource res = (Resource) resources.get(name);        // if resource does not exist, create it        if (res == null) {            res = createResource(name);            resources.put(name, res);        }        return res;    }