diff --git a/src/main/java/org/ntlab/acanthus_server/resources/gallery/GalleryRest.java b/src/main/java/org/ntlab/acanthus_server/resources/gallery/GalleryRest.java index 064396f..9eebe5a 100644 --- a/src/main/java/org/ntlab/acanthus_server/resources/gallery/GalleryRest.java +++ b/src/main/java/org/ntlab/acanthus_server/resources/gallery/GalleryRest.java @@ -32,7 +32,9 @@ //クエリパラメータがなくても判別可能。 //拡張for文で上記のListに作品を追加。 - if(animationName == null) { + //下記の判定は作品名が送られてきたかどうかを判定。 + //Objects.isNullやStringUtils.isEmptyの方がいいかもしれない。 + if(Objects.equals(animationName,null)) { for (var animation : gallery.getAllAnimation()) animationJsonList.add(new AnimationJson(animation)); } //インスタンスが生成されるとnullではなくなる。要素は0。だからsize()をつかう。