From 7a101768cca03663933105eda7bb00feffe15727 Mon Sep 17 00:00:00 2001 From: tpylak <tpylak> Date: Thu, 10 Feb 2011 10:04:59 +0000 Subject: [PATCH] minor: fix screening integration tests (bug in toString) SVN: 19865 --- .../api/v1/dto/ImageDatasetMetadata.java | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/v1/dto/ImageDatasetMetadata.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/v1/dto/ImageDatasetMetadata.java index a860f69b73e..7434125fe4b 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/v1/dto/ImageDatasetMetadata.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/v1/dto/ImageDatasetMetadata.java @@ -37,8 +37,8 @@ public class ImageDatasetMetadata implements Serializable private final int thumbnailHeight; public ImageDatasetMetadata(IImageDatasetIdentifier dataset, List<String> channelCodes, - List<String> channelLabels, int tilesRows, int tilesCols, int width, - int height, int thumbnailWidth, int thumbnailHeight) + List<String> channelLabels, int tilesRows, int tilesCols, int width, int height, + int thumbnailWidth, int thumbnailHeight) { this.imageDataset = dataset; this.channelNames = channelCodes; @@ -182,15 +182,11 @@ public class ImageDatasetMetadata implements Serializable @Override public String toString() { - if (hasThumbnails()) - { - return "Dataset " + imageDataset + " has [" + getChannelCodes() + "] channels, " - + tilesNumber + " tiles. Image resolution: " + width + "x" + height; - } else - { - return "Dataset " + imageDataset + " has [" + getChannelCodes() + "] channels, " - + tilesNumber + " tiles. Image resolution: " + width + "x" + height - + ". Thumbnail resolution: " + thumbnailWidth + "x" + thumbnailHeight + "."; - } + String thumbnailsDesc = + hasThumbnails() ? ". Thumbnail resolution: " + thumbnailWidth + "x" + + thumbnailHeight + "." : ""; + return "Dataset " + imageDataset + " has [" + getChannelCodes() + "] channels, " + + tilesNumber + " tiles. Image resolution: " + width + "x" + height + + thumbnailsDesc; } } \ No newline at end of file -- GitLab