You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by st...@apache.org on 2019/06/07 17:34:50 UTC
[hadoop] 06/09: HADOOP-16157. [Clean-up] Remove NULL check before
instanceof in AzureNativeFileSystemStore (Contributed by Shweta Yakkali via
Daniel Templeton)
This is an automated email from the ASF dual-hosted git repository.
stevel pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
commit 6b115966bc5c1d448d17467be7ad962b7c59715e
Author: Shweta Yakkali <sh...@cloudera.com>
AuthorDate: Sat Mar 9 09:55:05 2019 -0800
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 bb8ad096e785f7127a5c0de15167255d9b119578)
---
.../java/org/apache/hadoop/fs/azure/AzureNativeFileSystemStore.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/AzureNativeFileSystemStore.java b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/AzureNativeFileSystemStore.java
index a87bbc5..239dec2 100644
--- a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/AzureNativeFileSystemStore.java
+++ b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/AzureNativeFileSystemStore.java
@@ -1762,7 +1762,7 @@ public class AzureNativeFileSystemStore implements NativeFileSystemStore {
throw new AzureException(e);
} catch (IOException e) {
Throwable t = e.getCause();
- if (t != null && t instanceof StorageException) {
+ if (t instanceof StorageException) {
StorageException se = (StorageException) t;
// If we got this exception, the blob should have already been created
if (!"LeaseIdMissing".equals(se.getErrorCode())) {
@@ -2638,7 +2638,7 @@ public class AzureNativeFileSystemStore implements NativeFileSystemStore {
return delete(key, null);
} catch (IOException e) {
Throwable t = e.getCause();
- if (t != null && t instanceof StorageException) {
+ if (t instanceof StorageException) {
StorageException se = (StorageException) t;
if ("LeaseIdMissing".equals(se.getErrorCode())){
SelfRenewingLease lease = null;
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org