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; }