static void setPort1(AFUNIXSocketAddress addr, int port)
            throws AFUNIXSocketException {
        if (port < 0) {
            throw new IllegalArgumentException("port out of range:" + port);
        }

        boolean setOk = false;
        try {
            final Field holderField = InetSocketAddress.class
                    .getDeclaredField("holder");
            if (holderField != null) {
                holderField.setAccessible(true);

                final Object holder = holderField.get(addr);
                if (holder != null) {
                    final Field portField = holder.getClass().getDeclaredField(
                            "port");
                    if (portField != null) {
                        portField.setAccessible(true);
                        portField.set(holder, port);
                        setOk = true;
                    }
                }
            } else {
                setPort(addr, port);
            }
        } catch (final RuntimeException e) {
            throw e;
        } catch (final Exception e) {
            if (e instanceof AFUNIXSocketException) {
                throw (AFUNIXSocketException) e;
            }
            throw new AFUNIXSocketException("Could not set port", e);
        }
        if (!setOk) {
            throw new AFUNIXSocketException("Could not set port");
        }
    }