import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.opendaylight.mdsal.binding.model.api.Type;
+import org.opendaylight.mdsal.binding.model.util.Types;
import org.opendaylight.yangtools.yang.model.api.type.LengthConstraint;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
final StringBuilder sb = new StringBuilder();
final Collection<String> expressions = createExpressions(constraint);
- sb.append("private static void ").append(lengthCheckerName(member)).append("(final String value) {\n");
+ sb.append("private static void ").append(lengthCheckerName(member))
+ .append("(final ").append(template.importedName(Types.STRING)).append(" value) {\n");
if (!expressions.isEmpty()) {
sb.append(" final int length = value.codePointCount(0, value.length());\n");
CompilationTestUtils.cleanUp(sourcesOutputDir, compiledOutputDir);
}
+ @Test
+ public void testMdsal664() throws Exception {
+ final File sourcesOutputDir = CompilationTestUtils.generatorOutput("mdsal664");
+ final File compiledOutputDir = CompilationTestUtils.compilerOutput("mdsal664");
+ generateTestSources("/compilation/mdsal664", sourcesOutputDir);
+ CompilationTestUtils.testCompilation(sourcesOutputDir, compiledOutputDir);
+ CompilationTestUtils.cleanUp(sourcesOutputDir, compiledOutputDir);
+ }
+
private static void testReturnTypeIdentityref(final Class<?> clazz, final String methodName,
final String returnTypeStr) throws NoSuchMethodException {
Method method = clazz.getMethod(methodName);