jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • castor
  • CASTOR-644

unable to create a file called Con.java on Windows

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 0.9.5.2, 1.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5
  • Fix Version/s: 1.1 M1
  • Component/s: XML code generator
  • Labels:
    None
  • Environment:
    Operating System: Windows 2000
    Platform: PC
  • Bugzilla Id:
    1505

Description

By chance, I have a schema which results in SourceGenerator trying to create a
file called Con.java. This does not work on Windows, I assume because it is too
similar to "con", as in "copy con <file>". It's OK on Unix.

The SourceGenerator just catches the exception and says "unable to create file:
Con.java".

Maybe something slightly more useful would be nice that mentions that it is a
reserved name for Windows?

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    castor-644.patch
    13/Dec/06 8:55 PM
    4 kB
    Edward Kuns
  • Options
    • Show All
    • Show Open

Sub-Tasks

1. Create regression test case for filename CON.* under Windows Sub-task Open Open Unassigned
 

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Keith Visco added a comment - 21/Jan/04 10:26 AM

Wow, that's very strange, I never knew that limitation on windows before. I
actually did a simple test and I can't create any files with the name con.*
where * could be any extension, not just .java (of course .java is the only
importance here).

We'll try to add an explaination for this in the FAQ, seems like a windows bug
to me however.

Show
Keith Visco added a comment - 21/Jan/04 10:26 AM Wow, that's very strange, I never knew that limitation on windows before. I actually did a simple test and I can't create any files with the name con.* where * could be any extension, not just .java (of course .java is the only importance here). We'll try to add an explaination for this in the FAQ, seems like a windows bug to me however.
Hide
Permalink
Werner Guttmann added a comment - 11/Oct/06 2:20 PM

Funny enough, this is actually still the case with 1.0.4-SNAPSHOT. And I cannot find any references to this in the XML FAQ either ... .

Show
Werner Guttmann added a comment - 11/Oct/06 2:20 PM Funny enough, this is actually still the case with 1.0.4-SNAPSHOT. And I cannot find any references to this in the XML FAQ either ... .
Hide
Permalink
Edward Kuns added a comment - 11/Oct/06 2:27 PM

In Windows explorer, if I try to create D:\con.txt I get the complaint "A file with the name you specified already exists. Specify a different file name." This is definitely an issue in Windows. If I try to rename a folder to "con" the attempt is totally ignored. If I try to create a file named "con.asdfklasdlfajsldkfadsf" I get the same complaint that a file already exists with that name.

Show
Edward Kuns added a comment - 11/Oct/06 2:27 PM In Windows explorer, if I try to create D:\con.txt I get the complaint "A file with the name you specified already exists. Specify a different file name." This is definitely an issue in Windows. If I try to rename a folder to "con" the attempt is totally ignored. If I try to create a file named "con.asdfklasdlfajsldkfadsf" I get the same complaint that a file already exists with that name.
Hide
Permalink
Werner Guttmann added a comment - 11/Oct/06 3:06 PM

Time to point this out in the FAQ, I think .. . In addition, as we introduce proper exception handling, this will be easier to spot in the future. In addition, I think the error message should make things a little bit clearer.

Show
Werner Guttmann added a comment - 11/Oct/06 3:06 PM Time to point this out in the FAQ, I think .. . In addition, as we introduce proper exception handling, this will be easier to spot in the future. In addition, I think the error message should make things a little bit clearer.
Hide
Permalink
Edward Kuns added a comment - 13/Dec/06 8:50 PM

I've updated JNaming and SingleClassGenerator to warn about the reserved names under Windows. Currently the code will warn only. With this update, the need to update documentation is less strong.

Show
Edward Kuns added a comment - 13/Dec/06 8:50 PM I've updated JNaming and SingleClassGenerator to warn about the reserved names under Windows. Currently the code will warn only. With this update, the need to update documentation is less strong.
Hide
Permalink
Edward Kuns added a comment - 13/Dec/06 9:11 PM

Change commited without a new CTF test case. The test case will require a new feature to the CTF. Also, for now the code warns under all OSes and fails under none. We might want to change this. If so, we can create another subissue of this issue.

Since we are doing work on the name clash infrastructure right now, actually, the final decision on what to do with this warning can be decided there.

Show
Edward Kuns added a comment - 13/Dec/06 9:11 PM Change commited without a new CTF test case. The test case will require a new feature to the CTF. Also, for now the code warns under all OSes and fails under none. We might want to change this. If so, we can create another subissue of this issue. Since we are doing work on the name clash infrastructure right now, actually, the final decision on what to do with this warning can be decided there.

People

  • Assignee:
    Edward Kuns
    Reporter:
    Adrian Smith
Vote (0)
Watch (0)

Dates

  • Created:
    21/Jan/04 6:28 AM
    Updated:
    20/Apr/07 10:23 AM
    Resolved:
    13/Dec/06 9:11 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.