/**
* A {@link SchemaSourceFilter} which accepts any schema source it is presented with.
*/
- public static final SchemaSourceFilter ALWAYS_ACCEPT = new SchemaSourceFilter() {
- private final Iterable<Class<? extends SchemaSourceRepresentation>> Representations =
- Collections.<Class<? extends SchemaSourceRepresentation>>singletonList(SchemaSourceRepresentation.class);
+ SchemaSourceFilter ALWAYS_ACCEPT = new SchemaSourceFilter() {
+ private final Iterable<Class<? extends SchemaSourceRepresentation>> representations =
+ Collections.singletonList(SchemaSourceRepresentation.class);
+ private final ListenableFuture<Boolean> applyFuture = Futures.immediateFuture(Boolean.TRUE);
@Override
public Iterable<Class<? extends SchemaSourceRepresentation>> supportedRepresentations() {
- return Representations;
+ return representations;
}
@Override
public ListenableFuture<Boolean> apply(final SchemaSourceRepresentation schemaSource) {
- return Futures.immediateFuture(Boolean.TRUE);
+ return applyFuture;
}
};