Project

General

Profile

Actions

task #7483

open

MobotOpenUrlServiceWrapper throws Exceptions in case of problems

Added by Andreas Kohlbecker almost 6 years ago. Updated almost 6 years ago.

Status:
New
Priority:
New
Assignee:
-
Category:
cdmlib
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Severity:
normal

Description

AM:

In dem Zusammenhang habe ich mir auch mal die Klasse MobotOpenUrlServiceWrapper angeschaut. Dort gibt es 2 potentielle NPEs und außerdem wird beim Errorhandling nur geloggt und die Exception nicht weiter geschmissen. Ist das gewollt oder sollen wir das mal anpassen?

Problems:

 public List<OpenUrlReference> doResolve(MobotOpenUrlQuery query) {

        ...

        SchemaAdapterBase<OpenUrlReference> schemaAdapter = schemaAdapterMap.get(query.schemaShortName);
        if (schemaAdapter == null) {
            logger.error("No SchemaAdapter found for " + query.schemaShortName);
        }

TODO:

  • let the NullPointerException be thrown, since this problem clearly is an implementation problem which should occur so not even the testing stage will be affected. The schemaAdapter should be set in the constructor!
  • The catch clause for the IOException end of this method should be wraped into a `ExternalServiceException,
  • the URISyntaxException should never occur and coud therefore be ignored aot wrapped into a RuntimeException
Actions #1

Updated by Andreas Kohlbecker almost 6 years ago

  • Description updated (diff)
Actions #2

Updated by Andreas Kohlbecker almost 6 years ago

  • Description updated (diff)
  • Assignee deleted (Andreas Kohlbecker)
Actions #3

Updated by Andreas Kohlbecker almost 6 years ago

  • Target version changed from Release 5.1 to Reviewed Next Major Release
Actions #4

Updated by Andreas Müller almost 6 years ago

  • Target version changed from Reviewed Next Major Release to Unassigned CDM tickets

This is not yet reviewed, otherwise it should have an Assignee.

Actions

Also available in: Atom PDF