File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
src/main/java/org/zapodot/junit/ldap Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -192,9 +192,7 @@ private InMemoryDirectoryServerConfig createInMemoryServerConfiguration() {
192192 bindPort ,
193193 null );
194194 inMemoryDirectoryServerConfig .setListenerConfigs (listenerConfig );
195- for (Schema s : customSchema ().asSet ()) {
196- inMemoryDirectoryServerConfig .setSchema (s );
197- }
195+ inMemoryDirectoryServerConfig .setSchema (customSchema ());
198196 return inMemoryDirectoryServerConfig ;
199197 } catch (LDAPException e ) {
200198 throw new IllegalStateException (
@@ -211,7 +209,7 @@ private String[] domainDsnArray() {
211209 }
212210 }
213211
214- private Optional < Schema > customSchema () {
212+ private Schema customSchema () {
215213 final List <File > schemaFiles = schemaFiles ();
216214
217215 try {
@@ -220,9 +218,9 @@ private Optional<Schema> customSchema() {
220218 final Schema customSchema = initialSchema == null
221219 ? Schema .getSchema (schemaFiles )
222220 : Schema .mergeSchemas (initialSchema , Schema .getSchema (schemaFiles ));
223- return Optional . fromNullable ( customSchema ) ;
221+ return customSchema ;
224222 } else {
225- return Optional . absent () ;
223+ return null ;
226224 }
227225
228226 } catch (IOException | LDIFException | LDAPException e ) {
You can’t perform that action at this time.
0 commit comments