Revision: 16002
          http://gate.svn.sourceforge.net/gate/?rev=16002&view=rev
Author:   nirajaswani
Date:     2012-08-09 05:29:12 +0000 (Thu, 09 Aug 2012)
Log Message:
-----------
dealing with null values in the Literal class

Modified Paths:
--------------
    gate/trunk/src/gate/creole/ontology/Literal.java

Modified: gate/trunk/src/gate/creole/ontology/Literal.java
===================================================================
--- gate/trunk/src/gate/creole/ontology/Literal.java    2012-08-09 01:18:37 UTC 
(rev 16001)
+++ gate/trunk/src/gate/creole/ontology/Literal.java    2012-08-09 05:29:12 UTC 
(rev 16002)
@@ -204,9 +204,9 @@
 
   @Override
   public int hashCode() {
-    int hash = 17 + value.hashCode();
-    hash = 37*hash + language.hashCode();
-    hash = 37*hash + dataType.hashCode();
+    int hash = 17 + (value == null ? 0 : value.hashCode());
+    hash = 37*hash + (language == null ? 0 :  language.hashCode());
+    hash = 37*hash + (dataType == null ? 0 : dataType.hashCode());
     return hash;
   }
 

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


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to