diff options
author | cushon <cushon@google.com> | 2014-06-24 20:21:05 -0700 |
---|---|---|
committer | Colin Decker <cgdecker@google.com> | 2014-11-05 17:09:03 -0500 |
commit | a05f025470dd79e55ee60e3a614b4c94f23f9715 (patch) | |
tree | 9dcb2286a4d299bdfb9658723ac530a28463f51b /jimfs/src/main | |
parent | 9530349ee035020a8748021b006dfa85e136cc78 (diff) | |
download | jimfs-a05f025470dd79e55ee60e3a614b4c94f23f9715.tar.gz |
Fix java 8 compilation failure.
Type inference changes prevent this code from compiling in java 8. In general,
methods that declare type parameters without using them in any formal parameter
declarations should be avoided.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=69903864
Diffstat (limited to 'jimfs/src/main')
-rw-r--r-- | jimfs/src/main/java/com/google/common/jimfs/AttributeService.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/jimfs/src/main/java/com/google/common/jimfs/AttributeService.java b/jimfs/src/main/java/com/google/common/jimfs/AttributeService.java index fc6fec3..6ad1420 100644 --- a/jimfs/src/main/java/com/google/common/jimfs/AttributeService.java +++ b/jimfs/src/main/java/com/google/common/jimfs/AttributeService.java @@ -200,7 +200,7 @@ final class AttributeService { * Gets the value of the given attribute for the given file. {@code attribute} must be of the * form "view:attribute" or "attribute". */ - public <V> V getAttribute(File file, String attribute) { + public Object getAttribute(File file, String attribute) { String view = getViewName(attribute); String attr = getSingleAttribute(attribute); return getAttribute(file, view, attr); @@ -210,14 +210,13 @@ final class AttributeService { * Gets the value of the given attribute for the given view and file. Neither view nor attribute * may have a ':' character. */ - @SuppressWarnings("unchecked") - public <V> V getAttribute(File file, String view, String attribute) { + public Object getAttribute(File file, String view, String attribute) { Object value = getAttributeInternal(file, view, attribute); if (value == null) { throw new IllegalArgumentException( "invalid attribute for view '" + view + "': " + attribute); } - return (V) value; + return value; } @Nullable |