| 
     
      
      
      From: <be...@us...> - 2007-11-15 10:33:18
      
     
   | 
Revision: 252
          http://objectlabkit.svn.sourceforge.net/objectlabkit/?rev=252&view=rev
Author:   benoitx
Date:     2007-11-15 02:33:21 -0800 (Thu, 15 Nov 2007)
Log Message:
-----------
Fix NPE issue if the calendar is null.
Modified Paths:
--------------
    trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractKitCalculatorsFactory.java
    trunk/src/site/changes.xml
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractKitCalculatorsFactory.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractKitCalculatorsFactory.java	2007-11-15 10:32:07 UTC (rev 251)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractKitCalculatorsFactory.java	2007-11-15 10:33:21 UTC (rev 252)
@@ -108,9 +108,9 @@
      * @return true if the holiday name is registered.
      */
     public boolean isHolidayCalendarRegistered(final String name) {
-        return this.holidays.containsKey(name);
+        return name != null && this.holidays.containsKey(name);
     }
-    
+
     /**
      * @return an immutable Holiday Calendar that is registered, null if not registered.
      */
@@ -118,7 +118,6 @@
         return holidays.get(name);
     }
 
-    
     /**
      * Used by extensions to set holidays in a DateCalculator.
      * 
Modified: trunk/src/site/changes.xml
===================================================================
--- trunk/src/site/changes.xml	2007-11-15 10:32:07 UTC (rev 251)
+++ trunk/src/site/changes.xml	2007-11-15 10:33:21 UTC (rev 252)
@@ -9,6 +9,7 @@
   </properties>
   <body>
     <release version="1.1.0" date="in SVN" description="Maintenance">
+      <action dev="benoitx" type="fix">fix NPE issue if the calendar name is null.</action>
       <action dev="benoitx" type="add" issue="1832345" due-to="vyadh">Feature Requests item #1832345, make the Tenor Serializable</action>
       <action dev="benoitx" type="add">Added 2 methods on factory to check if a calendar is registered.</action>
       <action dev="marchy" type="fix">Deprecated ACT/UST and END/365 Day Count Conventions, which weren't very common. Also added a link to some documentation.</action>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |