Why doesn't JdbcConnection implement JDK 7?

79 views
Skip to first unread message

Gili

unread,
Aug 29, 2014, 1:09:50 PM8/29/14
to h2-da...@googlegroups.com
Hi,

Why does JdbcConnection not implement getSchema() and other methods introduced in JDK 7? I see this in the code:

    /**
     * [Not supported]
     */
/*## Java 1.7 ##
    @Override
    public String getSchema() {
        return null;
    }
//*/

Is there a technical reason support can't be added?

Gili

Noel Grandin

unread,
Aug 30, 2014, 1:33:36 AM8/30/14
to h2-da...@googlegroups.com
We do implement the JDK7 methods. The /*### stuff is our build
preprocessor we use to make it easier to switch back and forth between
developing on JDK6 and JDK7.
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to h2-database...@googlegroups.com.
> To post to this group, send email to h2-da...@googlegroups.com.
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.

cowwoc

unread,
Aug 30, 2014, 2:20:40 AM8/30/14
to h2-da...@googlegroups.com
Hi Noel,

I neglected to mention: I am getting "java.lang.AbstractMethodError:
abstract method not implemented" when invoking getSchema() which sounds
like a bug to me. Can you reproduce this on your end using version 1.3.176?

Thanks,
Gili

Thomas Mueller

unread,
Sep 2, 2014, 1:49:34 AM9/2/14
to h2-da...@googlegroups.com
Hi,

The default jar file of H2 is compiled for Java 6, not Java 7. To use the JDBC methods that were added in Java 7, you need to compile H2 using Java 7. But please note that many such new methods are not yet supported (for example getSchema).

Patches for new JDBC features introduced in Java 7 are welcome!

Regards,
Thomas

cowwoc

unread,
Sep 2, 2014, 2:46:47 AM9/2/14
to h2-da...@googlegroups.com
Thomas,

Why don't official releases (found on Maven Central) get compiled using Java 7? Can't Java 6 users run such code? If not, how about releasing multiple packages so we can begin benefiting from these features?

JDK 6's end of life was February 2013. Can't we drop support and move all users to JDK 7? See http://www.oracle.com/technetwork/java/eol-135779.html

Thanks,
Gili
You received this message because you are subscribed to a topic in the Google Groups "H2 Database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/h2-database/d1sFtPY09WI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to h2-database...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages