Project

General

Profile

task #7483

MobotOpenUrlServiceWrapper throws Exceptions in case of problems

Added by Andreas Kohlbecker 7 months ago. Updated 7 months ago.

Status:
New
Priority:
New
Assignee:
-
Category:
cdmlib
Target version:
Start date:
06/15/2018
Due date:
% Done:

0%

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

History

#1 Updated by Andreas Kohlbecker 7 months ago

  • Description updated (diff)

#2 Updated by Andreas Kohlbecker 7 months ago

  • Description updated (diff)
  • Assignee deleted (Andreas Kohlbecker)

#3 Updated by Andreas Kohlbecker 7 months ago

  • Target version changed from Release 5.1 to Reviewed Next Major Release

#4 Updated by Andreas Müller 7 months ago

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

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

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)