X: Fix compiler warnings
This commit is contained in:
@@ -33,7 +33,7 @@ public class SMTPNotifier implements AddressedNotifier<SMTPDestination, EmailMes
|
||||
|
||||
ΩEmailAddressΩ emailAddress = "SomeReceiver";
|
||||
SMTPDestination destination = new SMTPDestination(emailAddress);
|
||||
BoundNotifier boundNotifier = notifier.bind(destination);
|
||||
BoundNotifier<EmailMessage> boundNotifier = notifier.bind(destination);
|
||||
|
||||
EmailSubject subject = new EmailSubject("SomeSubject");
|
||||
EmailBody body = new EmailBody("SomeBody");
|
||||
|
||||
@@ -174,7 +174,7 @@ public class NetworthChartController {
|
||||
TreeItem<String> item1 = new TreeItem<>("Assets");
|
||||
TreeItem<String> item2 = new TreeItem<>("Liabilities");
|
||||
|
||||
rootItem.getChildren().addAll(item1, item2);
|
||||
rootItem.getChildren().addAll(List.of(item1, item2));
|
||||
|
||||
treeView_accounts.setRoot(rootItem);
|
||||
treeView_accounts.setCellFactory(new Callback<TreeView<String>, TreeCell<String>>() {
|
||||
@@ -195,7 +195,7 @@ public class NetworthChartController {
|
||||
|
||||
{
|
||||
// Create a custom locale for Denmark
|
||||
Locale danishLocale = new Locale("da", "DK");
|
||||
Locale danishLocale = Locale.of("da", "DK");
|
||||
formatter = NumberFormat.getInstance(danishLocale);
|
||||
formatter.setMinimumFractionDigits(2);
|
||||
formatter.setMaximumFractionDigits(2);
|
||||
@@ -233,18 +233,16 @@ public class NetworthChartController {
|
||||
|
||||
ObservableList<XYChart.Series<String, Number>> chartData = chart.getData();
|
||||
|
||||
chartData.addAll(
|
||||
//series_liability_maria,
|
||||
//series_liability_emil,
|
||||
//series_liability_sofie,
|
||||
series_asset_solana
|
||||
//series_asset_fiatdkk,
|
||||
//series_asset_bitcoin,
|
||||
//series_asset_ethereum,
|
||||
//series_asset_bitcoincash,
|
||||
//series_asset_usdollarcoin,
|
||||
//series_asset_monero
|
||||
);
|
||||
//chartData.add(series_liability_maria);
|
||||
//chartData.add(series_liability_emil);
|
||||
//chartData.add(series_liability_sofie);
|
||||
chartData.add(series_asset_solana);
|
||||
//chartData.add(series_asset_fiatdkk);
|
||||
//chartData.add(series_asset_bitcoin);
|
||||
//chartData.add(series_asset_ethereum);
|
||||
//chartData.add(series_asset_bitcoincash);
|
||||
//chartData.add(series_asset_usdollarcoin);
|
||||
//chartData.add(series_asset_monero);
|
||||
|
||||
this.displayPeriod = ONE_DAY;
|
||||
this.timeStampForLastValueOnChart = 0L;
|
||||
|
||||
@@ -184,7 +184,7 @@ public class PriceChartController {
|
||||
|
||||
{
|
||||
// Create a custom locale for Denmark
|
||||
Locale danishLocale = new Locale("da", "DK");
|
||||
Locale danishLocale = Locale.of("da", "DK");
|
||||
formatter = NumberFormat.getInstance(danishLocale);
|
||||
formatter.setMinimumFractionDigits(2);
|
||||
formatter.setMaximumFractionDigits(2);
|
||||
|
||||
@@ -4,6 +4,7 @@ package crypto.r35157.cauldron;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
@@ -69,7 +70,7 @@ public class PriceFetcher {
|
||||
|
||||
private Map<String, Number> getPrices() throws Exception {
|
||||
String urlString = "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum,solana,monero,bitcoin-cash,usd-coin&vs_currencies=dkk";
|
||||
URL url = new URL(urlString);
|
||||
URL url = URI.create(urlString).toURL();
|
||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||
connection.setRequestMethod("GET");
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
|
||||
@@ -28,7 +29,7 @@ public class PushNotifier {
|
||||
byte[] postDataBytes = postData.toString().getBytes(UTF_8);
|
||||
|
||||
// Create the connection to the Pushover API
|
||||
URL url = new URL(ENDPOINT);
|
||||
URL url = URI.create(ENDPOINT).toURL();
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("POST");
|
||||
conn.setDoOutput(true);
|
||||
|
||||
@@ -95,7 +95,7 @@ public class NenjimTestTool extends Application implements NenjimProcess {
|
||||
setText(null);
|
||||
setGraphic(null);
|
||||
} else {
|
||||
TreeItem<FileNode> treeItem = getTreeTableRow().getTreeItem();
|
||||
TreeItem<FileNode> treeItem = getTableRow().getTreeItem();
|
||||
FileNode node = treeItem.getValue();
|
||||
// Create checkbox
|
||||
CheckBox checkBox = new CheckBox();
|
||||
@@ -145,7 +145,7 @@ public class NenjimTestTool extends Application implements NenjimProcess {
|
||||
typeCol.setCellValueFactory(param -> param.getValue().getValue().typeProperty());
|
||||
typeCol.setPrefWidth(100);
|
||||
|
||||
treeTable.getColumns().setAll(nameCol, sizeCol, typeCol);
|
||||
treeTable.getColumns().setAll(List.of(nameCol, sizeCol, typeCol));
|
||||
|
||||
Button runButton = new Button("Execute Tests");
|
||||
runButton.setOnAction(event -> runTests());
|
||||
|
||||
Reference in New Issue
Block a user