Minor code cleanup.

pull/84/head
Brett Wooldridge 11 years ago
parent 262cf1ff92
commit 0fa08d0011

@ -708,17 +708,13 @@ public class HikariConfig implements HikariConfigMBean
{
LOGGER.debug("HikariCP pool {} configuration:", poolName);
Set<String> propertyNames = new TreeSet<String>(PropertyBeanSetter.getPropertyNames(HikariConfig.class));
StringBuilder sb = new StringBuilder();
for (String prop : propertyNames)
{
try
{
sb.append(prop).append("................................................");
sb.setLength(32);
Object value = PropertyBeanSetter.getProperty(prop, this);
sb.append((value != null ? value : ""));
LOGGER.debug(sb.toString());
sb.setLength(0);
prop = (prop + "................................................").substring(0, 32);
LOGGER.debug(prop + (value != null ? value : ""));
}
catch (Exception e)
{

@ -43,12 +43,12 @@ public final class FastList<T>
/**
* Construct a FastList with a specfied size.
* @param clazz the Class stored in the collection
* @param size the initial size of the FastList
* @param capacity the initial size of the FastList
*/
@SuppressWarnings("unchecked")
public FastList(Class<?> clazz, int size)
public FastList(Class<?> clazz, int capacity)
{
this.elementData = (T[]) Array.newInstance(clazz, size);
this.elementData = (T[]) Array.newInstance(clazz, capacity);
}
/**
@ -69,7 +69,7 @@ public final class FastList<T>
final int oldCapacity = elementData.length;
final int newCapacity = oldCapacity << 1;
@SuppressWarnings("unchecked")
final T[] newElementData = (T[]) Array.newInstance(element.getClass(), newCapacity); //new Statement[newCapacity];
final T[] newElementData = (T[]) Array.newInstance(element.getClass(), newCapacity);
System.arraycopy(elementData, 0, newElementData, 0, oldCapacity);
newElementData[size++] = element;
elementData = newElementData;

Loading…
Cancel
Save