Skip to content

Commit

Permalink
refactor : background, block, theme Setting이 null일 경우 예외처리 (Fastcampu…
Browse files Browse the repository at this point in the history
  • Loading branch information
miyounlee committed Oct 22, 2023
1 parent 36afeca commit f2a5ad4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public BackgroundSettingResponse(final Long backgroundSettingBlockId, final Stri
}

public static BackgroundSettingResponse from(final BackgroundSetting backgroundSetting) {
if (backgroundSetting == null) {
return null;
}
return BackgroundSettingResponse.builder()
.backgroundSettingBlockId(backgroundSetting.getId())
.solidColor(backgroundSetting.getSolidColor())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public BlockSettingResponse(final Long blockSettingBlockId, final String shape,
}

public static BlockSettingResponse from(final BlockSetting blockSetting) {
if (blockSetting == null) {
return null;
}
return BlockSettingResponse.builder()
.blockSettingBlockId(blockSetting.getId())
.shape(blockSetting.getShape())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public ThemeSettingResponse(final Long themeSettingBlockId, final String theme)
}

public static ThemeSettingResponse from(final ThemeSetting themeSetting) {
if (themeSetting == null) {
return null;
}
return ThemeSettingResponse.builder()
.themeSettingBlockId(themeSetting.getId())
.theme(themeSetting.getTheme())
Expand Down

0 comments on commit f2a5ad4

Please sign in to comment.