New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code generator doesn't work in Java 6 build, which calls java.lang.reflect.Method.getParameterCount() #6860

Closed
a-derevyanko opened this Issue Nov 24, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@a-derevyanko

a-derevyanko commented Nov 24, 2017

Expected behavior and actual behavior:

We use pro java 6 version of JOOQ
Generator uses java.lang.reflect.Method#getParameterCount in org.jooq.util.JavaGenerator which available only since Java 1.8.

Now jooq can`t generate classes under jdk 1.7

you could replace the Java8 specific

m.getParameterCount()

with

m.getParameterTypes().length

Steps to reproduce the problem:

Run org.jooq.util.GenerationTool on JDK 1.7

Versions:

  • jOOQ: 3.1.10
  • Java: 1.7
  • Database (include vendor): Oracle
  • JDBC Driver (include name if inofficial driver):
@lukaseder

This comment has been minimized.

Show comment
Hide comment
@lukaseder

lukaseder Nov 24, 2017

Member

Thank you very much for your report. I can confirm that JDK 8 API is used, erroneously. We'll look into why this slipped through our integration tests.

There will be a 3.10.2 release next week. This should definitely be part of it.

Member

lukaseder commented Nov 24, 2017

Thank you very much for your report. I can confirm that JDK 8 API is used, erroneously. We'll look into why this slipped through our integration tests.

There will be a 3.10.2 release next week. This should definitely be part of it.

@lukaseder lukaseder changed the title from Replace Java8 code snippet: java.lang.reflect.Method.getParameterCount() to Java 6 build calls java.lang.reflect.Method.getParameterCount() Nov 28, 2017

@lukaseder lukaseder changed the title from Java 6 build calls java.lang.reflect.Method.getParameterCount() to Code generator doesn't work in Java 6 build, which calls java.lang.reflect.Method.getParameterCount() Nov 28, 2017

lukaseder added a commit that referenced this issue Nov 28, 2017

@lukaseder lukaseder added the R: Fixed label Nov 28, 2017

@lukaseder lukaseder closed this Nov 28, 2017

@lukaseder

This comment has been minimized.

Show comment
Hide comment
@lukaseder

lukaseder Nov 28, 2017

Member

This is now fixed for jOOQ 3.11 on master. The regression was introduced in jOOQ 3.10.0 with 97b3c85. The fix will be backported to 3.10.2 with #6869

Thanks again for reporting this.

Member

lukaseder commented Nov 28, 2017

This is now fixed for jOOQ 3.11 on master. The regression was introduced in jOOQ 3.10.0 with 97b3c85. The fix will be backported to 3.10.2 with #6869

Thanks again for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment