public class GigiPreparedStatement {
- PreparedStatement target;
+ private PreparedStatement target;
public GigiPreparedStatement(PreparedStatement preparedStatement) {
target = preparedStatement;
// TODO Auto-generated method stub
}
+
}
public class GigiResultSet implements Closeable {
- ResultSet target;
+ private ResultSet target;
public GigiResultSet(ResultSet target) {
this.target = target;
public static enum ImportType {
/**
- * Execute Script as-as
+ * Execute Script as-is
*/
PRODUCTION,
/**
- * Execute Script, but changing Engine=InnoDB to Engine=Memory
+ * Execute Script, but change Engine=InnoDB to Engine=Memory
*/
TEST,
/**
public class CACertificate implements IdCachable {
- final String keyname;
+ private final String keyname;
- final int id;
+ private final int id;
- CACertificate parent = null;
+ private CACertificate parent = null;
- final X509Certificate cert;
+ private final X509Certificate cert;
- final String link;
+ private final String link;
private CACertificate(int id) {
this.id = id;
public boolean isSelfsigned() {
return this == getParent();
}
+
}
public abstract class CertificateOwner implements IdCachable {
- private static ObjectCache<CertificateOwner> myCache = new ObjectCache<>();
+ private static final ObjectCache<CertificateOwner> myCache = new ObjectCache<>();
private int id;
private final String visibleName;
- private static HashMap<String, CertificateProfile> byName = new HashMap<>();
+ private static final HashMap<String, CertificateProfile> byName = new HashMap<>();
- private static HashMap<Integer, CertificateProfile> byId = new HashMap<>();
+ private static final HashMap<Integer, CertificateProfile> byId = new HashMap<>();
private final Map<String, PropertyTemplate> pt;
}
return true;
}
+
}
public static Digest getDefault() {
return SHA256;
}
+
}
private int id;
private static final Set<String> IDNEnabledTLDs;
+
static {
Properties CPS = new Properties();
try (InputStream resourceAsStream = Domain.class.getResourceAsStream("CPS.properties")) {
}
- private static ObjectCache<Domain> myCache = new ObjectCache<>();
+ private static final ObjectCache<Domain> myCache = new ObjectCache<>();
public static synchronized Domain getById(int id) throws IllegalArgumentException {
Domain em = myCache.get(id);
public class ObjectCache<T extends IdCachable> {
- private HashMap<Integer, WeakReference<T>> hashmap = new HashMap<>();
+ private final HashMap<Integer, WeakReference<T>> hashmap = new HashMap<>();
- private static HashSet<ObjectCache<?>> caches = new HashSet<>();
+ private static final HashSet<ObjectCache<? extends IdCachable>> caches = new HashSet<>();
protected ObjectCache() {
caches.add(this);
}
public static void clearAllCaches() {
- for (ObjectCache<?> objectCache : caches) {
+ for (ObjectCache<? extends IdCachable> objectCache : caches) {
objectCache.hashmap.clear();
}
}
public class SupportedUser {
- private User target, supporter;
+ private User target;
+
+ private User supporter;
private String ticket;
private Locale locale;
- private Set<Group> groups = new HashSet<>();
+ private final Set<Group> groups = new HashSet<>();
protected User(GigiResultSet rs) {
super(rs.getInt("id"));
public interface Verifyable {
public void verify(String hash) throws GigiApiException;
+
}