geronimo-javamail_1.3.1/geronimo-javamail_1.3.1_provider/src/main/java/org/apache/geronimo/javamail/store/nntp/NNTPRootFolder.java [278:332]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        public WildmatMatcher(String pattern) {
            int section = 0;

            // handle the easy cases first

            // single wild card?
            if (pattern.equals("*")) {
                matchAny = true;
                return;
            }

            // find the first wild card
            int wildcard = pattern.indexOf('*');

            // no wild card at all?
            if (wildcard == -1) {
                exactMatch = pattern;
                return;
            }

            // pattern not begin with a wildcard? We need to pull off the
            // leading section
            if (!pattern.startsWith("*")) {
                firstSection = pattern.substring(0, wildcard);
                section = wildcard + 1;
                // this could be "yada*", so we could be done.
                if (section >= pattern.length()) {
                    return;
                }
            }

            // now parse off the middle sections, making sure to handle the end
            // condition correctly.
            while (section < pattern.length()) {
                // find the next wildcard position
                wildcard = pattern.indexOf('*', section);
                if (wildcard == -1) {
                    // not found, we're at the end of the pattern. We need to
                    // match on the end.
                    lastSection = pattern.substring(section);
                    return;
                }
                // we could have a null section, which we'll just ignore.
                else if (wildcard == section) {
                    // step over the wild card
                    section++;
                } else {
                    // pluck off the next section
                    matchSections.add(pattern.substring(section, wildcard));
                    // step over the wild card character and check if we've
                    // reached the end.
                    section = wildcard + 1;
                }
            }
        }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



geronimo-mail_2.1/geronimo-mail_2.1_provider/src/main/java/org/apache/geronimo/mail/store/nntp/NNTPRootFolder.java [278:332]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        public WildmatMatcher(String pattern) {
            int section = 0;

            // handle the easy cases first

            // single wild card?
            if (pattern.equals("*")) {
                matchAny = true;
                return;
            }

            // find the first wild card
            int wildcard = pattern.indexOf('*');

            // no wild card at all?
            if (wildcard == -1) {
                exactMatch = pattern;
                return;
            }

            // pattern not begin with a wildcard? We need to pull off the
            // leading section
            if (!pattern.startsWith("*")) {
                firstSection = pattern.substring(0, wildcard);
                section = wildcard + 1;
                // this could be "yada*", so we could be done.
                if (section >= pattern.length()) {
                    return;
                }
            }

            // now parse off the middle sections, making sure to handle the end
            // condition correctly.
            while (section < pattern.length()) {
                // find the next wildcard position
                wildcard = pattern.indexOf('*', section);
                if (wildcard == -1) {
                    // not found, we're at the end of the pattern. We need to
                    // match on the end.
                    lastSection = pattern.substring(section);
                    return;
                }
                // we could have a null section, which we'll just ignore.
                else if (wildcard == section) {
                    // step over the wild card
                    section++;
                } else {
                    // pluck off the next section
                    matchSections.add(pattern.substring(section, wildcard));
                    // step over the wild card character and check if we've
                    // reached the end.
                    section = wildcard + 1;
                }
            }
        }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/store/nntp/NNTPRootFolder.java [278:332]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        public WildmatMatcher(String pattern) {
            int section = 0;

            // handle the easy cases first

            // single wild card?
            if (pattern.equals("*")) {
                matchAny = true;
                return;
            }

            // find the first wild card
            int wildcard = pattern.indexOf('*');

            // no wild card at all?
            if (wildcard == -1) {
                exactMatch = pattern;
                return;
            }

            // pattern not begin with a wildcard? We need to pull off the
            // leading section
            if (!pattern.startsWith("*")) {
                firstSection = pattern.substring(0, wildcard);
                section = wildcard + 1;
                // this could be "yada*", so we could be done.
                if (section >= pattern.length()) {
                    return;
                }
            }

            // now parse off the middle sections, making sure to handle the end
            // condition correctly.
            while (section < pattern.length()) {
                // find the next wildcard position
                wildcard = pattern.indexOf('*', section);
                if (wildcard == -1) {
                    // not found, we're at the end of the pattern. We need to
                    // match on the end.
                    lastSection = pattern.substring(section);
                    return;
                }
                // we could have a null section, which we'll just ignore.
                else if (wildcard == section) {
                    // step over the wild card
                    section++;
                } else {
                    // pluck off the next section
                    matchSections.add(pattern.substring(section, wildcard));
                    // step over the wild card character and check if we've
                    // reached the end.
                    section = wildcard + 1;
                }
            }
        }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



geronimo-javamail_1.5/geronimo-javamail_1.5_provider/src/main/java/org/apache/geronimo/javamail/store/nntp/NNTPRootFolder.java [278:332]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        public WildmatMatcher(String pattern) {
            int section = 0;

            // handle the easy cases first

            // single wild card?
            if (pattern.equals("*")) {
                matchAny = true;
                return;
            }

            // find the first wild card
            int wildcard = pattern.indexOf('*');

            // no wild card at all?
            if (wildcard == -1) {
                exactMatch = pattern;
                return;
            }

            // pattern not begin with a wildcard? We need to pull off the
            // leading section
            if (!pattern.startsWith("*")) {
                firstSection = pattern.substring(0, wildcard);
                section = wildcard + 1;
                // this could be "yada*", so we could be done.
                if (section >= pattern.length()) {
                    return;
                }
            }

            // now parse off the middle sections, making sure to handle the end
            // condition correctly.
            while (section < pattern.length()) {
                // find the next wildcard position
                wildcard = pattern.indexOf('*', section);
                if (wildcard == -1) {
                    // not found, we're at the end of the pattern. We need to
                    // match on the end.
                    lastSection = pattern.substring(section);
                    return;
                }
                // we could have a null section, which we'll just ignore.
                else if (wildcard == section) {
                    // step over the wild card
                    section++;
                } else {
                    // pluck off the next section
                    matchSections.add(pattern.substring(section, wildcard));
                    // step over the wild card character and check if we've
                    // reached the end.
                    section = wildcard + 1;
                }
            }
        }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



geronimo-javamail_1.6/geronimo-javamail_1.6_provider/src/main/java/org/apache/geronimo/javamail/store/nntp/NNTPRootFolder.java [278:332]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        public WildmatMatcher(String pattern) {
            int section = 0;

            // handle the easy cases first

            // single wild card?
            if (pattern.equals("*")) {
                matchAny = true;
                return;
            }

            // find the first wild card
            int wildcard = pattern.indexOf('*');

            // no wild card at all?
            if (wildcard == -1) {
                exactMatch = pattern;
                return;
            }

            // pattern not begin with a wildcard? We need to pull off the
            // leading section
            if (!pattern.startsWith("*")) {
                firstSection = pattern.substring(0, wildcard);
                section = wildcard + 1;
                // this could be "yada*", so we could be done.
                if (section >= pattern.length()) {
                    return;
                }
            }

            // now parse off the middle sections, making sure to handle the end
            // condition correctly.
            while (section < pattern.length()) {
                // find the next wildcard position
                wildcard = pattern.indexOf('*', section);
                if (wildcard == -1) {
                    // not found, we're at the end of the pattern. We need to
                    // match on the end.
                    lastSection = pattern.substring(section);
                    return;
                }
                // we could have a null section, which we'll just ignore.
                else if (wildcard == section) {
                    // step over the wild card
                    section++;
                } else {
                    // pluck off the next section
                    matchSections.add(pattern.substring(section, wildcard));
                    // step over the wild card character and check if we've
                    // reached the end.
                    section = wildcard + 1;
                }
            }
        }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



