Revision: 17213
          http://sourceforge.net/p/gate/code/17213
Author:   ian_roberts
Date:     2014-01-07 01:20:30 +0000 (Tue, 07 Jan 2014)
Log Message:
-----------
NPE guard.

Modified Paths:
--------------
    gate/trunk/src/main/gate/corpora/DocumentJsonUtils.java

Modified: gate/trunk/src/main/gate/corpora/DocumentJsonUtils.java
===================================================================
--- gate/trunk/src/main/gate/corpora/DocumentJsonUtils.java     2014-01-07 
00:07:19 UTC (rev 17212)
+++ gate/trunk/src/main/gate/corpora/DocumentJsonUtils.java     2014-01-07 
01:20:30 UTC (rev 17213)
@@ -297,7 +297,8 @@
     json.writeStartObject();
     // if the extraFeatures already includes entities, merge them with
     // the new ones we create
-    Object entitiesExtraFeature = extraFeatures.get("entities");
+    Object entitiesExtraFeature =
+            (extraFeatures == null) ? null : extraFeatures.get("entities");
     Map<?, ?> entitiesMap = null;
     if(entitiesExtraFeature instanceof Map) {
       entitiesMap = (Map<?, ?>)entitiesExtraFeature;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to