Author: cbegin
Date: Thu Dec 17 03:27:27 2009
New Revision: 891527

URL: http://svn.apache.org/viewvc?rev=891527&view=rev
Log:
IBATIS-714 exception when namespace attribute of a mapper corresponds to a real 
class name -- fixed

Modified:
    
ibatis/java/ibatis-3/trunk/ibatis-3-core/src/main/java/org/apache/ibatis/binding/MapperRegistry.java
    ibatis/java/ibatis-3/trunk/version.properties

Modified: 
ibatis/java/ibatis-3/trunk/ibatis-3-core/src/main/java/org/apache/ibatis/binding/MapperRegistry.java
URL: 
http://svn.apache.org/viewvc/ibatis/java/ibatis-3/trunk/ibatis-3-core/src/main/java/org/apache/ibatis/binding/MapperRegistry.java?rev=891527&r1=891526&r2=891527&view=diff
==============================================================================
--- 
ibatis/java/ibatis-3/trunk/ibatis-3-core/src/main/java/org/apache/ibatis/binding/MapperRegistry.java
 (original)
+++ 
ibatis/java/ibatis-3/trunk/ibatis-3-core/src/main/java/org/apache/ibatis/binding/MapperRegistry.java
 Thu Dec 17 03:27:27 2009
@@ -31,15 +31,16 @@
   }
 
   public void addMapper(Class type) {
-    if (!type.isInterface())
-      throw new BindingException("Only interfaces can be configured by the 
MapperFactory.  Type " + type + " is not an interface.");
-    if (knownMappers.contains(type))
-      throw new BindingException("Type " + type + " is already known to the 
MapperRegistry.");
-    knownMappers.add(type);
-    // It's important that the type is added before the parser is run
-    // otherwise the binding may automatically be attempted by the
-    // mapper parser.  If the type is already known, it won't try.
-    MapperAnnotationBuilder parser = new MapperAnnotationBuilder(config, type);
-    parser.parse();
+    if (type.isInterface()) {
+      if (knownMappers.contains(type)) {
+        throw new BindingException("Type " + type + " is already known to the 
MapperRegistry.");
+      }
+      knownMappers.add(type);
+      // It's important that the type is added before the parser is run
+      // otherwise the binding may automatically be attempted by the
+      // mapper parser.  If the type is already known, it won't try.
+      MapperAnnotationBuilder parser = new MapperAnnotationBuilder(config, 
type);
+      parser.parse();
+    }
   }
 }

Modified: ibatis/java/ibatis-3/trunk/version.properties
URL: 
http://svn.apache.org/viewvc/ibatis/java/ibatis-3/trunk/version.properties?rev=891527&r1=891526&r2=891527&view=diff
==============================================================================
--- ibatis/java/ibatis-3/trunk/version.properties (original)
+++ ibatis/java/ibatis-3/trunk/version.properties Thu Dec 17 03:27:27 2009
@@ -1,5 +1,5 @@
 #Build version info
-#Sat Dec 05 22:05:53 MST 2009
+#Wed Dec 16 09:07:11 MST 2009
 version=3.0.0
-buildDate=2009/12/05 22\:05
-buildNum=213
+buildDate=2009/12/16 09\:07
+buildNum=215


Reply via email to