Bug 574470 - Refactoring throws NPE on rename operation when response is empty

Change-Id: I92ecc144c306ed667734373d1ac626d7922d92fd
Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
diff --git a/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/rename/LSPRenameProcessor.java b/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/rename/LSPRenameProcessor.java
index 9952475..aa69160 100644
--- a/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/rename/LSPRenameProcessor.java
+++ b/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/rename/LSPRenameProcessor.java
@@ -169,7 +169,7 @@
 			if (params.getNewName() != null) {

 				// TODO: how to manage ltk with CompletableFuture? Is 1000 ms is enough?

 				rename = languageServer.getTextDocumentService().rename(params).get(1000, TimeUnit.MILLISECONDS);

-				if (!status.hasError() && rename.getChanges().isEmpty()) {

+				if (!status.hasError() && (rename == null || rename.getChanges().isEmpty())) {

 					status.addWarning(Messages.rename_empty_message);

 				}

 			}