mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#3245 Remove redundant null checks in nested properties
This commit is contained in:
parent
6d205e5bc4
commit
84c443df9c
@ -7,15 +7,16 @@
|
|||||||
-->
|
-->
|
||||||
<#-- @ftlvariable name="" type="org.mapstruct.ap.internal.model.NestedPropertyMappingMethod" -->
|
<#-- @ftlvariable name="" type="org.mapstruct.ap.internal.model.NestedPropertyMappingMethod" -->
|
||||||
<#lt>private <@includeModel object=returnType.typeBound/> ${name}(<#list parameters as param><@includeModel object=param/><#if param_has_next>, </#if></#list>)<@throws/> {
|
<#lt>private <@includeModel object=returnType.typeBound/> ${name}(<#list parameters as param><@includeModel object=param/><#if param_has_next>, </#if></#list>)<@throws/> {
|
||||||
if ( ${sourceParameter.name} == null ) {
|
|
||||||
return ${returnType.null};
|
|
||||||
}
|
|
||||||
<#list propertyEntries as entry>
|
<#list propertyEntries as entry>
|
||||||
<#if entry.presenceChecker?? >
|
<#if entry.presenceChecker?? >
|
||||||
if ( <#if entry_index != 0>${entry.previousPropertyName} == null || </#if>!<@includeModel object=entry.presenceChecker /> ) {
|
if ( <#if entry_index != 0>${entry.previousPropertyName} == null || </#if>!<@includeModel object=entry.presenceChecker /> ) {
|
||||||
return ${returnType.null};
|
return ${returnType.null};
|
||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if !entry_has_next>
|
||||||
|
return ${entry.previousPropertyName}.${entry.accessorName};
|
||||||
|
</#if>
|
||||||
|
<#if entry_has_next>
|
||||||
<@includeModel object=entry.type.typeBound/> ${entry.name} = ${entry.previousPropertyName}.${entry.accessorName};
|
<@includeModel object=entry.type.typeBound/> ${entry.name} = ${entry.previousPropertyName}.${entry.accessorName};
|
||||||
<#if !entry.presenceChecker?? >
|
<#if !entry.presenceChecker?? >
|
||||||
<#if !entry.type.primitive>
|
<#if !entry.type.primitive>
|
||||||
@ -24,8 +25,6 @@
|
|||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#if !entry_has_next>
|
|
||||||
return ${entry.name};
|
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
}
|
}
|
||||||
|
@ -61,17 +61,10 @@ public class Issue1561MapperImpl implements Issue1561Mapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Stream<String> targetNestedTargetProperties(Target target) {
|
private Stream<String> targetNestedTargetProperties(Target target) {
|
||||||
if ( target == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
NestedTarget nestedTarget = target.getNestedTarget();
|
NestedTarget nestedTarget = target.getNestedTarget();
|
||||||
if ( nestedTarget == null ) {
|
if ( nestedTarget == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Stream<String> properties = nestedTarget.getProperties();
|
return nestedTarget.getProperties();
|
||||||
if ( properties == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return properties;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -168,77 +168,42 @@ public class UserMapperImpl implements UserMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String userDTOContactDataDTOEmail(UserDTO userDTO) {
|
private String userDTOContactDataDTOEmail(UserDTO userDTO) {
|
||||||
if ( userDTO == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
ContactDataDTO contactDataDTO = userDTO.getContactDataDTO();
|
ContactDataDTO contactDataDTO = userDTO.getContactDataDTO();
|
||||||
if ( contactDataDTO == null ) {
|
if ( contactDataDTO == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String email = contactDataDTO.getEmail();
|
return contactDataDTO.getEmail();
|
||||||
if ( email == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return email;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String userDTOContactDataDTOPhone(UserDTO userDTO) {
|
private String userDTOContactDataDTOPhone(UserDTO userDTO) {
|
||||||
if ( userDTO == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
ContactDataDTO contactDataDTO = userDTO.getContactDataDTO();
|
ContactDataDTO contactDataDTO = userDTO.getContactDataDTO();
|
||||||
if ( contactDataDTO == null ) {
|
if ( contactDataDTO == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String phone = contactDataDTO.getPhone();
|
return contactDataDTO.getPhone();
|
||||||
if ( phone == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return phone;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String userDTOContactDataDTOAddress(UserDTO userDTO) {
|
private String userDTOContactDataDTOAddress(UserDTO userDTO) {
|
||||||
if ( userDTO == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
ContactDataDTO contactDataDTO = userDTO.getContactDataDTO();
|
ContactDataDTO contactDataDTO = userDTO.getContactDataDTO();
|
||||||
if ( contactDataDTO == null ) {
|
if ( contactDataDTO == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String address = contactDataDTO.getAddress();
|
return contactDataDTO.getAddress();
|
||||||
if ( address == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return address;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> userDTOContactDataDTOPreferences(UserDTO userDTO) {
|
private List<String> userDTOContactDataDTOPreferences(UserDTO userDTO) {
|
||||||
if ( userDTO == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
ContactDataDTO contactDataDTO = userDTO.getContactDataDTO();
|
ContactDataDTO contactDataDTO = userDTO.getContactDataDTO();
|
||||||
if ( contactDataDTO == null ) {
|
if ( contactDataDTO == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
List<String> preferences = contactDataDTO.getPreferences();
|
return contactDataDTO.getPreferences();
|
||||||
if ( preferences == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return preferences;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String[] userDTOContactDataDTOSettings(UserDTO userDTO) {
|
private String[] userDTOContactDataDTOSettings(UserDTO userDTO) {
|
||||||
if ( userDTO == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
ContactDataDTO contactDataDTO = userDTO.getContactDataDTO();
|
ContactDataDTO contactDataDTO = userDTO.getContactDataDTO();
|
||||||
if ( contactDataDTO == null ) {
|
if ( contactDataDTO == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String[] settings = contactDataDTO.getSettings();
|
return contactDataDTO.getSettings();
|
||||||
if ( settings == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return settings;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,17 +34,10 @@ public class TestMapperImpl implements TestMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String tenantInnerId(TenantDTO tenantDTO) {
|
private String tenantInnerId(TenantDTO tenantDTO) {
|
||||||
if ( tenantDTO == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Inner inner = tenantDTO.getInner();
|
Inner inner = tenantDTO.getInner();
|
||||||
if ( inner == null ) {
|
if ( inner == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String id = inner.getId();
|
return inner.getId();
|
||||||
if ( id == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return id;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,24 +96,14 @@ public class ArtistToChartEntryImpl implements ArtistToChartEntry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String songArtistName(Song song) {
|
private String songArtistName(Song song) {
|
||||||
if ( song == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Artist artist = song.getArtist();
|
Artist artist = song.getArtist();
|
||||||
if ( artist == null ) {
|
if ( artist == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String name = artist.getName();
|
return artist.getName();
|
||||||
if ( name == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String songArtistLabelStudioName(Song song) {
|
private String songArtistLabelStudioName(Song song) {
|
||||||
if ( song == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Artist artist = song.getArtist();
|
Artist artist = song.getArtist();
|
||||||
if ( artist == null ) {
|
if ( artist == null ) {
|
||||||
return null;
|
return null;
|
||||||
@ -126,17 +116,10 @@ public class ArtistToChartEntryImpl implements ArtistToChartEntry {
|
|||||||
if ( studio == null ) {
|
if ( studio == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String name = studio.getName();
|
return studio.getName();
|
||||||
if ( name == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String songArtistLabelStudioCity(Song song) {
|
private String songArtistLabelStudioCity(Song song) {
|
||||||
if ( song == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Artist artist = song.getArtist();
|
Artist artist = song.getArtist();
|
||||||
if ( artist == null ) {
|
if ( artist == null ) {
|
||||||
return null;
|
return null;
|
||||||
@ -149,10 +132,6 @@ public class ArtistToChartEntryImpl implements ArtistToChartEntry {
|
|||||||
if ( studio == null ) {
|
if ( studio == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String city = studio.getCity();
|
return studio.getCity();
|
||||||
if ( city == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return city;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,24 +132,14 @@ public class ChartEntryToArtistImpl extends ChartEntryToArtist {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String chartSongTitle(Chart chart) {
|
private String chartSongTitle(Chart chart) {
|
||||||
if ( chart == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Song song = chart.getSong();
|
Song song = chart.getSong();
|
||||||
if ( song == null ) {
|
if ( song == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String title = song.getTitle();
|
return song.getTitle();
|
||||||
if ( title == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return title;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String chartSongArtistName(Chart chart) {
|
private String chartSongArtistName(Chart chart) {
|
||||||
if ( chart == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Song song = chart.getSong();
|
Song song = chart.getSong();
|
||||||
if ( song == null ) {
|
if ( song == null ) {
|
||||||
return null;
|
return null;
|
||||||
@ -158,17 +148,10 @@ public class ChartEntryToArtistImpl extends ChartEntryToArtist {
|
|||||||
if ( artist == null ) {
|
if ( artist == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String name = artist.getName();
|
return artist.getName();
|
||||||
if ( name == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String chartSongArtistLabelStudioName(Chart chart) {
|
private String chartSongArtistLabelStudioName(Chart chart) {
|
||||||
if ( chart == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Song song = chart.getSong();
|
Song song = chart.getSong();
|
||||||
if ( song == null ) {
|
if ( song == null ) {
|
||||||
return null;
|
return null;
|
||||||
@ -185,17 +168,10 @@ public class ChartEntryToArtistImpl extends ChartEntryToArtist {
|
|||||||
if ( studio == null ) {
|
if ( studio == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String name = studio.getName();
|
return studio.getName();
|
||||||
if ( name == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String chartSongArtistLabelStudioCity(Chart chart) {
|
private String chartSongArtistLabelStudioCity(Chart chart) {
|
||||||
if ( chart == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Song song = chart.getSong();
|
Song song = chart.getSong();
|
||||||
if ( song == null ) {
|
if ( song == null ) {
|
||||||
return null;
|
return null;
|
||||||
@ -212,25 +188,14 @@ public class ChartEntryToArtistImpl extends ChartEntryToArtist {
|
|||||||
if ( studio == null ) {
|
if ( studio == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String city = studio.getCity();
|
return studio.getCity();
|
||||||
if ( city == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return city;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Integer> chartSongPositions(Chart chart) {
|
private List<Integer> chartSongPositions(Chart chart) {
|
||||||
if ( chart == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Song song = chart.getSong();
|
Song song = chart.getSong();
|
||||||
if ( song == null ) {
|
if ( song == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
List<Integer> positions = song.getPositions();
|
return song.getPositions();
|
||||||
if ( positions == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return positions;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -159,18 +159,11 @@ public class FishTankMapperImpl implements FishTankMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Ornament sourceInteriorOrnament(FishTank fishTank) {
|
private Ornament sourceInteriorOrnament(FishTank fishTank) {
|
||||||
if ( fishTank == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Interior interior = fishTank.getInterior();
|
Interior interior = fishTank.getInterior();
|
||||||
if ( interior == null ) {
|
if ( interior == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Ornament ornament = interior.getOrnament();
|
return interior.getOrnament();
|
||||||
if ( ornament == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return ornament;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected OrnamentDto ornamentToOrnamentDto(Ornament ornament) {
|
protected OrnamentDto ornamentToOrnamentDto(Ornament ornament) {
|
||||||
@ -295,18 +288,11 @@ public class FishTankMapperImpl implements FishTankMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String waterQualityReportDtoOrganisationName(WaterQualityReportDto waterQualityReportDto) {
|
private String waterQualityReportDtoOrganisationName(WaterQualityReportDto waterQualityReportDto) {
|
||||||
if ( waterQualityReportDto == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
WaterQualityOrganisationDto organisation = waterQualityReportDto.getOrganisation();
|
WaterQualityOrganisationDto organisation = waterQualityReportDto.getOrganisation();
|
||||||
if ( organisation == null ) {
|
if ( organisation == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String name = organisation.getName();
|
return organisation.getName();
|
||||||
if ( name == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected WaterQualityReport waterQualityReportDtoToWaterQualityReport(WaterQualityReportDto waterQualityReportDto) {
|
protected WaterQualityReport waterQualityReportDtoToWaterQualityReport(WaterQualityReportDto waterQualityReportDto) {
|
||||||
@ -335,18 +321,11 @@ public class FishTankMapperImpl implements FishTankMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private MaterialTypeDto sourceMaterialMaterialType(FishTankDto fishTankDto) {
|
private MaterialTypeDto sourceMaterialMaterialType(FishTankDto fishTankDto) {
|
||||||
if ( fishTankDto == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
MaterialDto material = fishTankDto.getMaterial();
|
MaterialDto material = fishTankDto.getMaterial();
|
||||||
if ( material == null ) {
|
if ( material == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
MaterialTypeDto materialType = material.getMaterialType();
|
return material.getMaterialType();
|
||||||
if ( materialType == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return materialType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected MaterialType materialTypeDtoToMaterialType(MaterialTypeDto materialTypeDto) {
|
protected MaterialType materialTypeDtoToMaterialType(MaterialTypeDto materialTypeDto) {
|
||||||
|
@ -74,24 +74,14 @@ public class ArtistToChartEntryImpl implements ArtistToChartEntry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String songArtistName(Song song) {
|
private String songArtistName(Song song) {
|
||||||
if ( song == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Artist artist = song.getArtist();
|
Artist artist = song.getArtist();
|
||||||
if ( artist == null ) {
|
if ( artist == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String name = artist.getName();
|
return artist.getName();
|
||||||
if ( name == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String songArtistLabelStudioName(Song song) {
|
private String songArtistLabelStudioName(Song song) {
|
||||||
if ( song == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Artist artist = song.getArtist();
|
Artist artist = song.getArtist();
|
||||||
if ( artist == null ) {
|
if ( artist == null ) {
|
||||||
return null;
|
return null;
|
||||||
@ -104,17 +94,10 @@ public class ArtistToChartEntryImpl implements ArtistToChartEntry {
|
|||||||
if ( studio == null ) {
|
if ( studio == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String name = studio.getName();
|
return studio.getName();
|
||||||
if ( name == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String songArtistLabelStudioCity(Song song) {
|
private String songArtistLabelStudioCity(Song song) {
|
||||||
if ( song == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Artist artist = song.getArtist();
|
Artist artist = song.getArtist();
|
||||||
if ( artist == null ) {
|
if ( artist == null ) {
|
||||||
return null;
|
return null;
|
||||||
@ -127,10 +110,6 @@ public class ArtistToChartEntryImpl implements ArtistToChartEntry {
|
|||||||
if ( studio == null ) {
|
if ( studio == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String city = studio.getCity();
|
return studio.getCity();
|
||||||
if ( city == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return city;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -198,24 +198,14 @@ public class ChartEntryToArtistImpl extends ChartEntryToArtist {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String chartSongTitle(Chart chart) {
|
private String chartSongTitle(Chart chart) {
|
||||||
if ( chart == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Song song = chart.getSong();
|
Song song = chart.getSong();
|
||||||
if ( song == null ) {
|
if ( song == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String title = song.getTitle();
|
return song.getTitle();
|
||||||
if ( title == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return title;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String chartSongArtistName(Chart chart) {
|
private String chartSongArtistName(Chart chart) {
|
||||||
if ( chart == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Song song = chart.getSong();
|
Song song = chart.getSong();
|
||||||
if ( song == null ) {
|
if ( song == null ) {
|
||||||
return null;
|
return null;
|
||||||
@ -224,17 +214,10 @@ public class ChartEntryToArtistImpl extends ChartEntryToArtist {
|
|||||||
if ( artist == null ) {
|
if ( artist == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String name = artist.getName();
|
return artist.getName();
|
||||||
if ( name == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String chartSongArtistLabelStudioName(Chart chart) {
|
private String chartSongArtistLabelStudioName(Chart chart) {
|
||||||
if ( chart == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Song song = chart.getSong();
|
Song song = chart.getSong();
|
||||||
if ( song == null ) {
|
if ( song == null ) {
|
||||||
return null;
|
return null;
|
||||||
@ -251,17 +234,10 @@ public class ChartEntryToArtistImpl extends ChartEntryToArtist {
|
|||||||
if ( studio == null ) {
|
if ( studio == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String name = studio.getName();
|
return studio.getName();
|
||||||
if ( name == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String chartSongArtistLabelStudioCity(Chart chart) {
|
private String chartSongArtistLabelStudioCity(Chart chart) {
|
||||||
if ( chart == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Song song = chart.getSong();
|
Song song = chart.getSong();
|
||||||
if ( song == null ) {
|
if ( song == null ) {
|
||||||
return null;
|
return null;
|
||||||
@ -278,25 +254,14 @@ public class ChartEntryToArtistImpl extends ChartEntryToArtist {
|
|||||||
if ( studio == null ) {
|
if ( studio == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String city = studio.getCity();
|
return studio.getCity();
|
||||||
if ( city == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return city;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Integer> chartSongPositions(Chart chart) {
|
private List<Integer> chartSongPositions(Chart chart) {
|
||||||
if ( chart == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Song song = chart.getSong();
|
Song song = chart.getSong();
|
||||||
if ( song == null ) {
|
if ( song == null ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
List<Integer> positions = song.getPositions();
|
return song.getPositions();
|
||||||
if ( positions == null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return positions;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user