Author: saces
Date: 2009-04-14 10:03:09 +0000 (Tue, 14 Apr 2009)
New Revision: 26776

Modified:
   trunk/plugins/KeyExplorer/KeyExplorer.java
Log:
fix a NPE (reorder decompose logic) 

Modified: trunk/plugins/KeyExplorer/KeyExplorer.java
===================================================================
--- trunk/plugins/KeyExplorer/KeyExplorer.java  2009-04-14 05:36:52 UTC (rev 
26775)
+++ trunk/plugins/KeyExplorer/KeyExplorer.java  2009-04-14 10:03:09 UTC (rev 
26776)
@@ -641,7 +641,23 @@
 
                        nextTableCell = htmlTableRow.addChild("td");
 
-                       if (md.isArchiveInternalRedirect()) {
+                       if (md.isSimpleSplitfile()) {
+                               nextTableCell.addChild(new HTMLNode("a", 
"href", "/?key=" + furi + "/" + fname, fname));
+                               nextTableCell = htmlTableRow.addChild("td");
+                               if (md.isCompressed()) {
+                                       nextTableCell.addChild("#", 
Long.toString(md.uncompressedDataLength()));
+                               } else {
+                                       nextTableCell.addChild("#", 
Long.toString(md.dataLength()));
+                               }
+                               nextTableCell = htmlTableRow.addChild("td");
+                               nextTableCell.addChild("#", md.getMIMEType());
+                               addEmptyCell(htmlTableRow);
+                       } else if (md.isSplitfile()) {
+                               nextTableCell.addChild(new HTMLNode("a", 
"href", "/?key=" + furi + "/" + fname, fname));
+                               addEmptyCell(htmlTableRow);
+                               addEmptyCell(htmlTableRow);
+                               addEmptyCell(htmlTableRow);
+                       } else if (md.isArchiveInternalRedirect()) {
                                nextTableCell.addChild(new HTMLNode("a", 
"href", "/" + furi + "/" + fname, fname));
                                addEmptyCell(htmlTableRow);
                                nextTableCell = htmlTableRow.addChild("td");
@@ -719,22 +735,6 @@
                                                //System.out.println("NO! ML 
target: " + mlUri.toString(false, false));
                                        }
                                }
-                       } else if (md.isSimpleSplitfile()) {
-                               nextTableCell.addChild(new HTMLNode("a", 
"href", "/?key=" + furi + "/" + fname, fname));
-                               nextTableCell = htmlTableRow.addChild("td");
-                               if (md.isCompressed()) {
-                                       nextTableCell.addChild("#", 
Long.toString(md.uncompressedDataLength()));
-                               } else {
-                                       nextTableCell.addChild("#", 
Long.toString(md.dataLength()));
-                               }
-                               nextTableCell = htmlTableRow.addChild("td");
-                               nextTableCell.addChild("#", md.getMIMEType());
-                               addEmptyCell(htmlTableRow);
-                       } else if (md.isSplitfile()) {
-                               nextTableCell.addChild(new HTMLNode("a", 
"href", "/?key=" + furi + "/" + fname, fname));
-                               addEmptyCell(htmlTableRow);
-                               addEmptyCell(htmlTableRow);
-                               addEmptyCell(htmlTableRow);
                        } else {
                                nextTableCell.addChild("#", fname);
                                nextTableCell = htmlTableRow.addChild("td");

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to