Index: dom/org/eclipse/jdt/core/dom/CompilationUnit.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnit.java,v retrieving revision 1.67 diff -u -r1.67 CompilationUnit.java --- dom/org/eclipse/jdt/core/dom/CompilationUnit.java 15 Jun 2005 19:06:11 -0000 1.67 +++ dom/org/eclipse/jdt/core/dom/CompilationUnit.java 21 Sep 2005 23:49:39 -0000 @@ -161,6 +161,11 @@ private static final IProblem[] EMPTY_PROBLEMS = new IProblem[0]; /** + * Canonical empty list of line ends. + */ + private static final int[] EMPTY_LINE_ENDS = new int[0]; + + /** * Messages reported by the compiler during parsing or name resolution. */ private Message[] messages; @@ -195,13 +200,10 @@ * @param lineEndTable the line end table */ void setLineEndTable(int[] lineEndTable) { - if (lineEndTable == null) { - throw new NullPointerException(); - } // alternate root is *not* considered a structural property // but we protect them nevertheless checkModifiable(); - this.lineEndTable = lineEndTable; + this.lineEndTable = lineEndTable == null ? EMPTY_LINE_ENDS : lineEndTable; } /**