@Test public void createConnectionSpecWithNullValues() { ApplicationProperties connectionSpec = (ApplicationProperties) factory .createConnectionSpec(new Credentials()); assertThat(connectionSpec.getUser()).isNull(); assertThat(connectionSpec.getPassword()).isNull(); assertThat(connectionSpec.getLanguage()).isNull(); assertThat(connectionSpec.getClient()).isNull(); assertThat(connectionSpec.getAliasUser()).isNull(); assertThat(connectionSpec.getSsoTicket()).isNull(); assertThat(connectionSpec.getX509Certificate()).isNull(); }
public ConnectionSpec createConnectionSpec(Credentials credentials) { try { Object[] arguments = { credentials.getUser(), credentials.getPassword() }; Class<?>[] parameterTypes = new Class<?>[arguments.length]; Arrays.fill(parameterTypes, String.class); Class<?> connSpecClass = getConnectionSpecClass(CONNECTION_SPEC_IMPL_CLASS_NAME); return newConnectionSpecInstance(connSpecClass, parameterTypes, arguments); } catch (IllegalArgumentException | ClassNotFoundException e) { throw new InternalHiberSapException(e.getMessage(), e); } }
CuckooJcaAdapterConnectionSpecFactory extends AbstractConnectionSpecFactory { public ConnectionSpec createConnectionSpec(Credentials credentials) { try { Object[] arguments = { credentials.getUser(), credentials.getPassword() }; Class<?>[] parameterTypes = new Class<?>[arguments.length]; Arrays.fill(parameterTypes, String.class); Class<?> connSpecClass = getConnectionSpecClass(CONNECTION_SPEC_IMPL_CLASS_NAME); return newConnectionSpecInstance(connSpecClass, parameterTypes, arguments); } catch (IllegalArgumentException | ClassNotFoundException e) { throw new InternalHiberSapException(e.getMessage(), e); } } }
CuckooJcaAdapterConnectionSpecFactory extends AbstractConnectionSpecFactory { public ConnectionSpec createConnectionSpec(Credentials credentials) { try { Object[] arguments = { credentials.getUser(), credentials.getPassword() }; Class<?>[] parameterTypes = new Class<?>[arguments.length]; Arrays.fill(parameterTypes, String.class); Class<?> connSpecClass = getConnectionSpecClass(CONNECTION_SPEC_IMPL_CLASS_NAME); return newConnectionSpecInstance(connSpecClass, parameterTypes, arguments); } catch (IllegalArgumentException | ClassNotFoundException e) { throw new InternalHiberSapException(e.getMessage(), e); } }  }
CuckooJcaAdapterConnectionSpecFactory extends AbstractConnectionSpecFactory { public ConnectionSpec createConnectionSpec(Credentials credentials) { try { Object[] arguments = { credentials.getUser(), credentials.getPassword() }; Class<?>[] parameterTypes = new Class<?>[arguments.length]; Arrays.fill(parameterTypes, String.class); Class<?> connSpecClass = getConnectionSpecClass(CONNECTION_SPEC_IMPL_CLASS_NAME); return newConnectionSpecInstance(connSpecClass, parameterTypes, arguments); } catch (IllegalArgumentException | ClassNotFoundException e) { throw new InternalHiberSapException(e.getMessage(), e); } }  ConnectionSpec createConnectionSpec(Credentials credentials); }
CuckooJcaAdapterConnectionSpecFactory extends AbstractConnectionSpecFactory { public ConnectionSpec createConnectionSpec(Credentials credentials) { try { Object[] arguments = { credentials.getUser(), credentials.getPassword() }; Class<?>[] parameterTypes = new Class<?>[arguments.length]; Arrays.fill(parameterTypes, String.class); Class<?> connSpecClass = getConnectionSpecClass(CONNECTION_SPEC_IMPL_CLASS_NAME); return newConnectionSpecInstance(connSpecClass, parameterTypes, arguments); } catch (IllegalArgumentException | ClassNotFoundException e) { throw new InternalHiberSapException(e.getMessage(), e); } }  ConnectionSpec createConnectionSpec(Credentials credentials);  }