Object value = null;
Object value;
    public void register( String name, String oid )    {        if ( ! Character.isDigit( oid.charAt( 0 ) ) )        {            throw new RuntimeException( "Swap the parameter order: the oid " +                "does not start with a digit!" );        }        /*         * Add the entry for the given name as is and its lowercased version if         * the lower cased name is different from the given name name.           */        String lowerCase = name.toLowerCase();        if ( ! lowerCase.equals( name ) )        {            byName.put( lowerCase, oid );        }                // Put both the name and the oid as names        byName.put( name, oid );        byName.put( oid, oid );                /*         * Update OID Map         *          * 1). Check if we already have a value[s] stored         *      1a). Value is a single value and is a String         *          Replace value with list containing old and new values         *      1b). More than one value stored in a list         *          Add new value to the list         * 2). If we do not have a value then we just add it as a String         */        Object value = null;        if ( ! byOid.containsKey( oid ) )        {            value = name;        }        else         {            ArrayList list = null;            value = byOid.get( oid );                        if ( value instanceof String )            {                String existingName = ( String ) value;                                // if the existing name is already there we don't readd it                if ( existingName.equalsIgnoreCase( name ) )                {                    return;                }                                list = new ArrayList();                list.add( value );                value = list;            }            else if ( value instanceof ArrayList )            {                list = ( ArrayList ) value;                                for ( int ii = 0; ii < list.size(); ii++ )                {                    // One form or another of the name already exists in list                    if ( ! name.equalsIgnoreCase( ( String ) list.get( ii ) ) )                    {                        return;                    }                }                                list.add( name );            }        }        byOid.put( oid, value );        monitor.registered( name, oid );    }