Thilo Goetz wrote:
Marshall Schor wrote:
Running Findbugs, etc., will report on throws / catches that are
never used because the code in the try doesn't throw what is being
caught or propagated up.
It might be good to clean these up. Typically, they are not changed,
because that kind of a change in an API breaks user code. I'm
wondering if we could clean these up and have the migration utility
fix the user code?
Opinions?
-Marshall
Can you give examples? I wonder if Findbugs finds more than the
corresponding Eclipse compiler warning?
Actually, it's just Eclipse which picks up these warnings. Here's the
set from yesterday's build of uimaj-core; other projects also have these
warnings:
The declared exception AnalysisEngineProcessException is not actually
thrown by the method newCasProduced(CAS, String) from type CasFlow_ImplBase
The declared exception AnalysisEngineProcessException is not actually
thrown by the method newCasProduced(JCas, String) from type
JCasFlow_ImplBase
The declared exception AnalysisEngineProcessException is not actually
thrown by the method typeSystemInit(TypeSystem) from type
CasAnnotator_ImplBase
The declared exception AnalysisEngineProcessException is not actually
thrown by the method typeSystemInit(TypeSystem) from type
CasFlowController_ImplBase
The declared exception AnalysisEngineProcessException is not actually
thrown by the method typeSystemInit(TypeSystem) from type
CasMultiplier_ImplBase
The declared exception AnnotatorConfigurationException is not actually
thrown by the method typeSystemInit(TypeSystem) from type
UimacppAnalysisComponent
The declared exception AnnotatorInitializationException is not actually
thrown by the method typeSystemInit(TypeSystem) from type
UimacppAnalysisComponent
The declared exception CASException is not actually thrown by the method
_testConversions(CAS) from type XCasToCasDataSaxHandlerTest
The declared exception CASException is not actually thrown by the method
checkSentences() from type SerializationNoMDTest
The declared exception CASException is not actually thrown by the method
checkSentences() from type SerializationNoMDTest
The declared exception CASException is not actually thrown by the method
createSentences() from type SerializationNoMDTest
The declared exception CASException is not actually thrown by the method
createSentences() from type SerializationReinitTest
The declared exception CASException is not actually thrown by the method
generateXML(CAS, FSMatchConstraint) from type CasToInlineXml
The declared exception CASException is not actually thrown by the method
generateXML(CAS, FSMatchConstraint) from type TCasToInlineXml
The declared exception CASException is not actually thrown by the method
initCAS() from type IndexSerializationTest
The declared exception CASException is not actually thrown by the method
initCAS() from type SerializationNoMDTest
The declared exception CASException is not actually thrown by the method
initCAS() from type SerializationReinitTest
The declared exception CASException is not actually thrown by the method
unmarshalCas(CAS, boolean) from type ServiceDataCargo
The declared exception ClassNotFoundException is not actually thrown by
the method parseFactoryConfig() from type UIMAFramework_impl
The declared exception FileNotFoundException is not actually thrown by
the constructor AnalysisEngine_implTest(String)
The declared exception FileNotFoundException is not actually thrown by
the constructor AnnotatorContext_implTest(String)
The declared exception FileNotFoundException is not actually thrown by
the constructor MultiprocessingAnalysisEngine_implTest(String)
The declared exception FileNotFoundException is not actually thrown by
the constructor ResourceService_implTest(String)
The declared exception FileNotFoundException is not actually thrown by
the constructor TextAnalysisEnginePoolTest(String)
The declared exception IllegalAccessException is not actually thrown by
the method parseFactoryConfig() from type UIMAFramework_impl
The declared exception InstantiationException is not actually thrown by
the method parseFactoryConfig() from type UIMAFramework_impl
The declared exception InvalidXMLException is not actually thrown by the
method readPrimitiveValue(Element) from type XMLUtils
The declared exception IOException is not actually thrown by the
constructor FileLanguageResource_implTest(String)
The declared exception IOException is not actually thrown by the
constructor ResourceManager_implTest(String)
The declared exception IOException is not actually thrown by the
constructor XCASDeserializerTest(String)
The declared exception IOException is not actually thrown by the
constructor XCasToCasDataSaxHandlerTest(String)
The declared exception IOException is not actually thrown by the
constructor XmiCasDeserializerTest(String)
The declared exception IOException is not actually thrown by the method
cleanUpDirectoryFiles(File) from type FileUtil
The declared exception IOException is not actually thrown by the method
createDirList(JarFile) from type FileUtil
The declared exception IOException is not actually thrown by the method
createFileList(JarFile) from type FileUtil
The declared exception IOException is not actually thrown by the method
encodeFS(int, IntVector) from type XCASSerializer.XCASDocSerializer
The declared exception IOException is not actually thrown by the method
encodeFS(int) from type XmiCasSerializer.XmiCasDocSerializer
The declared exception IOException is not actually thrown by the method
generateVSDescriptorAsStream(InstallationDescriptor) from type
InstallationProcessor
The declared exception IOException is not actually thrown by the method
printXMLElementValue(String, boolean, PrintWriter, int) from type XMLUtil
The declared exception IOException is not actually thrown by the method
printXMLHeader(String, PrintWriter) from type XMLUtil
The declared exception IOException is not actually thrown by the method
printXMLTag(String, Properties, PrintWriter, boolean, int) from type XMLUtil
The declared exception IOException is not actually thrown by the method
typeSystem2Xml(TypeSystem, OutputStream) from type TypeSystem2Xml
The declared exception ParserConfigurationException is not actually
thrown by the constructor XMLParser_impl()
The declared exception ResourceConfigurationException is not actually
thrown by the method setConfigurationParameters(NameValuePair[])
The declared exception ResourceInitializationException is not actually
thrown by the method initialize() from type CasConsumer_ImplBase
The declared exception ResourceInitializationException is not actually
thrown by the method initialize() from type CasDataCollectionReader_ImplBase
The declared exception ResourceInitializationException is not actually
thrown by the method initialize() from type CasDataConsumer_ImplBase
The declared exception ResourceInitializationException is not actually
thrown by the method initialize() from type CasDataInitializer_ImplBase
The declared exception ResourceInitializationException is not actually
thrown by the method initialize() from type CasInitializer_ImplBase
The declared exception ResourceInitializationException is not actually
thrown by the method initialize() from type CollectionReader_ImplBase
The declared exception ResourceServiceException is not actually thrown
by the method getMetaData() from type ResourceService_impl
The declared exception ResultNotSupportedException is not actually
thrown by the method callAnalysisComponentNext() from type
PrimitiveAnalysisEngine_impl
The declared exception ResultNotSupportedException is not actually
thrown by the method callAnalysisComponentNext() from type
UimacppAnalysisEngineImpl
The declared exception SAXParseException is not actually thrown by the
method handleFeature(FeatureStructureImpl, String, String) from type
XCasToCasDataSaxHandler
The declared exception URISyntaxException is not actually thrown by the
method eenum2UimaType(EEnum, String, Map) from type Ecore2UimaTypeSystem
The declared exception XCASParsingException is not actually thrown by
the method addToOutOfTypeSystemData(String, Attributes) from type
XCASDeserializer.XCASDeserializerHandler
--Thilo
- Re: Should we take this opportunity to clean up unneeded Th... Marshall Schor
-