mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 06:58:41 +00:00
#631 - Partial Response : Implement Field to json conversion
This commit is contained in:
@@ -48,7 +48,7 @@ public class VideoResource {
|
||||
* @param fields fields to get information about
|
||||
* @return json of specified fields of particular video by id
|
||||
*/
|
||||
public String getDetails(Integer id, String... fields) {
|
||||
public String getDetails(Integer id, String... fields) throws Exception {
|
||||
if (fields.length == 0) {
|
||||
return videos.get(id).toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user