diff --git a/Frameworks/BusinessLogic/ERAttachment/Sources/com/rackspacecloud/client/cloudfiles/FilesUtil.java b/Frameworks/BusinessLogic/ERAttachment/Sources/com/rackspacecloud/client/cloudfiles/FilesUtil.java index c412fc64a7b..013f16bee5b 100644 --- a/Frameworks/BusinessLogic/ERAttachment/Sources/com/rackspacecloud/client/cloudfiles/FilesUtil.java +++ b/Frameworks/BusinessLogic/ERAttachment/Sources/com/rackspacecloud/client/cloudfiles/FilesUtil.java @@ -86,7 +86,7 @@ public static String getProperty(final String key) logger.warn("Unable to load properties file.", e); } } - return props.getProperty(key); + return props != null ? props.getProperty(key) : null; } @@ -109,7 +109,7 @@ public static String getProperty(final String key, final String defaultValue) logger.warn("Unable to load properties file.", e); } } - return props.getProperty(key, defaultValue); + return props != null ? props.getProperty(key, defaultValue) : defaultValue; } diff --git a/Frameworks/Core/ERExtensions/Sources/er/extensions/eof/ERXSharedEOLoader.java b/Frameworks/Core/ERExtensions/Sources/er/extensions/eof/ERXSharedEOLoader.java index 9a1eecfa130..1a8d2baa529 100644 --- a/Frameworks/Core/ERExtensions/Sources/er/extensions/eof/ERXSharedEOLoader.java +++ b/Frameworks/Core/ERExtensions/Sources/er/extensions/eof/ERXSharedEOLoader.java @@ -209,7 +209,7 @@ public void objectStoreWasAdded(NSNotification aNotification) { log.debug("Shared EO loading complete: no objects loaded."); } } catch (Exception e) { - log.error("Exception occurred with model: " + currentModel.name() + "\n" + e + ERXUtilities.stackTrace()); + log.error("Exception occurred with model: " + (currentModel != null ? currentModel.name() : "" ) + "\n" + e + ERXUtilities.stackTrace()); // no matter what happens, un-register for notifications. NSNotificationCenter.defaultCenter().removeObserver(this, EOAdaptorContext.AdaptorContextBeginTransactionNotification, null); if (_didChangeDebugSetting) { diff --git a/Frameworks/Core/ERExtensions/Sources/er/extensions/foundation/ERXRandomGUID.java b/Frameworks/Core/ERExtensions/Sources/er/extensions/foundation/ERXRandomGUID.java index 99e0561d235..77e5e76cdbb 100644 --- a/Frameworks/Core/ERExtensions/Sources/er/extensions/foundation/ERXRandomGUID.java +++ b/Frameworks/Core/ERExtensions/Sources/er/extensions/foundation/ERXRandomGUID.java @@ -184,6 +184,9 @@ private void getRandomGUID(boolean secure) { md5 = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { System.out.println("Error: " + e); + valueBeforeMD5 = ""; + valueAfterMD5 = ""; + return; } try { diff --git a/Frameworks/EOAdaptors/JavaLuceneAdaptor/Sources/er/luceneadaptor/ERLuceneAdaptorChannel.java b/Frameworks/EOAdaptors/JavaLuceneAdaptor/Sources/er/luceneadaptor/ERLuceneAdaptorChannel.java index 62e8a813aaa..ceabe105f4e 100755 --- a/Frameworks/EOAdaptors/JavaLuceneAdaptor/Sources/er/luceneadaptor/ERLuceneAdaptorChannel.java +++ b/Frameworks/EOAdaptors/JavaLuceneAdaptor/Sources/er/luceneadaptor/ERLuceneAdaptorChannel.java @@ -384,7 +384,9 @@ public Field valueToField(Document doc, Object value) { } else { field = null; } - field.setValue(stringValue); + if (field != null) { + field.setValue(stringValue); + } return field; } diff --git a/Frameworks/WOAdaptors/ERIMAdaptor/Sources/er/imadaptor/InstantMessengerAdaptor.java b/Frameworks/WOAdaptors/ERIMAdaptor/Sources/er/imadaptor/InstantMessengerAdaptor.java index 9385e2521d0..725f919d3e7 100644 --- a/Frameworks/WOAdaptors/ERIMAdaptor/Sources/er/imadaptor/InstantMessengerAdaptor.java +++ b/Frameworks/WOAdaptors/ERIMAdaptor/Sources/er/imadaptor/InstantMessengerAdaptor.java @@ -321,7 +321,7 @@ public synchronized void messageReceived(IInstantMessenger instantMessenger, Str if (responseMessage != null) { responseMessage = responseMessage.trim(); } - if (responseMessage.length() > 0) { + if (responseMessage != null && responseMessage.length() > 0) { if (log.isInfoEnabled()) { log.info("Sending message to '" + buddyName + "': " + responseMessage); }