From: James Ahlborn Date: Mon, 14 Apr 2008 02:08:07 +0000 (+0000) Subject: tweak tostring X-Git-Tag: rel_1_1_14~23 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7d405b6f8e3208f288b0a122bd2642b7b19800aa;p=jackcess.git tweak tostring git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@324 f203690c-595d-4dc9-a70b-905162fa7fd2 --- diff --git a/src/java/com/healthmarketscience/jackcess/Index.java b/src/java/com/healthmarketscience/jackcess/Index.java index 9e6f19f..9eb3ca1 100644 --- a/src/java/com/healthmarketscience/jackcess/Index.java +++ b/src/java/com/healthmarketscience/jackcess/Index.java @@ -2237,8 +2237,10 @@ public abstract class Index implements Comparable { return (isLeaf() ? "Leaf" : "Node") + "DataPage[" + getPageNumber() + "] " + getPrevPageNumber() + ", " + getNextPageNumber() + ", (" + getChildTailPageNumber() + "), " + - (isLeaf() ? ("[" + entries.get(0) + ", " + - entries.get(entries.size() - 1) + "]") : entries); + ((isLeaf() && !entries.isEmpty()) ? + ("[" + entries.get(0) + ", " + + entries.get(entries.size() - 1) + "]") : + entries); } }