diff options
author | Bernard Normier <bernard@zeroc.com> | 2024-10-20 10:00:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-20 10:00:34 -0400 |
commit | 104209048c2e41b67ad6f9d82bf75c9d642ceb27 (patch) | |
tree | b3a4d252ce9adeb98347198045b7d21cc6f5676a | |
parent | Use equals to compare endpoint objects in Java (#2829) (diff) | |
download | ice-104209048c2e41b67ad6f9d82bf75c9d642ceb27.tar.bz2 ice-104209048c2e41b67ad6f9d82bf75c9d642ceb27.tar.xz ice-104209048c2e41b67ad6f9d82bf75c9d642ceb27.zip |
Remove incorrect synchronized from ConnectionI.setAdapter (java) (#2939)
-rw-r--r-- | java-compat/src/Ice/src/main/java/Ice/ConnectionI.java | 4 | ||||
-rw-r--r-- | java/src/Ice/src/main/java/com/zeroc/Ice/ConnectionI.java | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/java-compat/src/Ice/src/main/java/Ice/ConnectionI.java b/java-compat/src/Ice/src/main/java/Ice/ConnectionI.java index b08df57d424..958119c8211 100644 --- a/java-compat/src/Ice/src/main/java/Ice/ConnectionI.java +++ b/java-compat/src/Ice/src/main/java/Ice/ConnectionI.java @@ -970,8 +970,8 @@ public final class ConnectionI extends IceInternal.EventHandler { if(adapter != null) { - // Go through the adapter to set the adapter and servant manager on this connection - // to ensure the object adapter is still active. + // Go through the adapter to set the adapter on this connection to ensure the + // object adapter is still active and to ensure proper locking order. ((ObjectAdapterI)adapter).setAdapterOnConnection(this); } else diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/ConnectionI.java b/java/src/Ice/src/main/java/com/zeroc/Ice/ConnectionI.java index a74f24a05bd..9091c5cad43 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/ConnectionI.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/ConnectionI.java @@ -871,12 +871,12 @@ public final class ConnectionI extends com.zeroc.IceInternal.EventHandler } @Override - public synchronized void setAdapter(ObjectAdapter adapter) + public void setAdapter(ObjectAdapter adapter) { if(adapter != null) { - // Go through the adapter to set the adapter and servant manager on this connection - // to ensure the object adapter is still active. + // Go through the adapter to set the adapter on this connection to ensure the + // object adapter is still active and to ensure proper locking order. ((ObjectAdapterI)adapter).setAdapterOnConnection(this); } else |