geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r648889 - /geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/ObjectRecipe.java
Date Wed, 16 Apr 2008 22:42:19 GMT
Author: dain
Date: Wed Apr 16 15:42:14 2008
New Revision: 648889

URL: http://svn.apache.org/viewvc?rev=648889&view=rev
Log:
Removed cruft accidently committed

Modified:
    geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/ObjectRecipe.java

Modified: geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/ObjectRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/ObjectRecipe.java?rev=648889&r1=648888&r2=648889&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/ObjectRecipe.java
(original)
+++ geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/ObjectRecipe.java
Wed Apr 16 15:42:14 2008
@@ -450,43 +450,6 @@
                         }
                     }
                 }
-
-//                if (options.contains(Option.MATCH_BY_TYPE) && members.isEmpty())
{
-//                    try {
-//                        List<java.lang.reflect.Member> membersByType = ReflectionUtil.findAllMembersByType(clazz,
propertyValue, options);
-//                        if (membersByType.size() > 1) {
-//                            List<String> matches = new ArrayList<String>();
-//                            for (java.lang.reflect.Member member : membersByType) {
-//                                if (member instanceof Field) {
-//                                    Field field = (Field) member;
-//                                    matches.add(field.getName());
-//                                } else if (member instanceof Method) {
-//                                    Method setter = (Method) member;
-//                                    matches.add(setter.getName());
-//                                }
-//                            }
-//
-//                            throw new MissingAccessorException("Property of type " + propertyValue.getClass().getName()
+ " can be mapped to more then one field or setter: " + matches, 0);
-//                        }
-//
-//                        java.lang.reflect.Member member  = membersByType.iterator().next();
-//                        if (member instanceof Field) {
-//                            Field field = (Field) member;
-//                            members.add(new FieldMember(field));
-//                        } else if (member instanceof Method) {
-//                            Method setter = (Method) member;
-//                            members.add(new MethodMember(setter));
-//                        }
-//                    } catch (MissingAccessorException e) {
-//                        if (noSetter != null && noSetter.getMatchLevel() > e.getMatchLevel())
{
-//                            e = noSetter;
-//                        }
-//                        if (noField != null && noField.getMatchLevel() > e.getMatchLevel())
{
-//                            e = noField;
-//                        }
-//                        throw e;
-//                    }
-//                }
             }
         } catch (MissingAccessorException e) {
             if (options.contains(Option.IGNORE_MISSING_PROPERTIES)) {



Mime
View raw message