Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-2336

API change: CoreInstance.close() doesn't throw ClientException anymore

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2 M1
    • Component/s: None
    • Impact type:
      API change
    • Upgrade notes:
      Hide

      try / catch blocks around method calls should be removed.

      Show
      try / catch blocks around method calls should be removed.

      Description

      The close method on CoreInstance doesn't declare that it throws ClientException anymore (it actually doesn't throw it in the body of the method):

      — a/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/CoreInstance.java Sat Apr 19 18:35:32 2008 +0200
      +++ b/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/CoreInstance.java Sun Apr 20 00:42:42 2008 +0200
      @@ -157,7 +157,7 @@ public class CoreInstance implements Ser
      return sessions.remove(sid);
      }

      • public void close(CoreSession client) throws ClientException {
        + public void close(CoreSession client) {
        client = sessions.remove(client.getSessionId());
        if (client != null) {
        client.destroy();

      Code that uses this method could be then simplified:

      http://hg.nuxeo.org/nuxeo/nuxeo-platform/rev/2c7110a38f3f
      http://hg.nuxeo.org/nuxeo/nuxeo-platform/rev/f93833954cc5

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: