Skip to content

Commit

Permalink
Fix deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
externl committed Jun 3, 2024
1 parent 596b029 commit 110202f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions java/Chat/src/main/java/com/zeroc/demos/Chat/Coordinator.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import com.zeroc.Glacier2.SessionHelper;
import com.zeroc.Glacier2.SessionCallback;
import com.zeroc.Glacier2.SessionNotExistException;
import com.zeroc.Ice.Util;

class Coordinator
{
Expand All @@ -55,14 +54,14 @@ public Coordinator(MainView mainView, LoginView loginView, ChatView chatView, De
com.zeroc.Ice.InitializationData initData = new com.zeroc.Ice.InitializationData();

java.util.List<String> rArgs = new java.util.ArrayList<>();
initData.properties = com.zeroc.Ice.Util.createProperties(_args, rArgs);
initData.properties = new com.zeroc.Ice.Properties(_args, rArgs);
_args = rArgs.toArray(new String[rArgs.size()]);

initData.properties.setProperty("Ice.Plugin.IceSSL", "com.zeroc.IceSSL.PluginFactory");

// Load the configuration file.
initData.properties.setProperty("Ice.Default.Package", "com.zeroc.demos");
initData.properties = Util.createProperties(args, initData.properties);
initData.properties = new com.zeroc.Ice.Properties(args, initData.properties);

//
// Set Ice.Default.Router if not set.
Expand Down
4 changes: 2 additions & 2 deletions java/Glacier2/simpleChat/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,10 @@ public void windowClosing(WindowEvent e)
com.zeroc.Ice.InitializationData initData = new com.zeroc.Ice.InitializationData();

// Load the configuration file.
initData.properties = com.zeroc.Ice.Util.createProperties();
initData.properties = new com.zeroc.Ice.Properties();
initData.properties.load("config.client");
initData.properties.setProperty("Ice.Default.Package", "com.zeroc.demos.Glacier2.simpleChat");
initData.properties = Util.createProperties(args, initData.properties);
initData.properties = new com.zeroc.Ice.Properties(args, initData.properties);

// Setup a dispatcher to dispath Ice and Glacier2 helper callbacks to the GUI thread.
initData.dispatcher = (runnable, connection) ->
Expand Down
2 changes: 1 addition & 1 deletion java/Ice/interrupt/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static void main(String[] args)
java.util.List<String> extraArgs = new java.util.ArrayList<String>();

com.zeroc.Ice.InitializationData initData = new com.zeroc.Ice.InitializationData();
initData.properties = com.zeroc.Ice.Util.createProperties();
initData.properties = new com.zeroc.Ice.Properties();
initData.properties.load("config.server");

//
Expand Down
2 changes: 1 addition & 1 deletion java/Ice/swing/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static void main(final String[] args)
// Initialize an Ice communicator.
//
com.zeroc.Ice.InitializationData initData = new com.zeroc.Ice.InitializationData();
initData.properties = com.zeroc.Ice.Util.createProperties();
initData.properties = new com.zeroc.Ice.Properties();
initData.properties.load("config.client");
initData.properties.setProperty("Ice.Default.Package", "com.zeroc.demos.Ice.swing");
initData.dispatcher = (runnable, connection) -> SwingUtilities.invokeLater(runnable);
Expand Down
2 changes: 1 addition & 1 deletion java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ subprojects {
apply from: "$rootProject.projectDir/gradle/ice.gradle"

tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:-options"
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:-options" << "-Xlint:deprecation"
options.encoding = "UTF-8"
}
}
Expand Down

0 comments on commit 110202f

Please sign in to comment.