I am try to get the values from the results of a stored procedure using SimpleJdbcCall.
SimpleJdbcCall simpleJdbcCall = new SimpleJdbcCall(dataSource)
.withProcedureName("getCryptData");
SqlParameterSource in = new MapSqlParameterSource()
.addValue("KCode", "")
.addValue("tbl","comp")
.addValue("CompId",tenant.toUpperCase());
Map<String, Object> out = simpleJdbcCall.execute(in);
String username = out.get;
//Get DB Settings
ArrayList result = (ArrayList) out.get("#result-set-1");
Map source = (Map) result.get(0);
Although the below code works, I'm concerned about whether this is safe.
//Get DB Settings
ArrayList result = (ArrayList) out.get("#result-set-1");
Map source = (Map) result.get(0);
I get this warning message.
Raw use of parameterized class
I want to know if this is ok for real-life production and any suggestions as to how I should change this will be appreciated.
While you can still continue to use your code in production, it should be avoided.
They usually require casts and they aren't type safe. They are also less expressive, and they don't provide self-documentation in the same way as parameterized types
When Generics was introduced in JDK 1.5, raw types were retained only to maintain backwards compatibility with older Java versions.
Thanks, Robin