File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
repository/src/main/java/org/apache/atlas/repository/graph Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 2828import org .apache .atlas .repository .graphdb .AtlasVertex ;
2929import org .apache .atlas .service .Service ;
3030import org .apache .commons .configuration .Configuration ;
31+ import org .apache .commons .lang .StringUtils ;
3132import org .apache .commons .lang .math .NumberUtils ;
3233import org .slf4j .Logger ;
3334import org .slf4j .LoggerFactory ;
@@ -132,12 +133,13 @@ private long getRecoveryStartTimeFromConfig(Configuration config) {
132133 long ret = 0L ;
133134
134135 try {
135- String time = config .getString (SOLR_INDEX_RECOVERY_CONFIGURED_START_TIME );
136- SimpleDateFormat dateFormat = new SimpleDateFormat (DATE_FORMAT );
136+ String time = config .getString (SOLR_INDEX_RECOVERY_CONFIGURED_START_TIME );
137+ if (StringUtils .isNotBlank (time )) {
138+ SimpleDateFormat dateFormat = new SimpleDateFormat (DATE_FORMAT );
139+ dateFormat .setTimeZone (TimeZone .getTimeZone ("UTC" ));
137140
138- dateFormat .setTimeZone (TimeZone .getTimeZone ("UTC" ));
139-
140- ret = dateFormat .parse (time ).toInstant ().toEpochMilli ();
141+ ret = dateFormat .parse (time ).toInstant ().toEpochMilli ();
142+ }
141143 } catch (Exception e ) {
142144 LOG .error ("Error fetching: {}" , SOLR_INDEX_RECOVERY_CONFIGURED_START_TIME , e );
143145 }
You can’t perform that action at this time.
0 commit comments