Fix Formatting
This commit is contained in:
@@ -166,23 +166,23 @@ import org.springframework.ldap.odm.tools.SyntaxToJavaClass.ClassInfo;
|
||||
while (currentValues.hasMoreElements()) {
|
||||
String currentValue = (String) currentValues.nextElement();
|
||||
switch (type) {
|
||||
case SUP:
|
||||
// Its a super class
|
||||
String lowerCased = currentValue.toLowerCase();
|
||||
if (!schema.getObjectClass().contains(lowerCased)) {
|
||||
supList.add(lowerCased);
|
||||
}
|
||||
break;
|
||||
case MUST:
|
||||
// Add must attribute
|
||||
schema.addMust(createAttributeSchema(currentValue, schemaContext));
|
||||
break;
|
||||
case MAY:
|
||||
// Add may attribute
|
||||
schema.addMay(createAttributeSchema(currentValue, schemaContext));
|
||||
break;
|
||||
default:
|
||||
// Nothing to do
|
||||
case SUP:
|
||||
// Its a super class
|
||||
String lowerCased = currentValue.toLowerCase();
|
||||
if (!schema.getObjectClass().contains(lowerCased)) {
|
||||
supList.add(lowerCased);
|
||||
}
|
||||
break;
|
||||
case MUST:
|
||||
// Add must attribute
|
||||
schema.addMust(createAttributeSchema(currentValue, schemaContext));
|
||||
break;
|
||||
case MAY:
|
||||
// Add may attribute
|
||||
schema.addMay(createAttributeSchema(currentValue, schemaContext));
|
||||
break;
|
||||
default:
|
||||
// Nothing to do
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,9 +119,9 @@ public final class SchemaToJava {
|
||||
// Command line flags
|
||||
private enum Flag {
|
||||
|
||||
URL("l", "url"), USERNAME("u", "username"), PASSWORD("p", "password"), OBJECTCLASS("o", "objectclasses"), CLASS(
|
||||
"c", "class"), PACKAGE("k",
|
||||
"package"), SYNTAX_MAP("s", "syntaxmap"), OUTPUT_DIR("t", "outputdir"), HELP("h", "help");
|
||||
URL("l", "url"), USERNAME("u", "username"), PASSWORD("p", "password"), OBJECTCLASS("o", "objectclasses"),
|
||||
CLASS("c", "class"), PACKAGE("k", "package"), SYNTAX_MAP("s", "syntaxmap"), OUTPUT_DIR("t", "outputdir"),
|
||||
HELP("h", "help");
|
||||
|
||||
private String shortName;
|
||||
|
||||
|
||||
@@ -66,9 +66,8 @@ public final class SchemaViewer {
|
||||
|
||||
private enum Flag {
|
||||
|
||||
URL("l", "url"), USERNAME("u", "username"), PASSWORD("p", "password"), OBJECTCLASS("o",
|
||||
"objectclass"), ATTRIBUTE("a",
|
||||
"attribute"), SYNTAX("s", "syntax"), HELP("h", "help"), ERROR("e", "error");
|
||||
URL("l", "url"), USERNAME("u", "username"), PASSWORD("p", "password"), OBJECTCLASS("o", "objectclass"),
|
||||
ATTRIBUTE("a", "attribute"), SYNTAX("s", "syntax"), HELP("h", "help"), ERROR("e", "error");
|
||||
|
||||
private String shortName;
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ public class ConverterFactoryTests {
|
||||
new ExecuteRunnable<ConverterTestData>().runTests(new RunnableTests<ConverterTestData>() {
|
||||
public void runTest(ConverterTestData testData) {
|
||||
assertThat(testData.canConvert)
|
||||
.isEqualTo(converterManager.canConvert(testData.fromClass, testData.syntax, testData.toClass));
|
||||
.isEqualTo(converterManager.canConvert(testData.fromClass, testData.syntax, testData.toClass));
|
||||
}
|
||||
}, this.converterTestData);
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public final class ConverterManagerTests {
|
||||
new ExecuteRunnable<ConverterTestData<?>>().runTests(new RunnableTests<ConverterTestData<?>>() {
|
||||
public void runTest(ConverterTestData<?> testData) {
|
||||
assertThat(testData.expectedValue).isEqualTo(ConverterManagerTests.this.converterManager
|
||||
.convert(testData.sourceData, "", testData.destClass));
|
||||
.convert(testData.sourceData, "", testData.destClass));
|
||||
}
|
||||
}, primitiveTypeTests);
|
||||
}
|
||||
@@ -134,7 +134,7 @@ public final class ConverterManagerTests {
|
||||
new ExecuteRunnable<ConverterTestData<?>>().runTests(new RunnableTests<ConverterTestData<?>>() {
|
||||
public void runTest(ConverterTestData<?> testData) {
|
||||
assertThat(testData.expectedValue).isEqualTo(ConverterManagerTests.this.converterManager
|
||||
.convert(testData.sourceData, testData.syntax, testData.destClass));
|
||||
.convert(testData.sourceData, testData.syntax, testData.destClass));
|
||||
}
|
||||
}, syntaxTests);
|
||||
|
||||
|
||||
@@ -312,7 +312,7 @@ public final class LdapTests {
|
||||
this.searchControls);
|
||||
LOG.debug(String.format("Found - %1$s", allOus));
|
||||
assertThat(new HashSet<OrganizationalUnit>(Arrays.asList(ouTestData)))
|
||||
.isEqualTo(new HashSet<OrganizationalUnit>(allOus));
|
||||
.isEqualTo(new HashSet<OrganizationalUnit>(allOus));
|
||||
|
||||
OrganizationalUnit testOu = ouTestData[OrganizationalName.ASSISTANTS.getIndex()];
|
||||
LOG.debug(String.format("Reading - %1$s", testOu.getDn()));
|
||||
@@ -337,7 +337,7 @@ public final class LdapTests {
|
||||
|
||||
assertThat(9).isEqualTo(allPeople.size());
|
||||
assertThat(CollectionUtils.containsInstance(allPeople, null)).isFalse()
|
||||
.withFailMessage("No nulls should have been returned");
|
||||
.withFailMessage("No nulls should have been returned");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -215,7 +215,7 @@ public final class SchemaToJavaTests {
|
||||
Method telephoneNumberIteratorMethod = clazz.getMethod("getTelephoneNumberIterator");
|
||||
@SuppressWarnings("unchecked")
|
||||
Iterator<Integer> telephoneNumberIterator = (Iterator<Integer>) telephoneNumberIteratorMethod
|
||||
.invoke(fromDirectory);
|
||||
.invoke(fromDirectory);
|
||||
int telephoneNumberCount = 0;
|
||||
while (telephoneNumberIterator.hasNext()) {
|
||||
telephoneNumberCount++;
|
||||
|
||||
@@ -33,7 +33,7 @@ public final class CompilerInterface {
|
||||
StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);
|
||||
|
||||
Iterable<? extends JavaFileObject> javaFileObjects = fileManager
|
||||
.getJavaFileObjectsFromFiles(Arrays.asList(toCompile));
|
||||
.getJavaFileObjectsFromFiles(Arrays.asList(toCompile));
|
||||
compiler.getTask(null, fileManager, null, null, null, javaFileObjects).call();
|
||||
|
||||
fileManager.close();
|
||||
|
||||
Reference in New Issue
Block a user