Update to ADBA (and AoJ)

Douglas Surber douglas.surber at oracle.com
Mon Apr 23 20:45:45 UTC 2018


The latest update to ADBA is mostly changes to the JavaDoc. There are two substantive changes:

 - Add PrimitiveOperation as a super type to Operation
 - Consolidate DynamicMultiOperation and StaticMultiOperation into one type, MultiOperation

The previous update to ADBA added OperationGroup#catchOperation. The methods timeout and onError on a catch Operation are meaningless. One solution would be to define these to throw UnsupportedOperationException. That would be a violation of the strict use of types design guideline. An alternative would be to define a type that does not define these methods and define OperationGroup#catchOperation to return that type. That new type is PrimitiveOperation. The only method it defines is submit. Operation extends PrimitiveOperation. 

PrimitiveOperation is only used as the return type of catchOperation and the super type of Operation. I think it carries its weight as it enables the compiler to catch a category of errors that would be non-trivial to catch in testing, eg expecting timeout and onError to do something. Conceptually it adds almost no weight to the API.

Consolidating DynamicMultiOperation and StaticMultiOperation is obvious in retrospect.

There are a few tweaks here and there.

The corresponding changes are uploaded to AoJ along with a simple bug fix to Connection#jdbcConnect.

Douglas


More information about the jdbc-spec-discuss mailing list