Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.0
    • Component/s: Toys
    • Labels:
      None
    • Number of attachments :
      3

      Description

      Enclosed is an implementation of Future.object

      It relies on java.util.concurrent in JDK-1.5

      Q: Should I "downgrade" the code so it uses the standalone concurrent library, allowing this to run on pre-JDK-1.5?

      1. Future.java
        1 kB
        Aslak Hellesøy
      2. FutureInvoker.java
        2 kB
        Aslak Hellesøy
      3. FutureTest.java
        2 kB
        Aslak Hellesøy

        Activity

        Aslak Hellesøy made changes -
        Field Original Value New Value
        Attachment Future.java [ 12188 ]
        Aslak Hellesøy made changes -
        Attachment FutureInvoker.java [ 12189 ]
        Aslak Hellesøy made changes -
        Attachment FutureTest.java [ 12190 ]
        Hide
        Dan North added a comment -

        If we use the non-1.5 package names then ProxyToys remains compatible with 1.3 through 1.5. Even when we add <Generics> it will still be binary compatible back down to 1.3, so I would prefer to use the old Doug Lea package names and make the package an optional dependency.

        The smart thing would be to wrap the three classes we use: Callable, Executors and Executor, inside similarly-named classes in proxy.toys.future, and have these statically attempt to load firstly the java.util.concurrent and then (if that fails) the edu.whatever classes in their static initialisers, and delegate off to whichever they find (or fail in <clinit> if neither is found, with a NoClassDefFoundError).

        That way we have an optional dependency on the Doug Lea stuff: you have to both load the FutureXxx classes and not have 1.5.

        Show
        Dan North added a comment - If we use the non-1.5 package names then ProxyToys remains compatible with 1.3 through 1.5. Even when we add <Generics> it will still be binary compatible back down to 1.3, so I would prefer to use the old Doug Lea package names and make the package an optional dependency. The smart thing would be to wrap the three classes we use: Callable, Executors and Executor, inside similarly-named classes in proxy.toys.future, and have these statically attempt to load firstly the java.util.concurrent and then (if that fails) the edu.whatever classes in their static initialisers, and delegate off to whichever they find (or fail in <clinit> if neither is found, with a NoClassDefFoundError). That way we have an optional dependency on the Doug Lea stuff: you have to both load the FutureXxx classes and not have 1.5.
        Jörg Schaible made changes -
        Component/s Toys [ 11560 ]
        Environment
        Hide
        Paul Hammant added a comment -

        Checked in more or less as is; we're JDK 5.0 dependent now.

        Show
        Paul Hammant added a comment - Checked in more or less as is; we're JDK 5.0 dependent now.
        Paul Hammant made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Paul Hammant [ paul ]
        Resolution Fixed [ 1 ]
        Jörg Schaible made changes -
        Status Closed [ 6 ] Reopened [ 4 ]
        Resolution Fixed [ 1 ]
        Jörg Schaible made changes -
        Fix Version/s 1.0 [ 16343 ]
        Jörg Schaible made changes - 12/May/15 12:24 AM
        Resolution Fixed [ 1 ]
        Status Reopened [ 4 ] Closed [ 6 ]

          People

          • Assignee:
            Paul Hammant
            Reporter:
            Aslak Hellesøy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: