Skip to content

Commit

Permalink
Fixed Vulnerabilities pointed out by Sonarqube analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
vkoukoutsas committed Feb 7, 2019
1 parent 00de4cc commit 1cbdcbd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ public SPVBlockStore blockStore(NetworkParameters chainNetworkParameters)
File blockStoreFile = Files.createTempFile("chain", "tmp").toFile();
blockStoreFile.deleteOnExit();
if (blockStoreFile.exists()) {
blockStoreFile.delete();
if(!blockStoreFile.delete()){
throw new RuntimeException("File not deleted successfully. " + blockStoreFile.getName());
}
}
return new SPVBlockStore(chainNetworkParameters, blockStoreFile);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public class BlockchainInfoService {
private final static Logger LOG = LoggerFactory.getLogger(BlockchainInfoService.class);


public static String TEST_URL = "https://testnet.blockchain.info/latestblock";
public static String MAIN_URL = "https://blockchain.info/latestblock";
public final static String TEST_URL = "https://testnet.blockchain.info/latestblock";
public final static String MAIN_URL = "https://blockchain.info/latestblock";

@Autowired
private RatesAppConfigHolder ratesAppConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class EtherscanService {

private final static Logger LOG = LoggerFactory.getLogger(EtherscanService.class);

public static String URL = "https://{ethnet}.etherscan.io/api?module=proxy&action=eth_blockNumber&apikey={ethkey}";
public final static String URL = "https://{ethnet}.etherscan.io/api?module=proxy&action=eth_blockNumber&apikey={ethkey}";

@Autowired
private RatesAppConfigHolder ratesAppConfig;
Expand Down

0 comments on commit 1cbdcbd

Please sign in to comment.