HADOOP-16157. [Clean-up] Remove NULL check before instanceof in AzureNativeFileSystemStore

(Contributed by Shweta Yakkali via Daniel Templeton)

Change-Id: I6269ae66378e46eed440a76f847ae1af1fa95450
(cherry picked from commit bb8ad096e7)
This commit is contained in:
Shweta Yakkali 2019-03-09 09:55:05 -08:00 committed by Steve Loughran
parent 57c6060c3a
commit 6b115966bc
No known key found for this signature in database
GPG Key ID: D22CF846DBB162A0
1 changed files with 2 additions and 2 deletions

View File

@ -1762,7 +1762,7 @@ public class AzureNativeFileSystemStore implements NativeFileSystemStore {
throw new AzureException(e); throw new AzureException(e);
} catch (IOException e) { } catch (IOException e) {
Throwable t = e.getCause(); Throwable t = e.getCause();
if (t != null && t instanceof StorageException) { if (t instanceof StorageException) {
StorageException se = (StorageException) t; StorageException se = (StorageException) t;
// If we got this exception, the blob should have already been created // If we got this exception, the blob should have already been created
if (!"LeaseIdMissing".equals(se.getErrorCode())) { if (!"LeaseIdMissing".equals(se.getErrorCode())) {
@ -2638,7 +2638,7 @@ public class AzureNativeFileSystemStore implements NativeFileSystemStore {
return delete(key, null); return delete(key, null);
} catch (IOException e) { } catch (IOException e) {
Throwable t = e.getCause(); Throwable t = e.getCause();
if (t != null && t instanceof StorageException) { if (t instanceof StorageException) {
StorageException se = (StorageException) t; StorageException se = (StorageException) t;
if ("LeaseIdMissing".equals(se.getErrorCode())){ if ("LeaseIdMissing".equals(se.getErrorCode())){
SelfRenewingLease lease = null; SelfRenewingLease lease = null;