Details

    • Type: New Feature New Feature
    • Status: Reopened Reopened
    • 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

        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.
        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.

          People

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

            Dates

            • Created:
              Updated: