Latest push
Mark Rotteveel
mark at lawinegevaar.nl
Sat Oct 27 16:45:50 UTC 2018
On 22-10-2018 17:27, Douglas Surber wrote:
> We just pushed updates to ADBA and AoJ.
>
> ADBA changes:
>
> Removed Session.activate and Session.deactivate
> Revised Session.Lifecycle
> Revised Result.Column to be more consistent
>
> AoJ changes:
>
> Updates to conform to ADBA changes
> Implemented all Operations
> Implemented real tests
>
> We have only run the tests with Oracle Database. If you can run on another database let us know what you find.
Some notes (they are bit random in order and importance, just putting
things when I find them):
ADBA:
- The enums in Session.java have a lot of Javadoc syntax errors (eg
using {@link ATTACHED} instead of {@link #ATTACHED}.
AoJ
- README.md has replaced java.sql.DriverManager.getConnection with
java.sql.DriverManager.getSession (probably when renaming the ADBA
connection to session).
- Session.java mentions java.sql.Session instead of java.sql.Connection
- Session.java method jdbcValidate has logging for Session.isValid and
Session.isClosed, which should be Connection as it references the JDBC
connection. Other methods have similar problems (eg
Session.prepareStatement while it references Connection.prepareStatement
- The code seems to favour the new lambda based logging methods where
the 'normal' logging should probably be preferred to avoid creation of
lambdas.
- Both TransactionCompletion.java and TransactionEnd.java contain the
same class (TransactionCompletion), and I'm not sure which is the right
one (they are very similar).
- Javadoc on OperationGroup field `held` references
releaseProhibitingMoreOperations and submitHoldingForMoreOperations
which no longer exist; also the Javadoc syntax for @see is not valid
(should be @see #submit())
- DataSource.registerSession seems to be unused
- MultiOperation class javadoc has reference to method
rowProcessorOperation that does not exist, should that be
rowPublisherOperation instead?
- I notice that with some regularity, raw types, unchecked casts, etc
are used which throws away type safety
- LocalOperation.execute() calls Thread.interrupted() but ignores it,
should it be calling Thread.interrupt() instead or is this intentionally
done to clear the interrupt state?
- Operation ADBATYPE_TO_JDBCTYPE: use an EnumMap
- I see a lot of casts from CompletionStage to CompletableFuture (eg in
MultiOperation) without checks, this suggests that some usages of
CompletionStage should be explicitly replaced with CompletableFuture.
- A lot of fields are protected, while their access should be restricted
to private or package private. In some cases this yields logically
incorrect code (eg ParameterizedOperation is public, but as
ParameterValue is package private, subclass in other packages would not
be able to access the protected field setParameters)
- RowBaseOperation.enquoteIdentifier is never used
- RowPublisherOperation.completeQuery casts a CompletionStage<? extends
T> to T which can't be correct
- Session.sessionPropertyValue seems to be unused
- module-info.java is missing `requires java.logging;`
I haven't migrated the tests yet, maybe tomorrow or otherwise later this
week.
--
Mark Rotteveel
More information about the jdbc-spec-discuss
mailing list