Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
mcculls committed Jan 10, 2011
1 parent 8a9ad04 commit 5c671dd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public void windowClosed(WindowEvent evt) {
m_log.log( LogService.LOG_INFO, "Window closed" );
m_context.getBundle(0).stop();
} catch (BundleException e) {
} catch (IllegalStateException e) {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public void windowClosed(WindowEvent evt) {
try {
m_context.getBundle(0).stop();
} catch (BundleException e) {
} catch (IllegalStateException e) {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,14 @@ public StockPrice[] getPrices(String[] symbols) throws DelistedException, Servic

private StockPrice[] readPrices(StockProvider provider, String[] symbols) throws DelistedException {
StockPrice[] prices = new StockPrice[symbols.length];
Map<String, Double> stocks = provider.getStocks(symbols);

Map<String, Double> stocks = provider.getStocks(symbols);
Map<String, Double> last = updateStockPrices(stocks);

for (int i=0; i<symbols.length; i++) {
Double newPrice = stocks.get( symbols[i] );
Map<String, Double> last = updateStockPrices(stocks);
if ( newPrice == null ) {
throw new DelistedException(symbols[i]);
throw new DelistedException(symbols[i]);
}
else {
Double oldPrice = last.get( symbols[i] );
Expand Down
Binary file not shown.

0 comments on commit 5c671dd

Please sign in to comment.