cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r463455 - /incubator/cayenne/main/trunk/core/cayenne-jdk1.5/src/main/java/org/apache/cayenne/enhancer/CayenneEnhancerVisitorFactory.java
Date Thu, 12 Oct 2006 22:02:24 GMT
Author: aadamchik
Date: Thu Oct 12 15:02:21 2006
New Revision: 463455

URL: http://svn.apache.org/viewvc?view=rev&rev=463455
Log:
CAY-682 
refactoring class name matching code

Modified:
    incubator/cayenne/main/trunk/core/cayenne-jdk1.5/src/main/java/org/apache/cayenne/enhancer/CayenneEnhancerVisitorFactory.java

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.5/src/main/java/org/apache/cayenne/enhancer/CayenneEnhancerVisitorFactory.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.5/src/main/java/org/apache/cayenne/enhancer/CayenneEnhancerVisitorFactory.java?view=diff&rev=463455&r1=463454&r2=463455
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.5/src/main/java/org/apache/cayenne/enhancer/CayenneEnhancerVisitorFactory.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.5/src/main/java/org/apache/cayenne/enhancer/CayenneEnhancerVisitorFactory.java
Thu Oct 12 15:02:21 2006
@@ -51,17 +51,12 @@
         this.entitiesByClass = new HashMap<String, ObjEntity>();
         for (Object object : entityResolver.getObjEntities()) {
             ObjEntity entity = (ObjEntity) object;
-
-            // transform method must use internal class names (a/b/c), however for some
-            // reason in some invironments (e.g. Mac, Eclipse) it uses a.b.c. Handle both
-            // cases here...
             entitiesByClass.put(entity.getClassName(), entity);
-            entitiesByClass.put(entity.getClassName().replace('.', '/'), entity);
         }
     }
 
     public ClassVisitor createVisitor(String className, ClassVisitor out) {
-        ObjEntity entity = entitiesByClass.get(className);
+        ObjEntity entity = entitiesByClass.get(className.replace('/', '.'));
         if (entity == null) {
             return null;
         }



Mime
View raw message