dmitri      2003/11/02 15:21:06

  Modified:    jxpath/src/java/org/apache/commons/jxpath/util
                        BasicTypeConverter.java
  Log:
  Fixed allocateCollection - should not attempt to create objects of an Abstract type
  
  Revision  Changes    Path
  1.11      +6 -6      
jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/util/BasicTypeConverter.java
  
  Index: BasicTypeConverter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/util/BasicTypeConverter.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- BasicTypeConverter.java   9 Oct 2003 21:31:42 -0000       1.10
  +++ BasicTypeConverter.java   2 Nov 2003 23:21:06 -0000       1.11
  @@ -416,7 +416,7 @@
   
       protected boolean canCreateCollection(Class type) {
           if (!type.isInterface()
  -            && ((type.getModifiers() | Modifier.ABSTRACT) == 0)) {
  +            && ((type.getModifiers() & Modifier.ABSTRACT) == 0)) {
               return true;
           }
   
  @@ -432,7 +432,7 @@
   
       protected Collection allocateCollection(Class type) {
           if (!type.isInterface()
  -            && ((type.getModifiers() | Modifier.ABSTRACT) == 0)) {
  +            && ((type.getModifiers() & Modifier.ABSTRACT) == 0)) {
               try {
                   return (Collection) type.newInstance();
               }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to