public static boolean setProperty(Object target, String name, Object value) {
        try {
            Class<?> clazz = target.getClass();
            if (target instanceof SSLServerSocket) {
                // overcome illegal access issues with internal implementation class
                clazz = SSLServerSocket.class;
            } else if (target instanceof javax.net.ssl.SSLSocket) {
                // overcome illegal access issues with internal implementation class
                clazz = javax.net.ssl.SSLSocket.class;
            }
            Method setter = findSetterMethod(clazz, name);
            if (setter == null) {
                return false;
            }

            // JDK 11: class or setter might not be publicly accessible
            setter.setAccessible(true);

            // If the type is null or it matches the needed type, just use the
            // value directly
            if (value == null || value.getClass() == setter.getParameterTypes()[0]) {
                setter.invoke(target, value);
            } else {
                // We need to convert it
                setter.invoke(target, convert(value, setter.getParameterTypes()[0]));
            }
            return true;
        } catch (Exception e) {
            LOG.error(String.format("Could not set property %s on %s", name, target), e);
            return false;
        }
    }
@Test
    public void testSetPropertyPrimitiveWithWrapperValue() {
        // Wrapper value
        Boolean value = Boolean.TRUE;

        DummyClass dummyClass = new DummyClass(false);
        dummyClass.setTrace(false);

        // dummy field expects a primitive
        IntrospectionSupport.setProperty(dummyClass, "trace", value);

        assertTrue(dummyClass.isTrace());
    }