Author: lgiessmann Date: Mon Sep 12 00:24:24 2011 New Revision: 864
Log: gdl-frontend: Widgets: fixed a a potential bug in GdlPosition.getOccurrences(...)
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPosition.java
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPosition.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPosition.java Mon Sep 12 00:10:55 2011 (r863) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPosition.java Mon Sep 12 00:24:24 2011 (r864) @@ -28,10 +28,11 @@ // a helper method that returns all occurrences of the type bound to the passed PSI + @SuppressWarnings("unchecked") private JsArray<Occurrence> getOccurrences(String occurrenceType){ TopicMap tm = this.tmRepresentative.getTopicMap(); Topic occType = tm.getTopicBySubjectIdentifier(tm.createLocator(occurrenceType)); - if(occType == null) return null; + if(occType == null) return (JsArray<Occurrence>)JsArray.createArray(); else return tmRepresentative.getOccurrences(occType); }