Skip to content

Commit

Permalink
Merge pull request #60 from jofriedm-msft/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
jofriedm-msft authored Oct 11, 2017
2 parents cd22026 + 9a2e215 commit 191f088
Show file tree
Hide file tree
Showing 33 changed files with 1,925 additions and 223 deletions.
9 changes: 9 additions & 0 deletions BreakingChanges.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Breaking Changes in 2.0.0

FILE
* Many File service APIs can now throw a URISyntaxException.
* Changed listShares() ShareListingDetails parameter to be an enum set like what is done for listing blobs.

OTHER
* DefaultEndpointsProtocol will now be explicitly included in generated connection strings.
* Connection string parsing has been substantially re-written and expanded. Please refer to current documentation about connection string formats.
6 changes: 6 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2017.10.11 Version 2.0.0
* Added support for taking a snapshot of a share.
* IOExceptions wrapping StorageExceptions will now contain the StorageException message in the outer exception.
* Connection string support expanded to allow AccountName to be specified with SharedAccessSignature and DefaultEndpointsProtocol. In this case, SharedAccessSignature is used for credentials, while having both DefaultEndpointsProtocol and AccountName allows the library to infer a set of default endpoints. Additionally, we have added support for BlobSecondaryEndpoint, QueueSecondaryEndpoint, TableSecondaryEndpoint, and FileSecondaryEndpoint. Specifying a secondary endpoint requires the specification of the corresponding primary.
* The use of DefaultEndpointsProtocol in a connection string is now optional in the case where endpoints would be automatically generated; if missing, a value of https will be inferred. When the parsed account settings in such a case are used to generate a connection string, the value of DefaultEndpointsProtocol will be explicitly included.

2017.08.30 Version 1.2.0
* Fixed a bug when using a SAS token where the token was being omitted from calls to delete a directory in the file service.
* For Standard Storage Accounts only, added the ability to set the tier of individual block blobs. The tier can currently only be set through uploadTier().
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ First, add mavenCentral to your repositories by adding the following to your gra
Then, add a dependency by adding the following to your gradle build file:

dependencies {
compile 'com.microsoft.azure.android:azure-storage-android:1.2.0@aar'
compile 'com.microsoft.azure.android:azure-storage-android:2.0.0@aar'
}

### Option 4: aar via Maven
Expand All @@ -57,7 +57,7 @@ To get the binaries of this library as distributed by Microsoft, ready for use w
<dependency>
<groupId>com.microsoft.azure.android</groupId>
<artifactId>azure-storage-android</artifactId>
<version>1.2.0</version>
<version>2.0.0</version>
<type>aar</type>
</dependency>
```
Expand Down
2 changes: 1 addition & 1 deletion microsoft-azure-storage-samples/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.microsoft.azure.storage.samples"
android:versionCode="0"
android:versionName="1.2.0" >
android:versionName="2.0.0" >

<uses-sdk
android:minSdkVersion="15"
Expand Down
2 changes: 1 addition & 1 deletion microsoft-azure-storage-test/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.microsoft.azure.android.test"
android:versionCode="0"
android:versionName="1.2.0" >
android:versionName="2.0.0" >

<uses-sdk
android:minSdkVersion="15"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@
import com.microsoft.azure.storage.blob.*;
import com.microsoft.azure.storage.core.SR;

import org.apache.http.protocol.HTTP;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.SocketException;
import java.net.URISyntaxException;
import java.util.ArrayList;

Expand Down Expand Up @@ -121,14 +117,16 @@ public void eventOccurred(ErrorReceivingResponseEvent eventArg) {
}
});

try {
OperationContext.getGlobalErrorReceivingResponseEventHandler().addListener(new StorageEvent<ErrorReceivingResponseEvent>() {
StorageEvent<ErrorReceivingResponseEvent> globalResponseReceivedListener = new StorageEvent<ErrorReceivingResponseEvent>() {

@Override
public void eventOccurred(ErrorReceivingResponseEvent eventArg) {
fail("This event should not trigger");
}
});
@Override
public void eventOccurred(ErrorReceivingResponseEvent eventArg) {
fail("This event should not trigger");
}
};

try {
OperationContext.getGlobalErrorReceivingResponseEventHandler().addListener(globalResponseReceivedListener);

assertEquals(0, callList.size());
assertEquals(0, globalCallList.size());
Expand Down Expand Up @@ -157,8 +155,7 @@ public void eventOccurred(ErrorReceivingResponseEvent eventArg) {
assertEquals(2, globalCallList.size());
}
finally {
// reset event handler to prevent future tests from failing
OperationContext.setGlobalErrorReceivingResponseEventHandler(new StorageEventMultiCaster<ErrorReceivingResponseEvent, StorageEvent<ErrorReceivingResponseEvent>>());
OperationContext.getGlobalErrorReceivingResponseEventHandler().removeListener(globalResponseReceivedListener);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.net.URISyntaxException;
import java.text.ParseException;
Expand Down Expand Up @@ -141,7 +142,8 @@ public void testProxy() throws URISyntaxException, StorageException {
fail("Bad proxy should throw an exception.");
} catch (StorageException e) {
if (e.getCause().getClass() != ConnectException.class &&
e.getCause().getClass() != SocketTimeoutException.class) {
e.getCause().getClass() != SocketTimeoutException.class &&
e.getCause().getClass() != SocketException.class) {
Assert.fail("Unepected exception for bad proxy");
}
}
Expand All @@ -167,7 +169,8 @@ public void testDefaultProxy() throws URISyntaxException, StorageException {
fail("Bad proxy should throw an exception.");
} catch (StorageException e) {
if (e.getCause().getClass() != ConnectException.class &&
e.getCause().getClass() != SocketTimeoutException.class) {
e.getCause().getClass() != SocketTimeoutException.class &&
e.getCause().getClass() != SocketException.class) {
Assert.fail("Unepected exception for bad proxy");
}
}
Expand Down
Loading

0 comments on commit 191f088

Please sign in to comment.