Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Removed unused imports

  • Loading branch information...
commit 122d84a3e15b19d6b291beadbf30fca44e19b060 1 parent b6a57f5
Sidney Maestre authored March 04, 2013
21  java/src/main/java/com/stackmob/example/Increment.java
@@ -21,19 +21,8 @@
21 21
 import com.stackmob.sdkapi.SDKServiceProvider;
22 22
 import com.stackmob.sdkapi.*;
23 23
 
24  
-import com.stackmob.sdkapi.http.HttpService;
25  
-import com.stackmob.sdkapi.http.request.HttpRequest;
26  
-import com.stackmob.sdkapi.http.request.GetRequest;
27  
-import com.stackmob.sdkapi.http.response.HttpResponse;
28  
-import com.stackmob.core.ServiceNotActivatedException;
29  
-import com.stackmob.sdkapi.http.exceptions.AccessDeniedException;
30  
-import com.stackmob.sdkapi.http.exceptions.TimeoutException;
31 24
 import com.stackmob.core.InvalidSchemaException;
32 25
 import com.stackmob.core.DatastoreException;
33  
-
34  
-import java.net.MalformedURLException;
35  
-import com.stackmob.sdkapi.http.request.PostRequest;
36  
-import com.stackmob.sdkapi.http.Header;
37 26
 import com.stackmob.sdkapi.LoggerService;
38 27
 
39 28
 import java.net.HttpURLConnection;
@@ -41,8 +30,6 @@
41 30
 import java.util.HashMap;
42 31
 import java.util.List;
43 32
 import java.util.Map;
44  
-import java.util.HashSet;
45  
-import java.util.Set;
46 33
 import java.util.ArrayList;
47 34
 
48 35
 public class Increment implements CustomCodeMethod {
@@ -67,10 +54,10 @@ public ResponseToProcess execute(ProcessedAPIRequest request, SDKServiceProvider
67 54
     DataService dataService = serviceProvider.getDataService();   // get the StackMob datastore service and assemble the query
68 55
 
69 56
     try {
70  
-        List<SMUpdate> update = new ArrayList<SMUpdate>();
71  
-        update.add(new SMIncrement("num_likes", -2));
72  
-        SMObject incrementResult = dataService.updateObject("todo", "todo1", update); // todo schema with todo_id = todo1
73  
-        responseBody = incrementResult.toString();
  57
+      List<SMUpdate> update = new ArrayList<SMUpdate>();
  58
+      update.add(new SMIncrement("num_likes", -2));
  59
+      SMObject incrementResult = dataService.updateObject("todo", "todo1", update); // todo schema with todo_id = todo1
  60
+      responseBody = incrementResult.toString();
74 61
     } catch (InvalidSchemaException e) {
75 62
       HashMap<String, String> errMap = new HashMap<String, String>();
76 63
       errMap.put("error", "invalid_schema");

0 notes on commit 122d84a

Please sign in to comment.
Something went wrong with that request. Please try again.