*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
- public static class InsertToken implements ClientPutCallback {
+ public class InsertToken implements ClientPutCallback {
/** The image being inserted. */
private final Image image;
*
* @see ImageInsertListener#imageInsertAborted(Image)
*/
+ @SuppressWarnings("synthetic-access")
public void cancel() {
- clientPutter.cancel(null, null);
+ clientPutter.cancel(null, node.clientCore.clientContext);
for (ImageInsertListener imageInsertListener : imageInsertListeners) {
imageInsertListener.imageInsertAborted(image);
}
public void insertImage(TemporaryImage temporaryImage, Image image) {
Validation.begin().isNotNull("Temporary Image", temporaryImage).isNotNull("Image", image).check().isEqual("Image IDs", image.getId(), temporaryImage.getId()).check();
try {
- InsertToken insertToken = new InsertToken(image);
+ InsertToken insertToken = freenetInterface.new InsertToken(image);
insertTokens.put(image.getId(), insertToken);
insertToken.addImageInsertListener(core);
freenetInterface.insertImage(temporaryImage, image, insertToken);