[jbosstools-commits] JBoss Tools SVN: r43529 - workspace/akazakov/db/org.jboss.tools.cdi.db/src/org/jboss/tools/cdi/db.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Sep 7 16:53:28 EDT 2012


Author: scabanovich
Date: 2012-09-07 16:53:27 -0400 (Fri, 07 Sep 2012)
New Revision: 43529

Modified:
   workspace/akazakov/db/org.jboss.tools.cdi.db/src/org/jboss/tools/cdi/db/CDIDataBase.java
Log:
JBIDE-12446
https://issues.jboss.org/browse/JBIDE-12446


Modified: workspace/akazakov/db/org.jboss.tools.cdi.db/src/org/jboss/tools/cdi/db/CDIDataBase.java
===================================================================
--- workspace/akazakov/db/org.jboss.tools.cdi.db/src/org/jboss/tools/cdi/db/CDIDataBase.java	2012-09-07 20:33:55 UTC (rev 43528)
+++ workspace/akazakov/db/org.jboss.tools.cdi.db/src/org/jboss/tools/cdi/db/CDIDataBase.java	2012-09-07 20:53:27 UTC (rev 43529)
@@ -120,8 +120,11 @@
 	}
 
 	private long getTypeIndex(String typeName) {
-		//TODO
-		return 0;
+		long result = ((long)typeName.hashCode() << 32);
+		if(typeName.length() > 1) {
+			result += (typeName.substring(1) + typeName.substring(0, 1)).hashCode();
+		}
+		return  result;
 	}
 
 	private Short getProjectIndex(ICDIProject project) {



More information about the jbosstools-commits mailing list