fop-core/src/main/java/org/apache/fop/complexscripts/fonts/GlyphPositioningTable.java [1650:1707]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        private void populate(List entries) {
            if (entries == null) {
                throw new AdvancedTypographicTableFormatException("illegal entries, must be non-null");
            } else if (entries.size() != 5) {
                throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 5 entries");
            } else {
                Object o;
                if (((o = entries.get(0)) == null) || !(o instanceof GlyphClassTable)) {
                    throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an GlyphClassTable, but is: " + ((o != null) ? o.getClass() : null));
                } else {
                    icdt = (GlyphClassTable) o;
                }
                if (((o = entries.get(1)) != null) && !(o instanceof GlyphClassTable)) {
                    throw new AdvancedTypographicTableFormatException("illegal entries, second entry must be an GlyphClassTable, but is: " + o.getClass());
                } else {
                    bcdt = (GlyphClassTable) o;
                }
                if (((o = entries.get(2)) != null) && !(o instanceof GlyphClassTable)) {
                    throw new AdvancedTypographicTableFormatException("illegal entries, third entry must be an GlyphClassTable, but is: " + o.getClass());
                } else {
                    lcdt = (GlyphClassTable) o;
                }
                if (((o = entries.get(3)) == null) || !(o instanceof Integer)) {
                    throw new AdvancedTypographicTableFormatException("illegal entries, fourth entry must be an Integer, but is: " + ((o != null) ? o.getClass() : null));
                } else {
                    ngc = (Integer) (o);
                }
                if (((o = entries.get(4)) == null) || !(o instanceof RuleSet[])) {
                    throw new AdvancedTypographicTableFormatException("illegal entries, fifth entry must be an RuleSet[], but is: " + ((o != null) ? o.getClass() : null));
                } else {
                    rsa = (RuleSet[]) o;
                    if (rsa.length != ngc) {
                        throw new AdvancedTypographicTableFormatException("illegal entries, RuleSet[] length is " + rsa.length + ", but expected " + ngc + " glyph classes");
                    }
                }
            }
        }
    }

    private static class ChainedContextualSubtableFormat3 extends ChainedContextualSubtable {
        private RuleSet[] rsa;                          // rule set array, containing a single rule set
        ChainedContextualSubtableFormat3(String id, int sequence, int flags, int format, GlyphCoverageTable coverage, List entries) {
            super(id, sequence, flags, format, coverage, entries);
            populate(entries);
        }
        /** {@inheritDoc} */
        public List getEntries() {
            if (rsa != null) {
                List entries = new ArrayList(1);
                entries.add(rsa);
                return entries;
            } else {
                return null;
            }
        }
        /** {@inheritDoc} */
        public void resolveLookupReferences(Map<String, LookupTable> lookupTables) {
            GlyphTable.resolveLookupReferences(rsa, lookupTables);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



fop-core/src/main/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionTable.java [1179:1236]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        private void populate(List entries) {
            if (entries == null) {
                throw new AdvancedTypographicTableFormatException("illegal entries, must be non-null");
            } else if (entries.size() != 5) {
                throw new AdvancedTypographicTableFormatException("illegal entries, " + entries.size() + " entries present, but requires 5 entries");
            } else {
                Object o;
                if (((o = entries.get(0)) == null) || !(o instanceof GlyphClassTable)) {
                    throw new AdvancedTypographicTableFormatException("illegal entries, first entry must be an GlyphClassTable, but is: " + ((o != null) ? o.getClass() : null));
                } else {
                    icdt = (GlyphClassTable) o;
                }
                if (((o = entries.get(1)) != null) && !(o instanceof GlyphClassTable)) {
                    throw new AdvancedTypographicTableFormatException("illegal entries, second entry must be an GlyphClassTable, but is: " + o.getClass());
                } else {
                    bcdt = (GlyphClassTable) o;
                }
                if (((o = entries.get(2)) != null) && !(o instanceof GlyphClassTable)) {
                    throw new AdvancedTypographicTableFormatException("illegal entries, third entry must be an GlyphClassTable, but is: " + o.getClass());
                } else {
                    lcdt = (GlyphClassTable) o;
                }
                if (((o = entries.get(3)) == null) || !(o instanceof Integer)) {
                    throw new AdvancedTypographicTableFormatException("illegal entries, fourth entry must be an Integer, but is: " + ((o != null) ? o.getClass() : null));
                } else {
                    ngc = (Integer) (o);
                }
                if (((o = entries.get(4)) == null) || !(o instanceof RuleSet[])) {
                    throw new AdvancedTypographicTableFormatException("illegal entries, fifth entry must be an RuleSet[], but is: " + ((o != null) ? o.getClass() : null));
                } else {
                    rsa = (RuleSet[]) o;
                    if (rsa.length != ngc) {
                        throw new AdvancedTypographicTableFormatException("illegal entries, RuleSet[] length is " + rsa.length + ", but expected " + ngc + " glyph classes");
                    }
                }
            }
        }
    }

    private static class ChainedContextualSubtableFormat3 extends ChainedContextualSubtable {
        private RuleSet[] rsa;                          // rule set array, containing a single rule set
        ChainedContextualSubtableFormat3(String id, int sequence, int flags, int format, GlyphCoverageTable coverage, List entries) {
            super(id, sequence, flags, format, coverage, entries);
            populate(entries);
        }
        /** {@inheritDoc} */
        public List getEntries() {
            if (rsa != null) {
                List entries = new ArrayList(1);
                entries.add(rsa);
                return entries;
            } else {
                return null;
            }
        }
        /** {@inheritDoc} */
        public void resolveLookupReferences(Map<String, LookupTable> lookupTables) {
            GlyphTable.resolveLookupReferences(rsa, lookupTables);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



