db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: [PATCH] Derby-174
Date Wed, 30 Mar 2005 09:59:24 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Submitted this patch.<br>
<br>
Satheesh<br>
<br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\testing\org\apache\derbyTesting\functionTests\suites\jdbcapi.runall<br>
Transmitting file data .<br>
Committed revision 159474.<br>
<br>
Shreyas Kaushik wrote:
<blockquote cite="mid424A3127.8060800@Sun.com" type="cite">Thanks
Satheesh.
  <br>
  <br>
Please find the patch attached, after adding this test to the
jdbcapi.runall file.
  <br>
  <br>
~ Shreyas
  <br>
  <br>
Satheesh Bandaram wrote:
  <br>
  <br>
  <blockquote type="cite">I have submitted this patch. Thanks for
adding new test case to test
    <br>
both. But the new test is not part of any test suite, so it may not get
    <br>
run even though it is there.&nbsp; Can you add the test case into 'jdbcapi'
    <br>
or 'derbylang' test suites?
    <br>
    <br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; java\engine\org\apache\derby\iapi\types\SQLBlob.java
    <br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\engine\org\apache\derby\iapi\types\SQLTimestamp.java
    <br>
Adding&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\testing\org\apache\derbyTesting\functionTests\master\prepStmtNull.out
    <br>
Adding&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\testing\org\apache\derbyTesting\functionTests\tests\jdbcapi\prepStmtNull.java
    <br>
Transmitting file data ....
    <br>
Committed revision 159445.
    <br>
    <br>
Shreyas Kaushik wrote:
    <br>
    <br>
&nbsp;
    <br>
    <br>
    <blockquote type="cite">Sateesh,
      <br>
      <br>
Did you have a chance to look into this?
      <br>
      <br>
~ Shreyas
      <br>
      <br>
Shreyas Kaushik wrote:
      <br>
      <br>
&nbsp;&nbsp; <br>
      <blockquote type="cite">Attached is the latest patch with the
changes.
        <br>
        <br>
thanks
        <br>
Shreyas
        <br>
        <br>
Satheesh Bandaram wrote:
        <br>
        <br>
&nbsp;&nbsp;&nbsp;&nbsp; <br>
        <blockquote type="cite">I will submit your patches after your
changes.
          <br>
          <br>
Satheesh
          <br>
          <br>
Shreyas Kaushik wrote:
          <br>
          <br>
          <br>
          <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
          <blockquote type="cite">I guess this is an IDE trick , I'll
change this.
            <br>
            <br>
~ Shreyas
            <br>
            <br>
Army wrote:
            <br>
            <br>
            <br>
            <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
            <blockquote type="cite"><a class="moz-txt-link-rfc2396E" href="mailto:Shreyas.Kaushik@sun.com">&lt;Shreyas.Kaushik@sun.com&gt;</a>
wrote
              <br>
              <br>
&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br>
              <blockquote type="cite">-import java.sql.Date;
                <br>
-import java.sql.Time;
                <br>
-import java.sql.Timestamp;
                <br>
-import java.sql.Types;
                <br>
-import java.sql.ResultSet;
                <br>
-import java.sql.SQLException;
                <br>
+import java.sql.*;
                <br>
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br>
              </blockquote>
              <br>
I apologize if this is overly picky, but isn't inclusion of a package
              <br>
via the "*" wildcard generally considered an unfavorable programming
              <br>
practice?&nbsp; I think it's fine to do so when writing tests, but as far
              <br>
as I know, the Derby codeline generally avoids using wildcard
              <br>
imports.&nbsp; And even if there are existing places where such imports
              <br>
are used, it seems to me that _replacing_ existing imports with the
              <br>
wildcard import is probably not a habit to encourage.
              <br>
              <br>
Even if functionally speaking there's no difference, to do this is to
              <br>
introduce a style of imports that's doesn't agree with the rest of
              <br>
the codeline--is that something to avoid?
              <br>
              <br>
'Course, maybe that's just unfounded paranoia on my part...
              <br>
              <br>
*shrug*
              <br>
Army
              <br>
              <br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br>
            </blockquote>
            <br>
&nbsp;
            <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
          </blockquote>
          <br>
          <br>
          <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
        </blockquote>
------------------------------------------------------------------------
        <br>
        <br>
Index: java/engine/org/apache/derby/iapi/types/SQLTimestamp.java
        <br>
===================================================================
        <br>
--- java/engine/org/apache/derby/iapi/types/SQLTimestamp.java&nbsp;&nbsp;
(revision 158017)
        <br>
+++ java/engine/org/apache/derby/iapi/types/SQLTimestamp.java&nbsp;&nbsp;
(working copy)
        <br>
@@ -45,12 +45,15 @@
        <br>
import org.apache.derby.iapi.types.SQLDouble;
        <br>
import org.apache.derby.iapi.types.SQLTime;
        <br>
        <br>
+
        <br>
+
        <br>
import java.sql.Date;
        <br>
import java.sql.Time;
        <br>
import java.sql.Timestamp;
        <br>
import java.sql.Types;
        <br>
import java.sql.ResultSet;
        <br>
import java.sql.SQLException;
        <br>
+import java.sql.PreparedStatement;
        <br>
        <br>
import java.util.Calendar;
        <br>
import java.util.GregorianCalendar;
        <br>
@@ -65,7 +68,7 @@
        <br>
/**
        <br>
* This contains an instance of a SQL Timestamp object.
        <br>
* &lt;p&gt;
        <br>
- * SQLTimestamp is stored in 3 ints - an encoded date, an encoded
        <br>
time and + * SQLTimestamp is stored in 3 ints - an encoded date, an
        <br>
encoded time and
        <br>
*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nanoseconds
        <br>
* encodedDate = 0 indicates a null WSCTimestamp
        <br>
*
        <br>
@@ -989,5 +992,12 @@
        <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; currentCal.setTime(value);
        <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return SQLTime.computeEncodedTime(currentCal);
        <br>
&nbsp;&nbsp; }
        <br>
+
        <br>
+&nbsp;&nbsp;&nbsp; +&nbsp;&nbsp;&nbsp; public void setInto(PreparedStatement
ps, int position)
        <br>
throws SQLException, StandardException {
        <br>
+
        <br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ps.setTimestamp(position, getTimestamp((Calendar)
        <br>
null));
        <br>
+&nbsp;&nbsp;&nbsp;&nbsp; }
        <br>
}
        <br>
        <br>
+
        <br>
        <br>
        <br>
&nbsp;&nbsp;&nbsp;&nbsp; <br>
      </blockquote>
      <br>
&nbsp;&nbsp; <br>
    </blockquote>
    <br>
&nbsp;
    <br>
    <br>
  </blockquote>
  <pre wrap="">
<hr size="4" width="90%">
Index: java/testing/org/apache/derbyTesting/functionTests/suites/jdbcapi.runall
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/suites/jdbcapi.runall	(revision 159463)
+++ java/testing/org/apache/derbyTesting/functionTests/suites/jdbcapi.runall	(working copy)
@@ -13,4 +13,5 @@
 jdbcapi/blobclob4BLOB.java
 jdbcapi/parameterMapping.java
 jdbcapi/setTransactionIsolation.java
+jdbcapi/prepStmtNull.java
 
  </pre>
</blockquote>
</body>
</html>


Mime
View raw message