Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void remove(String property) {

public void loadAll() throws SQLException {
final Set<String> methodNameSet = loaderMap.keySet();
String[] methodNames = methodNameSet.toArray(new String[methodNameSet.size()]);
String[] methodNames = methodNameSet.toArray(new String[0]);
for (String methodName : methodNames) {
load(methodName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ static Object createStaticProxy(Class<?> type, Callback callback, List<Class<?>>
if (constructorArgTypes.isEmpty()) {
enhanced = enhancer.create();
} else {
Class<?>[] typesArray = constructorArgTypes.toArray(new Class[constructorArgTypes.size()]);
Object[] valuesArray = constructorArgs.toArray(new Object[constructorArgs.size()]);
Class<?>[] typesArray = constructorArgTypes.toArray(new Class[0]);
Object[] valuesArray = constructorArgs.toArray(new Object[0]);
enhanced = enhancer.create(typesArray, valuesArray);
}
return enhanced;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ static Object createStaticProxy(Class<?> type, MethodHandler callback, List<Clas
}

Object enhanced;
Class<?>[] typesArray = constructorArgTypes.toArray(new Class[constructorArgTypes.size()]);
Object[] valuesArray = constructorArgs.toArray(new Object[constructorArgs.size()]);
Class<?>[] typesArray = constructorArgTypes.toArray(new Class[0]);
Object[] valuesArray = constructorArgs.toArray(new Object[0]);
try {
enhanced = enhancer.create(typesArray, valuesArray);
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ private <T> T instantiateClass(Class<T> type, List<Class<?>> constructorArgTypes
}
return constructor.newInstance();
}
constructor = type.getDeclaredConstructor(constructorArgTypes.toArray(new Class[constructorArgTypes.size()]));
constructor = type.getDeclaredConstructor(constructorArgTypes.toArray(new Class[0]));
if (!constructor.isAccessible()) {
constructor.setAccessible(true);
}
return constructor.newInstance(constructorArgs.toArray(new Object[constructorArgs.size()]));
return constructor.newInstance(constructorArgs.toArray(new Object[0]));
} catch (Exception e) {
StringBuilder argTypes = new StringBuilder();
if (constructorArgTypes != null) {
Expand Down