* <li>if <code>basePackageName</code> equals <code>null</code></li>
* <li>if <code>typeDefinition</code> equals <code>null</code></li>
* </ul>
+ * @deprecated This method ignores typeDefinition argument and its result is only
+ * <code>indingMapping.normalizePackageName(basePackageName)</code>.
+ * Aside from tests, there is not a single user in OpenDaylight codebase,
+ * hence it can be considered buggy and defunct. It is scheduled for removal
+ * in Boron release.
*/
+ @Deprecated
public static String packageNameForTypeDefinition(final String basePackageName,
final TypeDefinition<?> typeDefinition) {
if (basePackageName == null) {
throw new IllegalArgumentException("Type Definition reference cannot be NULL!");
}
- final StringBuilder builder = new StringBuilder();
- builder.append(basePackageName);
- return BindingMapping.normalizePackageName(builder.toString());
+ return BindingMapping.normalizePackageName(basePackageName);
}
/**
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-
import com.google.common.base.Optional;
import java.io.File;
import java.io.IOException;
@Rule
public ExpectedException expectedEx = ExpectedException.none();
- private static List<File> loadTestResources(String testFile) {
+ private static List<File> loadTestResources(final String testFile) {
final List<File> testModels = new ArrayList<File>();
File listModelFile;
try {
* </ul>
*/
@Test
+ @Deprecated
public void testPackageNameForTypeDefinitionNullBasePackageName() {
expectedEx.expect(IllegalArgumentException.class);
expectedEx.expectMessage("Base Package Name cannot be NULL!");
* </ul>
*/
@Test
+ @Deprecated
public void testPackageNameForTypeDefinitionNullTypeDefinition() {
expectedEx.expect(IllegalArgumentException.class);
expectedEx.expectMessage("Type Definition reference cannot be NULL!");