About adba DataSource.Builder
Alexander Kjäll
alexander.kjall at gmail.com
Mon Jan 21 20:05:08 UTC 2019
Sounds good to me also and while I was working on that I noticed that
adding the name of the property to the default configureOperation
method simplified debugging significantly.
here is a diff:
diff --git a/src/main/java/jdk/incubator/sql2/SessionProperty.java
b/src/main/java/jdk/incubator/sql2/SessionProperty.java
index f0b2b23..02345fa 100644
--- a/src/main/java/jdk/incubator/sql2/SessionProperty.java
+++ b/src/main/java/jdk/incubator/sql2/SessionProperty.java
@@ -108,7 +108,7 @@ public interface SessionProperty extends Serializable {
return false;
}
else {
- throw new IllegalArgumentException(value.toString() + " is invalid");
+ throw new IllegalArgumentException(value.toString() + " is
invalid for property " + name());
}
}
Den fre 18 jan. 2019 kl 09:44 skrev Mark Rotteveel <mark at lawinegevaar.nl>:
>
> On 18-1-2019 02:59, Douglas Surber wrote:
> > On further thought I think Alex has pointed out an issue that needs to be fixed.
> >
> > One of the guiding principles of the design is to avoid imposing work on the implementation
> > to protect the client from itself. The assumption is that performance is important and that the
> > client accepts the burden of writing correct code in order to gain maximum performance.
> > Requiring the implementation to do a bunch of reflection and copy a structure in order to
> > partially protect against the client modifying a property value does not conform to that principle.
> > Unless you folks say otherwise I am going to change the JavaDoc to say that setProperty
> > captures the value and that changes to the value are erroneous and may result in unexpected
> > behavior.
>
> That sounds like a good plan to me.
>
> Mark
>
> --
> Mark Rotteveel
More information about the jdbc-spec-discuss
mailing list