Skip to content

Commit 84be9d1

Browse files
committed
DataHandleService: move default method impls to iface
1 parent c17fd16 commit 84be9d1

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

src/main/java/org/scijava/io/DataHandleService.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,19 @@
4545
public interface DataHandleService extends
4646
WrapperService<Location, DataHandle<Location>>, SciJavaService
4747
{
48-
// NB: Marker interface.
48+
49+
// -- PTService methods --
50+
51+
@Override
52+
@SuppressWarnings({ "rawtypes", "unchecked" })
53+
default Class<DataHandle<Location>> getPluginType() {
54+
return (Class) DataHandle.class;
55+
}
56+
57+
// -- Typed methods --
58+
59+
@Override
60+
default Class<Location> getType() {
61+
return Location.class;
62+
}
4963
}

src/main/java/org/scijava/io/DefaultDataHandleService.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,5 @@ public class DefaultDataHandleService extends
4545
AbstractWrapperService<Location, DataHandle<Location>> implements
4646
DataHandleService
4747
{
48-
49-
// -- PTService methods --
50-
51-
@Override
52-
@SuppressWarnings({ "rawtypes", "unchecked" })
53-
public Class<DataHandle<Location>> getPluginType() {
54-
return (Class) DataHandle.class;
55-
}
56-
57-
// -- Typed methods --
58-
59-
@Override
60-
public Class<Location> getType() {
61-
return Location.class;
62-
}
63-
48+
// NB: No implementation needed.
6449
}

0 commit comments

Comments
 (0)