private void init()

in src/main/java/org/apache/sling/api/request/header/MediaRangeList.java [88:108]


    private void init(String headerValue) {
        if (headerValue == null || headerValue.trim().length() == 0) {
            // RFC 2616: "If no Accept header field is present,
            // then it is assumed that the client accepts all media types."
            this.matchesAll = true;
            this.add(new MediaRange(WILDCARD + "/" + WILDCARD));
        } else {
            String[] mediaTypes = headerValue.split(",");
            for (String type : mediaTypes) {
                try {
                    MediaRange range = new MediaRange(type);
                    this.add(range);
                    if (range.matchesAll()) {
                        this.matchesAll = true;
                    }
                } catch (Throwable throwable) {
                    log.warn("Error registering media type " + type, throwable);
                }
            }
        }
    }