@@ -47,16 +47,17 @@ abstract class RowsResponse extends CommandResponse
4747 RowsResponse (String text , int statusCode , String contentType , JSONObject json , HasRequiredVersion hasRequiredVersion )
4848 {
4949 super (text , statusCode , contentType , json );
50- fixupParsedData ();
51- caseInsensitizeRowMaps ();
5250 _requiredVersion = hasRequiredVersion .getRequiredVersion ();
51+ fixupParsedData (_requiredVersion );
52+ caseInsensitizeRowMaps ();
5353 }
5454
5555 /**
5656 * Returns the API version number required by the source command. This response returns data in a different format
5757 * depending on the required version
5858 * @return the requested API version number
5959 */
60+ @ Deprecated // Just needed for fixup -- exposing this outside the class seems unnecessary. TODO: Remove this in v6.0.0
6061 public double getRequiredVersion ()
6162 {
6263 return _requiredVersion ;
@@ -83,7 +84,7 @@ public List<Map<String, Object>> getRows()
8384 /**
8485 * Fixes up the parsed data. Currently, this converts string-based date literals into real Java Date objects.
8586 */
86- private void fixupParsedData ()
87+ private void fixupParsedData (double requiredVersion )
8788 {
8889 if (null == getParsedData ())
8990 return ;
@@ -124,7 +125,7 @@ else if ("int".equalsIgnoreCase(type))
124125 // date classes. If this format ever changes, we'll need to change the format string used here.
125126 // CONSIDER: use a library like ConvertUtils to avoid this dependency?
126127 DateParser dateFormat = new DateParser ();
127- boolean expandedFormat = getRequiredVersion () == 9.1 ;
128+ boolean expandedFormat = requiredVersion == 9.1 ;
128129
129130 for (Map <String , Object > row : rows )
130131 {
0 commit comments