Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit afa178e

Browse files
committed
On Mon, 3 Sep 2001 22:01:17 -0500, you wrote:
>public boolean isWritable(int column) throws SQLException >{ > if (isReadOnly(column)) > return true; > else > return false; >} The author probably intended: public boolean isWritable(int column) throws SQLException { return !isReadOnly(column); } And if he would have coded it this way he wouldn't have made this mistake :-) >hence, isWritable() will always return false. this is something >of a problem :) Why exactly? In a way, true is just as incorrect as false, and perhaps it should throw "not implemented". But I guess that would be too non-backwardly-compatible. >let me know if i can provide further information. Will you submit a patch? Regards, Ren? Pijlman <rene@lab.applinet.nl>
1 parent e4cfff6 commit afa178e

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/interfaces/jdbc/org/postgresql/jdbc1/ResultSetMetaData.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -419,10 +419,7 @@ public boolean isReadOnly(int column) throws SQLException
419419
*/
420420
public boolean isWritable(int column) throws SQLException
421421
{
422-
if (isReadOnly(column))
423-
return true;
424-
else
425-
return false;
422+
return !isReadOnly(column);
426423
}
427424

428425
/**

src/interfaces/jdbc/org/postgresql/jdbc2/ResultSetMetaData.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -414,10 +414,7 @@ public boolean isReadOnly(int column) throws SQLException
414414
*/
415415
public boolean isWritable(int column) throws SQLException
416416
{
417-
if (isReadOnly(column))
418-
return true;
419-
else
420-
return false;
417+
return !isReadOnly(column);
421418
}
422419

423420
/**

0 commit comments

Comments
 (0)