[lsc-changes] r463 - lsc/branches/v1.1/src/main/java/org/lsc

jclarke at lsc-project.org jclarke at lsc-project.org
Sun Nov 29 13:19:49 CET 2009


Author: jclarke
Date: 2009-11-29 13:19:49 +0100 (Sun, 29 Nov 2009)
New Revision: 463

Modified:
   lsc/branches/v1.1/src/main/java/org/lsc/AbstractSynchronize.java
Log:
Fixes #151. Avoid NPE in logging error.

Modified: lsc/branches/v1.1/src/main/java/org/lsc/AbstractSynchronize.java
===================================================================
--- lsc/branches/v1.1/src/main/java/org/lsc/AbstractSynchronize.java	2009-11-29 12:08:46 UTC (rev 462)
+++ lsc/branches/v1.1/src/main/java/org/lsc/AbstractSynchronize.java	2009-11-29 12:19:49 UTC (rev 463)
@@ -470,10 +470,12 @@
         } else {
             str = "";
         }
+        
+        String dn = jm != null ? jm.getDistinguishName() : "unknown entry";
 
         LOGGER.error(I18n.getMessage(null,
                 "org.lsc.messages.SYNC_ERROR", new Object[] {
-                jm.getDistinguishName(), str, "", except }), except);
+                dn, str, "", except }), except);
 
         if (jm != null) {
             LOGGER.error(jm);



More information about the lsc-changes mailing list