iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/ContainerAnalysis.java
protected void analyzeConstants()
            throws RMIIIOPViolationException {

        ArrayList a = new ArrayList();

        for (int i = 0; i < fields.length; ++i) {
            if ((f_flags[i] & F_CONSTANT) == 0)
                continue;

            Class type = fields[i].getType();

            // Only map primitives and java.lang.String
            if (!type.isPrimitive() && type != java.lang.String.class) {
                // It is an RMI/IIOP violation for interfaces.
                if (cls.isInterface())
                    throw IIOPLogger.ROOT_LOGGER.badRMIIIOPConstantType(fields[i].getName(), cls.getName(), "1.2.3");
                continue;
            }

            String name = fields[i].getName();

            Object value;
            try {
                value = fields[i].get(null);
            } catch (Exception ex) {
                throw new RuntimeException(ex.toString());
            }

            a.add(new ConstantAnalysis(name, type, value));
        }

        constants = new ConstantAnalysis[a.size()];
        constants = (ConstantAnalysis[]) a.toArray(constants);
    }
protected void analyzeConstants()
            throws RMIIIOPViolationException {

        ArrayList a = new ArrayList();

        for (int i = 0; i < fields.length; ++i) {
            if ((f_flags[i] & F_CONSTANT) == 0)
                continue;

            Class type = fields[i].getType();

            // Only map primitives and java.lang.String
            if (!type.isPrimitive() && type != java.lang.String.class) {
                // It is an RMI/IIOP violation for interfaces.
                if (cls.isInterface())
                    throw IIOPLogger.ROOT_LOGGER.badRMIIIOPConstantType(fields[i].getName(), cls.getName(), "1.2.3");
                continue;
            }

            String name = fields[i].getName();

            Object value;
            try {
                value = fields[i].get(null);
            } catch (Exception ex) {
                throw new RuntimeException(ex.toString());
            }

            a.add(new ConstantAnalysis(name, type, value));
        }

        constants = new ConstantAnalysis[a.size()];
        constants = (ConstantAnalysis[]) a.toArray(constants);
    }
Analyse constants.
This will fill in the <code>constants</code> array.