Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binding file cannot refer to schema file with space in file name. #815

Closed
Tomas-Kraus opened this issue Feb 14, 2011 · 8 comments
Closed

Comments

@Tomas-Kraus
Copy link
Member

If the schema file has a space in its filename, using a binding file that refers to it fails. The reason can be found in line 248 of Internalizer.java, where URL.getFile() returns a URL encoded String (with %20 for spaces), which is not expected by the File constructor.

Test case will follow shortly.

Environment

Tested on Linux.

Affected Versions

[2.2.3]

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
Reported by basdebakker14

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
Was assigned to snajper

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
basdebakker14 said:
To run test:

  1. Unpack zip file.
  2. Go to "jaxbtest" directory.
  3. Make sure the JAXB RI 2.2.3 is used, as the test passes with xjc in Sun JDK 1.6.0.23.
  4. xjc.sh -b schema\ with\ spaces.xjb schema\ with\ spaces.xsd

Actual result:
parsing a schema...
[ERROR] "file:/home/bas/jaxbtest/schema%2520with%2520spaces.xsd" is not a part of this compilation. Is this a mistake for "file:/home/bas/jaxbtest/schema%20with%20spaces.xsd"?
line 5 of file:/home/bas/jaxbtest/schema%20with%20spaces.xjb

Failed to parse a schema.

Expected result:
parsing a schema...
compiling a schema...
com/example/test/ObjectFactory.java
com/example/test/Root.java
com/example/test/package-info.java

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
File: jaxbtest.zip
Attached By: basdebakker14

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
snajper said:
Fixed in 2.2.4.

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
Marked as fixed on Tuesday, March 29th 2011, 11:35:20 pm

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JAXB-815

@Tomas-Kraus
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants