iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/ir/RepositoryImpl.java
private String scopedName(String id) {
        if (id == null)
            return null;

        if (id.startsWith("IDL:")) {
            // OMG IDL format

            // Check for base types
            if ("IDL:omg.org/CORBA/Object:1.0".equals(id) ||
                    "IDL:omg.org/CORBA/ValueBase:1.0".equals(id))
                return null;

            // Get 2nd component of ID
            int idx2 = id.indexOf(':', 4); // 2nd colon
            if (idx2 == -1)
                return null; // invalid ID, version part missing
            String base = id.substring(4, id.indexOf(':', 4));

            // Check special prefixes
            if (base.startsWith("omg.org"))
                base = "org/omg" + base.substring(7);
            if (base.startsWith("w3c.org"))
                base = "org/w3c" + base.substring(7);

            // convert '/' to "::"
            StringBuffer b = new StringBuffer();
            for (int i = 0; i < base.length(); ++i) {
                char c = base.charAt(i);

                if (c != '/')
                    b.append(c);
                else
                    b.append("::");
            }

            return b.toString();
        } else if (id.startsWith("RMI:")) {
            // RMI hashed format

            // Get 2nd component of ID
            int idx2 = id.indexOf(':', 4); // 2nd colon
            if (idx2 == -1)
                return null; // invalid ID, version part missing
            String base = id.substring(4, id.indexOf(':', 4));

            // convert '.' to "::"
            StringBuffer b = new StringBuffer();
            for (int i = 0; i < base.length(); ++i) {
                char c = base.charAt(i);

                if (c != '.')
                    b.append(c);
                else
                    b.append("::");
            }

            return b.toString();
        } else
            return null;
    }
private String scopedName(String id) {
        if (id == null)
            return null;

        if (id.startsWith("IDL:")) {
            // OMG IDL format

            // Check for base types
            if ("IDL:omg.org/CORBA/Object:1.0".equals(id) ||
                    "IDL:omg.org/CORBA/ValueBase:1.0".equals(id))
                return null;

            // Get 2nd component of ID
            int idx2 = id.indexOf(':', 4); // 2nd colon
            if (idx2 == -1)
                return null; // invalid ID, version part missing
            String base = id.substring(4, id.indexOf(':', 4));

            // Check special prefixes
            if (base.startsWith("omg.org"))
                base = "org/omg" + base.substring(7);
            if (base.startsWith("w3c.org"))
                base = "org/w3c" + base.substring(7);

            // convert '/' to "::"
            StringBuffer b = new StringBuffer();
            for (int i = 0; i < base.length(); ++i) {
                char c = base.charAt(i);

                if (c != '/')
                    b.append(c);
                else
                    b.append("::");
            }

            return b.toString();
        } else if (id.startsWith("RMI:")) {
            // RMI hashed format

            // Get 2nd component of ID
            int idx2 = id.indexOf(':', 4); // 2nd colon
            if (idx2 == -1)
                return null; // invalid ID, version part missing
            String base = id.substring(4, id.indexOf(':', 4));

            // convert '.' to "::"
            StringBuffer b = new StringBuffer();
            for (int i = 0; i < base.length(); ++i) {
                char c = base.charAt(i);

                if (c != '.')
                    b.append(c);
                else
                    b.append("::");
            }

            return b.toString();
        } else
            return null;
    }
private String scopedName ( String id ) { if ( id == null ) return null ; if ( id . startsWith ( "IDL:" ) ) { // OMG IDL format // Check for base types if ( "IDL:omg.org/CORBA/Object:1.0" . equals ( id ) || "IDL:omg.org/CORBA/ValueBase:1.0" . equals ( id ) ) return null ; // Get 2nd component of ID int idx2 = id . indexOf ( ' ' , 4 ) ; // 2nd colon if ( idx2 == - 1 ) return null ; // invalid ID, version part missing String base = id . substring ( 4 , id . indexOf ( ' ' , 4 ) ) ; // Check special prefixes if ( base . startsWith ( "omg.org" ) ) base = "org/omg" + base . substring ( 7 ) ; if ( base . startsWith ( "w3c.org" ) ) base = "org/w3c" + base . substring ( 7 ) ; // convert '/' to "::" StringBuffer b = new StringBuffer ( ) ; for ( int i = 0 ; i < base . length ( ) ; ++ i ) { char c = base . charAt ( i ) ; if ( c != ' ' ) b . append ( c ) ; else b . append ( "::" ) ; } return b . toString ( ) ; } else if ( id . startsWith ( "RMI:" ) ) { // RMI hashed format // Get 2nd component of ID int idx2 = id . indexOf ( ' ' , 4 ) ; // 2nd colon if ( idx2 == - 1 ) return null ; // invalid ID, version part missing String base = id . substring ( 4 , id . indexOf ( ' ' , 4 ) ) ; // convert '.' to "::" StringBuffer b = new StringBuffer ( ) ; for ( int i = 0 ; i < base . length ( ) ; ++ i ) { char c = base . charAt ( i ) ; if ( c != ' ' ) b . append ( c ) ; else b . append ( "::" ) ; } return b . toString ( ) ; } else return null ; }
Convert a repository ID to an IDL scoped name.
Returns <code>null</code> if the ID cannot be understood.
Convert a repository ID to an IDL scoped name . Returns <code > null< / code > if the ID cannot be understood .