Skip to content

Commit 72b5bc6

Browse files
committed
Updated google oauth client and removed deprecated calls
1 parent c1e4482 commit 72b5bc6

File tree

3 files changed

+24
-15
lines changed

3 files changed

+24
-15
lines changed

alfresco-cloud-example/.project

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>alfresco-cloud-example</name>
4-
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
5-
<projects/>
6-
<buildSpec>
7-
<buildCommand>
8-
<name>org.eclipse.jdt.core.javabuilder</name>
9-
</buildCommand>
10-
</buildSpec>
11-
<natures>
12-
<nature>org.eclipse.jdt.core.javanature</nature>
13-
</natures>
14-
</projectDescription>
3+
<name>alfresco-cloud-example</name>
4+
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.m2e.core.maven2Builder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
21+
<nature>org.eclipse.jdt.core.javanature</nature>
22+
</natures>
23+
</projectDescription>

alfresco-cloud-example/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<dependency>
3838
<groupId>com.google.oauth-client</groupId>
3939
<artifactId>google-oauth-client</artifactId>
40-
<version>1.10.1-beta</version>
40+
<version>1.13.1-beta</version>
4141
</dependency>
4242
<dependency>
4343
<groupId>javax.servlet</groupId>

alfresco-cloud-example/src/main/java/com/alfresco/cloud/example/BaseJavaExample.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
import com.google.api.client.http.HttpRequestInitializer;
4242
import com.google.api.client.http.HttpTransport;
4343
import com.google.api.client.http.javanet.NetHttpTransport;
44-
import com.google.api.client.http.json.JsonHttpParser;
4544
import com.google.api.client.json.JsonFactory;
45+
import com.google.api.client.json.JsonObjectParser;
4646
import com.google.api.client.json.jackson.JacksonFactory;
4747

4848
/**
@@ -101,7 +101,7 @@ public void run() throws Exception {
101101
@Override
102102
public void initialize(HttpRequest request) throws IOException {
103103
credential.initialize(request);
104-
request.addParser(new JsonHttpParser(JSON_FACTORY));
104+
request.setParser(new JsonObjectParser(new JacksonFactory()));
105105
}
106106
});
107107

0 commit comments

Comments
 (0)