From 7d405b6f8e3208f288b0a122bd2642b7b19800aa Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Mon, 14 Apr 2008 02:08:07 +0000 Subject: [PATCH] tweak tostring git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@324 f203690c-595d-4dc9-a70b-905162fa7fd2 --- src/java/com/healthmarketscience/jackcess/Index.java | 6 ++++-- 1 file 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 { 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); } } -- 2.39.5