Skip to content

Commit

Permalink
Merge pull request #995 from Azure/timtay/previewMerge
Browse files Browse the repository at this point in the history
Merge master into preview
  • Loading branch information
timtay-microsoft authored Nov 16, 2020
2 parents fe377ac + 14ce78b commit eb3f37c
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github_issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Sync issue to Azure DevOps work item
"on":
issues:
types:
[opened, edited, deleted, closed, reopened, labeled, unlabeled]
[opened, reopened]

jobs:
alert:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class TransportUtils
public static String IOTHUB_API_VERSION = "2020-09-30";

private static final String JAVA_DEVICE_CLIENT_IDENTIFIER = "com.microsoft.azure.sdk.iot.iot-device-client";
private static final String CLIENT_VERSION = "1.26.0";
private static final String CLIENT_VERSION = "1.27.0";

private static String JAVA_RUNTIME = System.getProperty("java.version");
private static String OPERATING_SYSTEM = System.getProperty("java.runtime.name").toLowerCase().contains("android") ? "Android" : System.getProperty("os.name");
Expand Down
2 changes: 1 addition & 1 deletion device/iot-device-samples/android-sample/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dependencies {
testImplementation 'junit:junit:4.12'

// Remote binary dependency
api ('com.microsoft.azure.sdk.iot:iot-device-client:1.26.0') {
api ('com.microsoft.azure.sdk.iot:iot-device-client:1.27.0') {
exclude module: 'slf4j-api'
exclude module:'azure-storage'
}
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
<dice-provider-artifact-id>dice-provider</dice-provider-artifact-id>
<x509-provider-artifact-id>x509-provider</x509-provider-artifact-id>

<iot-device-client-version>1.26.0</iot-device-client-version>
<iot-device-client-version>1.27.0</iot-device-client-version>
<iot-service-client-version>1.26.0</iot-service-client-version>
<iot-deps-version>0.11.0</iot-deps-version>
<provisioning-device-client-version>1.8.4</provisioning-device-client-version>
<provisioning-device-client-version>1.8.5</provisioning-device-client-version>
<provisioning-service-client-version>1.7.0</provisioning-service-client-version>
<security-provider-version>1.3.0</security-provider-version>
<tpm-provider-emulator-version>1.1.1</tpm-provider-emulator-version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class SDKUtils
{
private static final String SERVICE_API_VERSION = "2019-03-31";
public static final String PROVISIONING_DEVICE_CLIENT_IDENTIFIER = "com.microsoft.azure.sdk.iot.dps.dps-device-client/";
public static final String PROVISIONING_DEVICE_CLIENT_VERSION = "1.8.4";
public static final String PROVISIONING_DEVICE_CLIENT_VERSION = "1.8.5";

private static String JAVA_RUNTIME = System.getProperty("java.version");
private static String OPERATING_SYSTEM = System.getProperty("java.runtime.name").toLowerCase().contains("android") ? "Android" : System.getProperty("os.name");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
import com.microsoft.azure.sdk.iot.provisioning.device.internal.SDKUtils;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;

public class UrlPathBuilder
{
Expand Down Expand Up @@ -125,9 +122,8 @@ private String generateRequestUrlHttp(String registrationId, String operationsId
* Generates URL Encoded SAS Token
* @param registrationId Id for the registration. Cannot be {@code null} or empty
* @return A string of format
* @throws UnsupportedEncodingException if the string could not be encoded.
*/
public String generateSasTokenUrl(String registrationId) throws UnsupportedEncodingException
public String generateSasTokenUrl(String registrationId)
{
//SRS_UrlPathBuilder_25_005: [ This method shall throw IllegalArgumentException if the registration id is null or empty. ]
if (registrationId == null || registrationId.isEmpty())
Expand All @@ -141,7 +137,7 @@ public String generateSasTokenUrl(String registrationId) throws UnsupportedEncod
sasTokenUrl.append(REGISTRATIONS);
sasTokenUrl.append(SLASH);
sasTokenUrl.append(registrationId);
return URLEncoder.encode(sasTokenUrl.toString(), StandardCharsets.UTF_8.displayName());
return sasTokenUrl.toString();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ public void generateRequestUrlHttpThrowsOnEmptyOpID() throws IOException
public void generateSasTokenUrlSucceeds() throws IOException
{
//arrange
//testScope%2Fregistrations%2FtestRegistrationId
final String expectedSasTokenUrl = TEST_SCOPE + "%2Fregistrations%2F" + TEST_REGISTRATION_ID;
//testScope/registrations/testRegistrationId
final String expectedSasTokenUrl = TEST_SCOPE + "/registrations/" + TEST_REGISTRATION_ID;
UrlPathBuilder urlPathBuilder = new UrlPathBuilder(TEST_HOST_NAME, TEST_SCOPE, ProvisioningDeviceClientTransportProtocol.HTTPS);
//act
String sastokenUrl = urlPathBuilder.generateSasTokenUrl(TEST_REGISTRATION_ID);
Expand Down

0 comments on commit eb3f37c

Please sign in to comment.