diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/java/com/healthmarketscience/jackcess/Index.java | 6 |
1 files changed, 4 insertions, 2 deletions
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<Index> { 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); } } |