Clean up NativeType creators
- Dominant language
- Java
- Stars
- 94
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
@dietzc I didn't do a great job reviewing the [img-creators branch](https://github.com/imagej/imagej-ops/pull/123). After [it broke Jenkins](http://jenkins.imagej.net/job/ImageJ-OPS/256/) I fixed [DefaultCreateNativeType](https://github.com/imagej/imagej-ops/blob/64fc83b304c13b946d74759f54b21ae7dc81849e/src/main/java/net/imagej/ops/create/nativeType/DefaultCreateNativeType.java) to hard-code the `DoubleType` return, which made it compatible with J6 again.
However, upon looking closer there are now some questions about this implementation:
- Do you really want the `DefaultCreateNativeType` to only return `DoubleTypes`, or did you want a generic parameterized implementation?
- `DefaultCreateImg` implements `CreateNativeImg` but if not given an output type, calls `CreateType` - should it call `CreateNativeType`?
- Also, in `DefaultCreateImg` you can not assume that calling `CreateType` with no args will give you back a `T`. I started a branch with a unit test [demonstrating this](https://github.com/imagej/imagej-ops/tree/create-img) where you get back a `DoubleType` image after providing a `ShortType` factory, which I think is counter-intuitive.
When you get a chance could you address these topics on the branch I started, and file a PR?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.