Backported fix for bug 122261.
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/IndentAction.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/IndentAction.java
index 5f70cf5..1bffab3 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/IndentAction.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/IndentAction.java
@@ -239,6 +239,8 @@
 				wsStart= offset + slashes;
 				
 				StringBuffer computed= indenter.computeIndentation(offset);
+				if (computed == null)
+					computed= new StringBuffer(0);
 				int tabSize= getTabSize();
 				while (slashes > 0 && computed.length() > 0) {
 					char c= computed.charAt(0);