]> source.dussan.org Git - poi.git/commitdiff
Fix the name of the RootProperty, as it never changes
authorNick Burch <nick@apache.org>
Wed, 29 Dec 2010 01:34:18 +0000 (01:34 +0000)
committerNick Burch <nick@apache.org>
Wed, 29 Dec 2010 01:34:18 +0000 (01:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1053503 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/poifs/property/RootProperty.java

index cb4b66e61489f7c73d8fc70859ee44bcd1704039..b934a2601b474261490bda632b9f60b2198b7e5f 100644 (file)
@@ -26,10 +26,11 @@ import org.apache.poi.poifs.storage.SmallDocumentBlock;
  * @author Marc Johnson (mjohnson at apache dot org)
  */
 public final class RootProperty extends DirectoryProperty {
+   private static final String NAME = "Root Entry";
 
     RootProperty()
     {
-        super("Root Entry");
+        super(NAME);
 
         // overrides
         setNodeColor(_NODE_BLACK);
@@ -59,4 +60,13 @@ public final class RootProperty extends DirectoryProperty {
     {
         super.setSize(SmallDocumentBlock.calcSize(size));
     }
+
+    /**
+     * Returns the fixed name "Root Entry", as the
+     *  raw property doesn't have a real name set
+     */
+    @Override
+    public String getName() {
+        return NAME;
+    }
 }