Skip to content

Commit f949ba2

Browse files
authored
Merge branch 'master' into video-version-bump
2 parents 2f31b73 + 3d8cd56 commit f949ba2

File tree

5 files changed

+461
-406
lines changed

5 files changed

+461
-406
lines changed

appengine-java8/endpoints-v2-backend/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ endpointsServer {
5454
hostname = "echo-api.endpoints.${projectId}.cloud.goog"
5555
}
5656

57-
sourceCompatibility = 1.7 // App Engine Standard uses Java 7
58-
targetCompatibility = 1.7 // App Engine Standard uses Java 7
57+
sourceCompatibility = 1.8
58+
targetCompatibility = 1.8
5959

6060
// this replaces the ${endpoints.project.id} in appengine-web.xml and web.xml
6161
task replaceProjectId(type: Copy) {
6262
from 'src/main/webapp/WEB-INF/'
6363
include '*.xml'
64-
into 'build/exploded-backend/WEB-INF'
64+
into "build/exploded-${archivesBaseName}/WEB-INF"
6565
expand(endpoints:[project:[id:projectId]])
6666
filteringCharset = 'UTF-8'
6767
}

iot/api-client/mqtt_example/src/main/java/com/google/cloud/iot/examples/MqttExample.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ private static String createJwtRsa(String projectId, String privateKeyFile) thro
5353

5454
byte[] keyBytes = Files.readAllBytes(Paths.get(privateKeyFile));
5555
PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(keyBytes);
56-
KeyFactory kf = KeyFactory.getInstance("RSA256");
56+
KeyFactory kf = KeyFactory.getInstance("RSA");
5757

5858
return jwtBuilder.signWith(SignatureAlgorithm.RS256, kf.generatePrivate(spec)).compact();
5959
}
@@ -107,10 +107,11 @@ public static void main(String[] args) throws Exception {
107107
// to authorize the device.
108108
connectOptions.setUserName("unused");
109109

110-
if (options.algorithm == "RSA256") {
110+
System.out.println(options.algorithm);
111+
if (options.algorithm.equals("RS256")) {
111112
connectOptions.setPassword(
112113
createJwtRsa(options.projectId, options.privateKeyFile).toCharArray());
113-
} else if (options.algorithm == "ES256") {
114+
} else if (options.algorithm.equals("ES256")) {
114115
connectOptions.setPassword(
115116
createJwtEs(options.projectId, options.privateKeyFile).toCharArray());
116117
} else {

0 commit comments

Comments
 (0)