kvm: NotImplemented, with message to signify what is not implemented, using commons-lang version (#3170)

NotImplementedException from sun.reflect.generics.reflectiveObjects is not standard/guarateed by the jvm so a custom implementation is in order.
This commit is contained in:
dahn 2019-03-25 09:28:08 +01:00 committed by Rohit Yadav
parent 462a37d1b4
commit f88de7b863

View File

@ -20,11 +20,10 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import com.cloud.storage.Storage;
import com.cloud.utils.script.OutputInterpreter;
import com.cloud.utils.script.Script;
import org.apache.commons.lang.NotImplementedException;
public class QemuImg {
@ -72,7 +71,7 @@ public class QemuImg {
case FAT:
return PreallocationType.Full;
default:
throw new NotImplementedException();
throw new NotImplementedException(String.format("type %s not defined as member-value of PreallocationType", provisioningType));
}
}
}