public void publishIfMatched()

in jax-rs.whiteboard/src/main/java/org/apache/aries/jax/rs/whiteboard/internal/FilteredPublisher.java [45:69]


    public void publishIfMatched(T t, Map<String, ?> properties) {
        if (_closed.get()) {
            return;
        }

        if (_filter.matches(properties)) {
            OSGiResult result = _publisher.publish(t);

            _results.compute(
                    t,
                    (__, results) -> {
                        if (results == null) {
                            results = new ArrayList<>();
                        }

                        results.add(result);

                        return results;
                    });

            if (_closed.get()) {
                result.close();
            }
        }
    }