Commits

Bob Bergman committed d86be72

IUpdate for latest p3 promises api changes

Comments (0)

Files changed (2)

         <dependency>
             <groupId>com.atlassian.labs</groupId>
             <artifactId>remoteapps-api</artifactId>
-            <version>0.5.612</version>
+            <version>0.5.634</version>
             <scope>provided</scope>
         </dependency>
 		<dependency>

src/main/java/com/atlassian/jira/rest/client/p3/internal/AbstractP3RestClient.java

 import com.atlassian.labs.remoteapps.api.service.http.HostHttpClient;
 import com.atlassian.labs.remoteapps.api.service.http.Response;
 import com.atlassian.labs.remoteapps.api.service.http.ResponsePromise;
-import com.atlassian.labs.remoteapps.spi.Promises;
 import com.google.common.util.concurrent.SettableFuture;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import java.util.Collection;
 import java.util.concurrent.Callable;
 
+import static com.atlassian.labs.remoteapps.api.Promises.toPromise;
+
 /**
  *
  */
                 .on(404, notFoundCallback)
                 .created(successCallback)
                 .others(ERROR_CALLBACK);
-        return Promises.ofFuture(future);
+        return toPromise(future);
     }
 	protected <T> Promise<T> callAndParse(ResponsePromise responsePromise, final JsonParser<?, T> parser) {
         return callAndParse(responsePromise, new ResponseHandler<T>()
             }
         })
                 .others(ERROR_CALLBACK);
-        return Promises.ofFuture(future);
+        return toPromise(future);
 	}
 
 	static Collection<String> extractErrors(String body) throws JSONException {