Revision: 1185
http://stripes.svn.sourceforge.net/stripes/?rev=1185&view=rev
Author: bengunter
Date: 2009-10-22 03:50:55 +0000 (Thu, 22 Oct 2009)
Log Message:
-----------
STS-664: Never return null from resolveBridgedWriteMethod(..). If a better
write method can't be found, then return the write method that was passed in.
Sun's compiler marks certain methods as bridge while the Eclipse compiler does
not. I can't say which is correct, but they definitely differ. This new
behavior of not returning null seems to work well enough for both cases.
Modified Paths:
--------------
branches/1.5.x/stripes/src/net/sourceforge/stripes/util/ReflectUtil.java
Modified:
branches/1.5.x/stripes/src/net/sourceforge/stripes/util/ReflectUtil.java
===================================================================
--- branches/1.5.x/stripes/src/net/sourceforge/stripes/util/ReflectUtil.java
2009-10-22 02:43:35 UTC (rev 1184)
+++ branches/1.5.x/stripes/src/net/sourceforge/stripes/util/ReflectUtil.java
2009-10-22 03:50:55 UTC (rev 1185)
@@ -592,12 +592,8 @@
}
else if (candidates.isEmpty()) {
log.error("Something has gone awry! I have a bridge to
nowhere: ", setter);
- setter = null;
}
else {
- // Clear the setter and try to find a best guess
- setter = null;
-
// Create a set of all type arguments for all classes
declaring the matching methods
Set<Type> typeArgs = new HashSet<Type>();
for (Method method : candidates) {
@@ -627,11 +623,10 @@
}
// If we are left with exactly one match, then go with it
- if (primeCandidates.size() == 1)
+ if (primeCandidates.size() == 1) {
setter = primeCandidates.get(0);
-
- // FAIL
- if (setter == null) {
+ }
+ else {
log.warn("Unable to locate a bridged setter for ",
pd.getName(),
" due to a JVM bug and an overloaded method with ",
"the same name as the property setter. This could
be a problem. ",
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development