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) {
74
74
}
75
75
76
76
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
+ }
79
85
}
80
86
81
87
if (nodeName .equals ("ttl" )){
Original file line number Diff line number Diff line change 1
1
package javaxt .rss ;
2
-
3
- import java .util .ArrayList ;
4
2
import org .w3c .dom .*;
5
3
import javaxt .xml .DOM ;
6
4
import javaxt .geospatial .geometry .Geometry ;
7
5
import javaxt .geospatial .coordinate .Parser ;
8
6
9
-
10
7
//******************************************************************************
11
8
//** RSS Item
12
9
//******************************************************************************
@@ -130,7 +127,14 @@ public java.net.URL getLink(){
130
127
public javaxt .utils .Date getDate (){
131
128
String date = pubDate ;
132
129
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
+ }
134
138
else return null ;
135
139
}
136
140
You can’t perform that action at this time.
0 commit comments