From c35c4e829e59e94fd111440baeb684763d839f48 Mon Sep 17 00:00:00 2001 From: nero Date: Thu, 21 Dec 2023 16:16:07 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E3=81=A8?= =?UTF-8?q?=E4=BE=8B=E5=A4=96=E3=81=8C=E8=B5=B7=E3=81=93=E3=81=A3=E3=81=9F?= =?UTF-8?q?=E9=9A=9B=E3=81=AE=E5=87=A6=E7=90=86=E3=82=92=E5=85=A5=E3=82=8C?= =?UTF-8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nem/lacerta/feature/library/DocumentAdapter.java | 10 ++++++++++ .../lacerta/feature/library/LibraryTopFragment.java | 6 ------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/feature/library/src/main/java/one/nem/lacerta/feature/library/DocumentAdapter.java b/feature/library/src/main/java/one/nem/lacerta/feature/library/DocumentAdapter.java index ae187769..c9164fe2 100644 --- a/feature/library/src/main/java/one/nem/lacerta/feature/library/DocumentAdapter.java +++ b/feature/library/src/main/java/one/nem/lacerta/feature/library/DocumentAdapter.java @@ -16,7 +16,12 @@ public class DocumentAdapter extends RecyclerView.Adapter documentMetas; + public DocumentAdapter(List documentMetas) { + // nullの場合に例外を発生させる + if (documentMetas == null) { + throw new IllegalArgumentException("DocumentMetas list cannot be null"); + } this.documentMetas = documentMetas; } @@ -31,6 +36,11 @@ public class DocumentAdapter extends RecyclerView.Adapter documentList = new ArrayList<>(); -// documentList.add("Document A"); -// documentList.add("Document B"); -// documentList.add("Document C"); - // Create and set the adapter DocumentAdapter adapter = new DocumentAdapter(metas); documentRecyclerView.setAdapter(adapter);