db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5541) Remove unnecessary field rwsOK in DirStorageFactory4
Date Thu, 15 Dec 2011 12:54:30 GMT

     [ https://issues.apache.org/jira/browse/DERBY-5541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen updated DERBY-5541:
--------------------------------------

    Attachment: d5541.diff

The attached patch removes the field rwsOK from DirStorageFactory4 and all uses of it. There
is also an rwsOK field in DirFile4, which gets its value from DirStorageFactory4.rwsOK, so
that field is removed too.

The only uses of these fields are:

1) A condition in DirFile4.getRandomAccessFile(), which always evaluates to false on the currently
supported platforms, and the whole if statement is therefore removed.

2) Its value is returned by DirStorageFactory4.supportsWriteSync(). Now it returns true unconditionally.

All the regression tests ran cleanly with the patch.
                
> Remove unnecessary field rwsOK in DirStorageFactory4
> ----------------------------------------------------
>
>                 Key: DERBY-5541
>                 URL: https://issues.apache.org/jira/browse/DERBY-5541
>             Project: Derby
>          Issue Type: Improvement
>          Components: Store
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d5541.diff
>
>
> DirStorageFactory4 has a field called rwsOK defined like this:
>     private static final boolean    rwsOK = JVMInfo.JDK_ID >= JVMInfo.J2SE_142;
> The only supported platform whose JVMInfo.JDK_ID is less than JVMInfo.J2SE_142, is FP/CDC.
But DirStorageFactory4 is not used on FP/CDC because it depends on NIO. This means that the
field will always have the value true, and it can be eliminated.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message