Des*_*PRG 2 java findbugs exception
我有以下代码和findbugs抱怨" Exception is caught when Exception is not thrown"在狡猾的代码下.我不明白如何解决这个问题.getPMMLExportable抛出一个MLPMMLExportException.
public String exportAsPMML(MLModel model) throws MLPmmlExportException {
Externalizable extModel = model.getModel();
PMMLExportable pmmlExportableModel = null;
try {
pmmlExportableModel = ((PMMLModelContainer) extModel).getPMMLExportable();
} catch (MLPmmlExportException e) {
throw new MLPmmlExportException(e);
}
}
Run Code Online (Sandbox Code Playgroud)