Giter Club home page Giter Club logo

Comments (10)

vladmihalcea avatar vladmihalcea commented on July 26, 2024

Hi,

I am not sure how many are still running on JDK 5 which reached it "end of life" already: http://www.oracle.com/technetwork/java/javase/1-5-137169.html.
Maybe the minimum supported JVM should be updated to 1.6

Vlad

On Tuesday, April 1, 2014 11:40 AM, rankinc [email protected] wrote:

The Activator class contains these lines:
FileReader fileReader = new FileReader(cfgFile);
try { btmProperties.load(fileReader);
}
finally { fileReader.close();
}
Unfortunately, the Properties.load(Reader) API only exists since JDK6. To be compatible with JDK5 (which is your declared target), you need to use a FileInputStream instead of a FileReader.
On the positive side, this does appear to be the only JDK6 issue in the project.
Or you could switch to JDK6, now that JDK8 has been released.

Reply to this email directly or view it on GitHub.

from btm.

lorban avatar lorban commented on July 26, 2024

BTM 2.1.x' target was JDK 1.5 but I think we can reasonably make 3.0.0 require JDK 1.6.

from btm.

rankinc avatar rankinc commented on July 26, 2024

I wouldn't object to that ;-). That would mean that we could also replace constructs such as:

 throw (SQLException) new SQLException("unilateral rollback of " + this).initCause(ex);

with:

throw SQLException("unilateral rollback of " + this, ex);

And that we wouldn't need to use Reflection in order to invoke Connection.isValid().

Not to mention proper use of @OverRide...

from btm.

brettwooldridge avatar brettwooldridge commented on July 26, 2024

You still need reflection because even though Java 6 defines the isValid()
signature, many drivers are only JDBC2/3 compliant (pre-Java 6) and do not
implement the method. So at runtime an exception is thrown when isValid()
is invoked. I forget which, maybe AbstractMethodException or something.
Anyway, we can't get rid of the reflection for probably a long time to
come.

On Tue, Apr 1, 2014 at 2:10 AM, rankinc [email protected] wrote:

I wouldn't object to that ;-). That would mean that we could also replace
constructs such as:

throw (SQLException) new SQLException("unilateral rollback of " + this).initCause(ex);

with:

throw SQLException("unilateral rollback of " + this, ex);

And that we wouldn't need to use Reflection in order to invoke
Connection.isValid().

Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-39184788
.

from btm.

rankinc avatar rankinc commented on July 26, 2024

OK, but the SQLExceptions and @OverRide annotations are fair game... ;-).

from btm.

lorban avatar lorban commented on July 26, 2024

Yes, they are. FYI BTM was designed during the JDK 1.4 era, so quite a fair bit of its architectural design was done with those limitations in mind. Support for JDK 1.5+ constructs were added later on here and there but I don't think we ever did a complete code review to use all the new constructs. If you feel like reviewing them, feel free!

from btm.

rankinc avatar rankinc commented on July 26, 2024

Indeed, I think I saw a "migrate to JDK5 so that we can use Generics" commit somewhere... ;-)

from btm.

rankinc avatar rankinc commented on July 26, 2024

BTW, how did you obtain jdbc-3.0.jar please? That will obviously need updating to jdbc-4.0.jar for Java 6.

from btm.

rankinc avatar rankinc commented on July 26, 2024

It turns out that I don't need a complete jdbc-4.0.jar. All I really need (so far, anyway) is to recreate JDBC 4.0's CommonDataSource, Connection and Driver interfaces, because these are the main API differences between 4.0 and 4.1. Once overlaid on top of JDK7, then JDK7's native JDBC API turns back into 4.0.

This approach is far more likely to comply with BTM's Apache licence than downloading the complete 4.0 API from the Internet ;-).

from btm.

rankinc avatar rankinc commented on July 26, 2024

BTM now requires JDK6.

from btm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.