Skip to content

Commit

Permalink
fix long lines (BaseTransformer) + investigating spurious unchecked w…
Browse files Browse the repository at this point in the history
…arnings by IDEA inspections
  • Loading branch information
timzam committed Sep 7, 2017
1 parent 02f104c commit 8a0ce25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

public abstract class BaseTransformer<SourceT, TargetT> implements Transformer<SourceT, TargetT> {
@Override
public <ParameterTargetT> Transformer<SourceT, ParameterTargetT> andThen(final Transformer<TargetT, ParameterTargetT> transformer) {
public <ParameterTargetT> Transformer<SourceT, ParameterTargetT> andThen(
final Transformer<TargetT, ParameterTargetT> transformer) {
final Transformer<SourceT, TargetT> firstTransformer = this;
return new BaseTransformer<SourceT, ParameterTargetT>() {
@Override
Expand All @@ -34,7 +35,8 @@ public Transformation<SourceT, ParameterTargetT> transform(SourceT source, Param
return createTransformation(tn1, tn2);
}

private Transformation<SourceT, ParameterTargetT> createTransformation(final Transformation<SourceT, TargetT> tn1, final Transformation<TargetT, ParameterTargetT> tn2) {
private Transformation<SourceT, ParameterTargetT> createTransformation(
final Transformation<SourceT, TargetT> tn1, final Transformation<TargetT, ParameterTargetT> tn2) {
return new Transformation<SourceT, ParameterTargetT>() {
@Override
public SourceT getSource() {
Expand All @@ -55,4 +57,4 @@ protected void doDispose() {
}
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static <ItemT> Transformer<ItemT, ItemT> identity() {
}

public static <TargetT, SourceT extends TargetT> Transformer<SourceT, TargetT> coerce() {
return new BaseTransformer<SourceT, TargetT>() {
Transformer<SourceT, TargetT> transformer = new BaseTransformer<SourceT, TargetT>() {
@Override
public Transformation<SourceT, TargetT> transform(final SourceT from) {
return new Transformation<SourceT, TargetT>() {
Expand All @@ -71,6 +71,7 @@ public Transformation<SourceT, TargetT> transform(SourceT from, TargetT to) {
throw new UnsupportedOperationException();
}
};
return transformer;
}

public static <ItemT> Transformer<ObservableList<ItemT>, ObservableList<? extends ItemT>> coerceList() {
Expand Down

0 comments on commit 8a0ce25

Please sign in to comment.