diff options
author | Josh Micich <josh@apache.org> | 2009-08-18 16:50:24 +0000 |
---|---|---|
committer | Josh Micich <josh@apache.org> | 2009-08-18 16:50:24 +0000 |
commit | a2cd9a942e1cc575254690ea4b7e9053cade05b3 (patch) | |
tree | fa09862bf8c587477e49d375596babc643004c74 /src/contrib | |
parent | 95afcef9e6ae7728b1629c54bc6acc96e0674454 (diff) | |
download | poi-a2cd9a942e1cc575254690ea4b7e9053cade05b3.tar.gz poi-a2cd9a942e1cc575254690ea4b7e9053cade05b3.zip |
Fixed compiler warnings - unnecessary else
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@805492 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/contrib')
3 files changed, 17 insertions, 21 deletions
diff --git a/src/contrib/src/org/apache/poi/contrib/poibrowser/ExtendableTreeCellRenderer.java b/src/contrib/src/org/apache/poi/contrib/poibrowser/ExtendableTreeCellRenderer.java index fc739a9a87..178fbf0a58 100644 --- a/src/contrib/src/org/apache/poi/contrib/poibrowser/ExtendableTreeCellRenderer.java +++ b/src/contrib/src/org/apache/poi/contrib/poibrowser/ExtendableTreeCellRenderer.java @@ -136,10 +136,10 @@ public class ExtendableTreeCellRenderer implements TreeCellRenderer /* The class has no renderer, try the superclass, if any. */ final Class superclass = c.getSuperclass(); - if (superclass != null) + if (superclass != null) { return findRenderer(superclass); - else - return null; + } + return null; } } diff --git a/src/contrib/src/org/apache/poi/contrib/poibrowser/TreeReaderListener.java b/src/contrib/src/org/apache/poi/contrib/poibrowser/TreeReaderListener.java index ec163b7bcf..5dd3af644b 100644 --- a/src/contrib/src/org/apache/poi/contrib/poibrowser/TreeReaderListener.java +++ b/src/contrib/src/org/apache/poi/contrib/poibrowser/TreeReaderListener.java @@ -33,7 +33,7 @@ import org.apache.poi.poifs.filesystem.POIFSDocumentPath; * <p>Organizes document information in a tree model in order to be * e.g. displayed in a Swing {@link javax.swing.JTree}. An instance of this * class is created with a root tree node ({@link MutableTreeNode}) and - * registered as a {@link POIFSReaderListener} with a {@link + * registered as a {@link POIFSReaderListener} with a {@link * org.apache.poi.poifs.eventfilesystem.POIFSReader}. While the latter processes * a POI filesystem it calls this class' {@link #processPOIFSReaderEvent} for * each document it has been registered for. This method appends the document it @@ -204,20 +204,16 @@ public class TreeReaderListener implements POIFSReaderListener } return n; } - else - { - /* The path is somewhere down in the POI filesystem's - * hierarchy. We need the tree node of this path's parent - * and attach our new node to it. */ - final String name = path.getComponent(path.length() - 1); - final POIFSDocumentPath parentPath = path.getParent(); - final MutableTreeNode parentNode = - getNode(parentPath, fsName, root); - n = new DefaultMutableTreeNode(name); - pathToNode.put(path, n); - parentNode.insert(n, 0); - return n; - } + /* else - The path is somewhere down in the POI filesystem's + * hierarchy. We need the tree node of this path's parent + * and attach our new node to it. */ + final String name = path.getComponent(path.length() - 1); + final POIFSDocumentPath parentPath = path.getParent(); + final MutableTreeNode parentNode = + getNode(parentPath, fsName, root); + n = new DefaultMutableTreeNode(name); + pathToNode.put(path, n); + parentNode.insert(n, 0); + return n; } - } diff --git a/src/contrib/src/org/apache/poi/hssf/contrib/view/SVFractionalFormat.java b/src/contrib/src/org/apache/poi/hssf/contrib/view/SVFractionalFormat.java index a4819bf436..5512a73a71 100644 --- a/src/contrib/src/org/apache/poi/hssf/contrib/view/SVFractionalFormat.java +++ b/src/contrib/src/org/apache/poi/hssf/contrib/view/SVFractionalFormat.java @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - + package org.apache.poi.hssf.contrib.view; @@ -196,7 +196,7 @@ public class SVFractionalFormat extends Format { toAppendTo.append(format(((Number)obj).doubleValue())); return toAppendTo; } - else throw new IllegalArgumentException("Can only handle Numbers"); + throw new IllegalArgumentException("Can only handle Numbers"); } public Object parseObject(String source, |