[isidorus-cvs] r860 - branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base

lgiessmann at common-lisp.net lgiessmann at common-lisp.net
Fri Sep 9 15:27:43 UTC 2011


Author: lgiessmann
Date: Fri Sep  9 08:27:42 2011
New Revision: 860

Log:
gdl-frontend: Widgets: fixed a a potential bug in TmHelper.hasThemes(...)

Modified:
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TmHelper.java

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TmHelper.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TmHelper.java	Fri Sep  9 08:25:42 2011	(r859)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TmHelper.java	Fri Sep  9 08:27:42 2011	(r860)
@@ -276,11 +276,9 @@
 	// returns true if the topics of themes are all equal to the scope of construct
 	public static boolean hasThemes(Construct construct, ArrayList<Topic> themes){
 		if(construct == null) return false;
+		if(themes == null) return ((ScopedStub)construct).getScope().length() == 0;
 		
 		ScopedStub scoped = (ScopedStub)construct;
-		if(scoped.getScope().length() != 0 && (themes == null || themes.size() == 0)) return false;
-		if(themes != null && scoped.getScope().length() != themes.size()) return false;
-		
 		for(int i = 0; i != scoped.getScope().length(); ++i){
 			if(!themes.contains(scoped.getScope().get(i))) return false;
 		}




More information about the Isidorus-cvs mailing list