You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dag H. Wanvik (JIRA)" <ji...@apache.org> on 2012/09/14 20:38:08 UTC

[jira] [Commented] (DERBY-5886) FILE_CANNOT_REMOVE_FILE exception prints garbage.

    [ https://issues.apache.org/jira/browse/DERBY-5886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13456020#comment-13456020 ] 

Dag H. Wanvik commented on DERBY-5886:
--------------------------------------

Note that File#delete does not throw IOException, it only returns false if a file can't be deleted, so maybe that's why the second argument is (inadvertently?) omitted from the two usages in EncryptData and RFResource.

Java 7 offers the method java.nio.file.Files#delete(path) which does throw IOException and others if the file can't be deleted. http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#delete(java.nio.file.Path), so going forward we may want to use that method so get more precise diagnostics.
                
> FILE_CANNOT_REMOVE_FILE exception prints garbage.
> -------------------------------------------------
>
>                 Key: DERBY-5886
>                 URL: https://issues.apache.org/jira/browse/DERBY-5886
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.10.0.0
>            Reporter: Rick Hillegas
>              Labels: derby_triage10_10
>
> SQLState.FILE_CANNOT_REMOVE_FILE maps to a message which has 2 arguments. This SQLState is used many times. It is variously given 1, 2, or 3 arguments. It's unclear whether we need multiple messages here or whether a single message could be pressed into service for all cases. As it is, some of these invocations are going to generate confusing garbage for the user. This SQLState is used in the following classes:
> java/engine/org/apache/derby/impl/store/raw/data/EncryptData.java
> java/engine/org/apache/derby/impl/store/raw/data/RAFContainer.java
> java/engine/org/apache/derby/impl/store/raw/data/RFResource.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira