Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8164074

Make CachedRowSetImpl#populate(ResultSet) return a CachedRowSet

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE REQUEST :
      For a while now I've been annoyed when working with CachedRowSets in Java. Simple things such as

      return new CachedRowSetImpl().populate(statement.executeQuery());

      aren't possible, because the method populate is a void and doesn't return anything. If this specific method would return a CachedRowSet, this would be possible


      JUSTIFICATION :
      It just makes our lives easier and saves us some time and code.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      CachedRowSetImpl#populate(ResultSet) should return a CachedRowSet
      ACTUAL -
      CachedRowSetImpl#populate(ResultSet) should return a CachedRowSet

      ---------- BEGIN SOURCE ----------
      CachedRowSet cachedResult = new CachedRowSetImpl().populate(statement.executeQuery());

      return new CachedRowSetImpl().populate(statement.executeQuery());

      ---------- END SOURCE ----------

            lancea Lance Andersen
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: