Author: ruschein
Date: 2010-08-10 16:12:58 -0700 (Tue, 10 Aug 2010)
New Revision: 21292
Modified:
core3/work-api/trunk/src/main/java/org/cytoscape/work/AbstractTunableInterceptor.java
Log:
Fixed 2 bugs.
Modified:
core3/work-api/trunk/src/main/java/org/cytoscape/work/AbstractTunableInterceptor.java
===================================================================
---
core3/work-api/trunk/src/main/java/org/cytoscape/work/AbstractTunableInterceptor.java
2010-08-10 22:14:47 UTC (rev 21291)
+++
core3/work-api/trunk/src/main/java/org/cytoscape/work/AbstractTunableInterceptor.java
2010-08-10 23:12:58 UTC (rev 21292)
@@ -139,13 +139,13 @@
if
(!isValidGetter(method))
throw new
Exception("Invalid getter method specified \"" + method.getName()
+ "\", maybe this method takes arguments or returns void?");
-
+
final String rootName =
method.getName().substring(3);
getMethodsMap.put(rootName, method);
tunableMap.put(rootName, tunable);
if
(setMethodsMap.containsKey(rootName)){
final Method
setter = setMethodsMap.get(rootName);
- if
(!setterAndGetterTypesAreCompatible(setter, method))
+ if
(!setterAndGetterTypesAreCompatible(method, setter))
throw
new Exception("Return type of " + method.getName() + "() and the argument type
of "
+ setter.getName() + "() are not the same!");
@@ -166,7 +166,7 @@
setMethodsMap.put(rootName, method);
if
(getMethodsMap.containsKey(rootName)) {
final Method
getter = getMethodsMap.get(rootName);
- if
(!setterAndGetterTypesAreCompatible(method, getter))
+ if
(!setterAndGetterTypesAreCompatible(getter, method))
throw
new Exception("Return type of " + getter.getName() + "() and the argument type
of "
+ method.getName() + "() are not the same!");
@@ -207,10 +207,10 @@
}
private boolean isValidSetter(final Method setterCandidate) {
- // Make sure we are not returning "void":
+ // Make sure we are returning "void":
try {
final Type returnType =
setterCandidate.getGenericReturnType();
- if (returnType != Void.class)
+ if (returnType != void.class)
return false;
} catch(final Exception e) {
return false;
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.