From: <jbo...@li...> - 2005-11-30 20:48:44
|
Author: wrzep Date: 2005-11-30 15:48:36 -0500 (Wed, 30 Nov 2005) New Revision: 1670 Modified: trunk/forge/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/Podcast.java Log: enclosure disappeared bug http://jira.jboss.com/jira/browse/JBLAB-540 Pawel Modified: trunk/forge/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/Podcast.java =================================================================== --- trunk/forge/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/Podcast.java 2005-11-30 15:14:53 UTC (rev 1669) +++ trunk/forge/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/Podcast.java 2005-11-30 20:48:36 UTC (rev 1670) @@ -161,14 +161,16 @@ // filling the context with enclosure information ItemEnclosureIF enclosure = item.getEnclosure(); - if (enclosure != null) { - nodeContext.put("enclosure-type", enclosure.getType()); - nodeContext.put("enclosure-size", Math.round(enclosure.getLength() / BYTES_IN_MB)); - - URL enclosureLocation = enclosure.getLocation(); - if (enclosureLocation != null) { + URL enclosureLocation = null; + + if (enclosure != null) { + enclosureLocation = enclosure.getLocation(); + } + + if (enclosureLocation != null) { nodeContext.put("enclosure-link", enclosureLocation.toString()); - } + nodeContext.put("enclosure-type", enclosure.getType()); + nodeContext.put("enclosure-size", Math.round(enclosure.getLength() / BYTES_IN_MB)); } // filling the context with channel information |