accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [3/5] accumulo git commit: ACCUMULO-4195 Fix rawtypes warnings
Date Fri, 06 May 2016 23:08:34 GMT
ACCUMULO-4195 Fix rawtypes warnings

Use appropriate generics parameters for casts to fix rawtypes warnings,
and avoid unnecessary unchecked warnings.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/a38c9ad3
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/a38c9ad3
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/a38c9ad3

Branch: refs/heads/master
Commit: a38c9ad362027bf350630c44501c5c14888351ba
Parents: 0dd5f8d
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Fri May 6 19:04:50 2016 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Fri May 6 19:04:50 2016 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/core/file/FileOperations.java | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/a38c9ad3/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java b/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java
index 797324b..314bbae 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java
@@ -75,9 +75,8 @@ public abstract class FileOperations {
    * long size = fileOperations.getFileSize().forFile(filename, fileSystem, fsConfiguration).withTableConfiguration(tableConf).execute();
    * </pre>
    */
-  @SuppressWarnings("unchecked")
   public NeedsFile<GetFileSizeOperationBuilder> getFileSize() {
-    return (NeedsFile) new GetFileSizeOperation();
+    return (NeedsFile<GetFileSizeOperationBuilder>) new GetFileSizeOperation();
   }
 
   /**
@@ -93,9 +92,8 @@ public abstract class FileOperations {
    *     .build();
    * </pre>
    */
-  @SuppressWarnings("unchecked")
   public NeedsFile<OpenWriterOperationBuilder> newWriterBuilder() {
-    return (NeedsFile) new OpenWriterOperation();
+    return (NeedsFile<OpenWriterOperationBuilder>) new OpenWriterOperation();
   }
 
   /**
@@ -111,9 +109,8 @@ public abstract class FileOperations {
    *     .build();
    * </pre>
    */
-  @SuppressWarnings("unchecked")
   public NeedsFile<OpenIndexOperationBuilder> newIndexReaderBuilder() {
-    return (NeedsFile) new OpenIndexOperation();
+    return (NeedsFile<OpenIndexOperationBuilder>) new OpenIndexOperation();
   }
 
   /**
@@ -134,7 +131,7 @@ public abstract class FileOperations {
    */
   @SuppressWarnings("unchecked")
   public NeedsFile<NeedsRange<OpenScanReaderOperationBuilder>> newScanReaderBuilder()
{
-    return (NeedsFile) new OpenScanReaderOperation();
+    return (NeedsFile<NeedsRange<OpenScanReaderOperationBuilder>>) (NeedsFile<?>)
new OpenScanReaderOperation();
   }
 
   /**
@@ -152,9 +149,8 @@ public abstract class FileOperations {
    *     .build();
    * </pre>
    */
-  @SuppressWarnings("unchecked")
   public NeedsFile<OpenReaderOperationBuilder> newReaderBuilder() {
-    return (NeedsFile) new OpenReaderOperation();
+    return (NeedsFile<OpenReaderOperationBuilder>) new OpenReaderOperation();
   }
 
   //


Mime
View raw message