if (name.indexOf("*") != -1) { if ((!name.endsWith(".*") && !name.equals("*")) || name.indexOf("*") != name.lastIndexOf("*")) throw new IllegalArgumentException("Bad wildcard: " + name); } if ("".equals(name)) throw new IllegalArgumentException("Empty name");
if ("".equals(name)) throw new IllegalArgumentException("Empty name");
    public BasicPermission(String name) {        super(name);        if (name.indexOf("*") != -1) {            if ((!name.endsWith(".*") && !name.equals("*"))                    || name.indexOf("*") != name.lastIndexOf("*"))                    throw new IllegalArgumentException("Bad wildcard: " + name);        }        if ("".equals(name)) throw new IllegalArgumentException("Empty name");    }