You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@click.apache.org by sa...@apache.org on 2009/06/13 15:37:57 UTC
svn commit: r784390 - in /incubator/click/trunk/click:
examples/src/org/apache/click/examples/control/
extras/src/org/apache/click/extras/cayenne/
framework/src/org/apache/click/util/
Author: sabob
Date: Sat Jun 13 13:37:56 2009
New Revision: 784390
URL: http://svn.apache.org/viewvc?rev=784390&view=rev
Log:
fix varargs warnings for reflection
Modified:
incubator/click/trunk/click/examples/src/org/apache/click/examples/control/RichTextArea.java
incubator/click/trunk/click/extras/src/org/apache/click/extras/cayenne/PropertySelect.java
incubator/click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java
incubator/click/trunk/click/framework/src/org/apache/click/util/PropertyUtils.java
Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/control/RichTextArea.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/control/RichTextArea.java?rev=784390&r1=784389&r2=784390&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/control/RichTextArea.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/control/RichTextArea.java Sat Jun 13 13:37:56 2009
@@ -116,7 +116,7 @@
public String getHtmlImports() {
HtmlStringBuffer buffer = new HtmlStringBuffer();
- String[] args = { getContext().getRequest().getContextPath() };
+ Object[] args = { getContext().getRequest().getContextPath() };
buffer.append(MessageFormat.format(HTML_IMPORTS, args));
args = new String[] { getId(), getConfig() };
Modified: incubator/click/trunk/click/extras/src/org/apache/click/extras/cayenne/PropertySelect.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/extras/src/org/apache/click/extras/cayenne/PropertySelect.java?rev=784390&r1=784389&r2=784390&view=diff
==============================================================================
--- incubator/click/trunk/click/extras/src/org/apache/click/extras/cayenne/PropertySelect.java (original)
+++ incubator/click/trunk/click/extras/src/org/apache/click/extras/cayenne/PropertySelect.java Sat Jun 13 13:37:56 2009
@@ -444,7 +444,7 @@
String getterName = ClickUtils.toGetterName(getName());
try {
- Method method = doClass.getMethod(getterName, null);
+ Method method = doClass.getMethod(getterName);
DataContext dataContext = form.getDataContext();
@@ -495,10 +495,10 @@
String getterName = ClickUtils.toGetterName(getName());
try {
- Method method = doClass.getMethod(getterName, null);
+ Method method = doClass.getMethod(getterName);
DataObject property =
- (DataObject) method.invoke(dataObject, null);
+ (DataObject) method.invoke(dataObject);
if (property != null) {
Object propPk = DataObjectUtils.pkForObject(property);
@@ -584,7 +584,7 @@
} else {
Class doClass = form.getDataObjectClass();
String getterName = ClickUtils.toGetterName(getName());
- Method method = doClass.getMethod(getterName, null);
+ Method method = doClass.getMethod(getterName);
Class propertyClass = method.getReturnType();
SelectQuery query = new SelectQuery(propertyClass);
Modified: incubator/click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java?rev=784390&r1=784389&r2=784390&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java Sat Jun 13 13:37:56 2009
@@ -634,7 +634,7 @@
* @return the formatted HTML import statement
*/
public static String createHtmlImport(String pattern, Context context) {
- String[] args = {
+ Object[] args = {
context.getRequest().getContextPath(),
getResourceVersionIndicator(context)
};
@@ -1728,7 +1728,7 @@
boolean isAccessible = true;
try {
Class listenerClass = listener.getClass();
- targetMethod = listenerClass.getMethod(method, null);
+ targetMethod = listenerClass.getMethod(method);
// Change accessible for annonymous inner classes public methods
// only. Conditional checks:
@@ -1748,7 +1748,7 @@
}
- Object result = targetMethod.invoke(listener, null);
+ Object result = targetMethod.invoke(listener);
if (result instanceof Boolean) {
return ((Boolean) result).booleanValue();
@@ -2493,7 +2493,7 @@
throw new RuntimeException(msg);
}
- Object result = foundMethod.invoke(object, null);
+ Object result = foundMethod.invoke(object);
if (result == null) {
result = foundMethod.getReturnType().newInstance();
Modified: incubator/click/trunk/click/framework/src/org/apache/click/util/PropertyUtils.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/util/PropertyUtils.java?rev=784390&r1=784389&r2=784390&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/util/PropertyUtils.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/util/PropertyUtils.java Sat Jun 13 13:37:56 2009
@@ -195,27 +195,27 @@
if (method == null) {
- method = source.getClass().getMethod(ClickUtils.toGetterName(name), null);
+ method = source.getClass().getMethod(ClickUtils.toGetterName(name));
cache.put(methodNameKey, method);
}
- return method.invoke(source, null);
+ return method.invoke(source);
} catch (NoSuchMethodException nsme) {
try {
- method = source.getClass().getMethod(ClickUtils.toIsGetterName(name), null);
+ method = source.getClass().getMethod(ClickUtils.toIsGetterName(name));
cache.put(methodNameKey, method);
- return method.invoke(source, null);
+ return method.invoke(source);
} catch (NoSuchMethodException nsme2) {
try {
- method = source.getClass().getMethod(name, null);
+ method = source.getClass().getMethod(name);
cache.put(methodNameKey, method);
- return method.invoke(source, null);
+ return method.invoke(source);
} catch (NoSuchMethodException nsme3) {
String msg = "No matching getter method found for property '"