put back the goto - it is terrible but poi-integration tests hang without it

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1893604 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HeaderFooter.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HeaderFooter.java
index 7c9792d..9d369ad 100644
--- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HeaderFooter.java
+++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HeaderFooter.java
@@ -40,6 +40,10 @@
         String _center = "";
         String _right = "";
 
+// FIXME: replace outer goto. just eww.
+// no unit tests test the goto loop but poi-integration tests hangs if you remove it
+// (some file has an edge case header or footer)
+        outer:
         while (text.length() > 1) {
             if (text.charAt(0) != '&') {
                 // Mimics the behaviour of Excel, which would put it in the center.
@@ -81,7 +85,7 @@
                 default:
                     // Mimics the behaviour of Excel, which would put it in the center.
                     _center = text;
-                    break;
+                    break outer;
             }
         }
         return new String[] { _left, _center, _right, };
@@ -344,4 +348,4 @@
             return _occursInPairs;
         }
     }
-}
\ No newline at end of file
+}