}\r
\r
public static Collection<Feed> getAllFeeds() {\r
- Map<Integer, Feed> map = new HashMap<Integer, Feed>();\r
+ Map<Integer, Feed> map = new HashMap<>();\r
try {\r
DB db = new DB();\r
@SuppressWarnings("resource")\r
}\r
\r
public static List<String> getFilteredFeedUrlList(final String name, final String val) {\r
- List<String> list = new ArrayList<String>();\r
+ List<String> list = new ArrayList<>();\r
String sql = "select SELF_LINK from FEEDS where DELETED = 0";\r
if (name.equals("name")) {\r
sql += " and NAME = ?";\r
this.groupid = jo.optInt("groupid");\r
this.name = jo.getString("name");\r
this.aaf_instance = jo.optString("aaf_instance", "legacy");\r
- if(!(aaf_instance.equalsIgnoreCase("legacy"))){\r
- if (aaf_instance.length() > 255){\r
+ if(!(aaf_instance.equalsIgnoreCase("legacy")) && aaf_instance.length() > 255){\r
throw new InvalidObjectException("aaf_instance field is too long");\r
- }\r
}\r
if (name.length() > 255)\r
throw new InvalidObjectException("name field is too long");\r
throw new InvalidObjectException("password field is too long ("+ fid.getPassword()+")"); //Fortify scan fixes - Privacy Violation\r
this.authorization.getEndpoint_ids().add(fid);\r
}\r
- if (this.authorization.getEndpoint_ids().size() < 1)\r
+ if (this.authorization.getEndpoint_ids().isEmpty())\r
throw new InvalidObjectException("need to specify at least one endpoint_id");\r
endPointIds = jauth.getJSONArray("endpoint_addrs");\r
for (int i = 0; i < endPointIds.length(); i++) {\r