Java Code Examples for jdk.nashorn.internal.runtime.regexp.joni.exception.ErrorMessages#ERR_TOO_MANY_CAPTURE_GROUPS

The following examples show how to use jdk.nashorn.internal.runtime.regexp.joni.exception.ErrorMessages#ERR_TOO_MANY_CAPTURE_GROUPS . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ScanEnvironment.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public int addMemEntry() {
    if (numMem >= Config.MAX_CAPTURE_GROUP_NUM) {
        throw new InternalException(ErrorMessages.ERR_TOO_MANY_CAPTURE_GROUPS);
    }
    if (numMem++ == 0) {
        memNodes = new Node[SCANENV_MEMNODES_SIZE];
    } else if (numMem >= memNodes.length) {
        final Node[]tmp = new Node[memNodes.length << 1];
        System.arraycopy(memNodes, 0, tmp, 0, memNodes.length);
        memNodes = tmp;
    }

    return numMem;
}
 
Example 2
Source File: ScanEnvironment.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public int addMemEntry() {
    if (numMem >= Config.MAX_CAPTURE_GROUP_NUM) {
        throw new InternalException(ErrorMessages.ERR_TOO_MANY_CAPTURE_GROUPS);
    }
    if (numMem++ == 0) {
        memNodes = new Node[SCANENV_MEMNODES_SIZE];
    } else if (numMem >= memNodes.length) {
        final Node[]tmp = new Node[memNodes.length << 1];
        System.arraycopy(memNodes, 0, tmp, 0, memNodes.length);
        memNodes = tmp;
    }

    return numMem;
}
 
Example 3
Source File: ScanEnvironment.java    From jdk8u_nashorn with GNU General Public License v2.0 5 votes vote down vote up
public int addMemEntry() {
    if (numMem >= Config.MAX_CAPTURE_GROUP_NUM) {
        throw new InternalException(ErrorMessages.ERR_TOO_MANY_CAPTURE_GROUPS);
    }
    if (numMem++ == 0) {
        memNodes = new Node[SCANENV_MEMNODES_SIZE];
    } else if (numMem >= memNodes.length) {
        final Node[]tmp = new Node[memNodes.length << 1];
        System.arraycopy(memNodes, 0, tmp, 0, memNodes.length);
        memNodes = tmp;
    }

    return numMem;
}