mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 00:58:24 +00:00
508 : sonar qube critical issue fixes (#852)
* 508 : sonar qube critical issue fixes
* 508 : Sunar Qube Fixes
Define a constant instead of duplicating this literal "user_accounts" 4 times.
Define a constant instead of duplicating this literal "userID" 5 times
Define a constant instead of duplicating this literal "additionalInfo" 4 times.
Define a constant instead of duplicating this literal "userName" 4 times.
* 508 : Sunar Qube Fixes
Define a constant instead of duplicating this literal "user_accounts" 4 times.
* 508 : Sonar Qube Fixes
Define a constant instead of duplicating this literal "eEvans" 4 times
Define a constant instead of duplicating this literal "jBloch" 6 times
Define a constant instead of duplicating this literal "mFowler" 3 times
* 508 : Sonar Qube FIxes
Define a constant instead of duplicating this literal "username" 3 times.
* 508: sonar qube issue fixes
Define a constant instead of duplicating this literal "customerDao.getAllCustomers(): " 4 times.
* 508 : sonar qube issue fixes
Define a constant instead of duplicating this literal "App.main(), student : " 4 times.
* 508 : sonar Qube issue fixes
Define a constant instead of duplicating this literal "{} hits {}. {} is damaged!" 3 times.
Define a constant instead of duplicating this literal "{} hits {}." 4 times.
* 508 : Define a constant instead of duplicating this literal "{} hits {}." 4 times.
* 508 : checkstyle fixes
* 508: checkstyle fixes
* 508: checkstyle fixes
* 508: checkstyle fixes
* 508: checkstyle fixes
* 508: checkstyle fixes
* 508: cqrs checkstyle fixes
This commit is contained in:
committed by
Ilkka Seppälä
parent
17bfc91f45
commit
c6ecf58687
@@ -25,16 +25,15 @@ package com.iluwatar.abstractdocument.domain;
|
||||
import java.util.Optional;
|
||||
|
||||
import com.iluwatar.abstractdocument.Document;
|
||||
import com.iluwatar.abstractdocument.domain.enums.Property;
|
||||
|
||||
/**
|
||||
* HasModel trait for static access to 'model' property
|
||||
*/
|
||||
public interface HasModel extends Document {
|
||||
|
||||
String PROPERTY = "model";
|
||||
|
||||
default Optional<String> getModel() {
|
||||
return Optional.ofNullable((String) get(PROPERTY));
|
||||
return Optional.ofNullable((String) get(Property.MODEL.toString()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user