Ignore:
Timestamp:
08/18/14 09:50:16 (10 years ago)
Author:
olhsha@mpi.nl
Message:

Unit test for getting profiles and components from groups. A little bug is fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/rest/ComponentRegistryRestService.java

    r5553 r5556  
    200200            return new ArrayList<ComponentDescription>();
    201201
     202       
     203       
     204        } catch (ItemNotFoundException e) {
     205            response.sendError(Status.NOT_FOUND.getStatusCode(), e.toString());
     206            return new ArrayList<ComponentDescription>();
    202207        }
    203208
     
    235240        } catch (UserUnauthorizedException e) {
    236241            response.sendError(Status.FORBIDDEN.getStatusCode(), e.toString());
     242            return new ArrayList<ProfileDescription>();
     243       
     244       
     245        } catch (ItemNotFoundException e) {
     246            response.sendError(Status.NOT_FOUND.getStatusCode(), e.toString());
    237247            return new ArrayList<ProfileDescription>();
    238248        }
     
    15581568            return new Rss();
    15591569        }
     1570        catch (ItemNotFoundException e) {
     1571            response.sendError(Status.NOT_FOUND.getStatusCode(), e.toString());
     1572            return new Rss();
     1573        }
    15601574        // obsolete, add group Id
    15611575        final RssCreatorDescriptions instance = new RssCreatorDescriptions(!registrySpace.equalsIgnoreCase("published"), getApplicationBaseURI(), "components",
     
    15961610        } catch (UserUnauthorizedException e) {
    15971611            response.sendError(Status.FORBIDDEN.getStatusCode(), e.toString());
     1612            return new Rss();
     1613       
     1614        } catch (ItemNotFoundException e) {
     1615            response.sendError(Status.NOT_FOUND.getStatusCode(), e.toString());
    15981616            return new Rss();
    15991617        }
Note: See TracChangeset for help on using the changeset viewer.