File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed
Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -74,8 +74,14 @@ protected Feed(org.w3c.dom.Node node) {
7474 }
7575
7676 if (nodeName .equalsIgnoreCase ("lastBuildDate" )){
77- if (nodeValue !=null ) lastUpdate = new javaxt .utils .Date (nodeValue );
78- if (lastUpdate .failedToParse ()) lastUpdate = null ;
77+ if (nodeValue !=null ){
78+ try {
79+ lastUpdate = new javaxt .utils .Date (nodeValue );
80+ }
81+ catch (java .text .ParseException e ){
82+ lastUpdate = null ;
83+ }
84+ }
7985 }
8086
8187 if (nodeName .equals ("ttl" )){
Original file line number Diff line number Diff line change 11package javaxt .rss ;
2-
3- import java .util .ArrayList ;
42import org .w3c .dom .*;
53import javaxt .xml .DOM ;
64import javaxt .geospatial .geometry .Geometry ;
75import javaxt .geospatial .coordinate .Parser ;
86
9-
107//******************************************************************************
118//** RSS Item
129//******************************************************************************
@@ -130,7 +127,14 @@ public java.net.URL getLink(){
130127 public javaxt .utils .Date getDate (){
131128 String date = pubDate ;
132129 if (date .length ()==0 ) date = dcDate ;
133- if (date .length ()>0 ) return new javaxt .utils .Date (date );
130+ if (date .length ()>0 ){
131+ try {
132+ return new javaxt .utils .Date (date );
133+ }
134+ catch (java .text .ParseException e ){
135+ return null ;
136+ }
137+ }
134138 else return null ;
135139 }
136140
You can’t perform that action at this time.
0 commit comments