
|
If you were logged in you would be able to see more operations.
|
|
|
JBoss Common
Created: 16/Oct/07 09:27 AM
Updated: 16/Oct/07 10:14 AM
|
|
| Component/s: |
None
|
| Affects Version/s: |
None
|
| Fix Version/s: |
None
|
|
Security Level:
|
Public
(Everyone can see)
|
|
|
Original Estimate:
|
Unknown
|
Remaining Estimate:
|
Unknown
|
Time Spent:
|
Unknown
|
|
|
Current code in FileProtocolArchiveBrowserFactory has problems when the URL coming from above contains escaped characters. E.g.: In an app. I'm writing, the class receives an URL coming from a ClassLoader.getResources method: resources in directories containing square brackets arrive to the class in escaped URLs such as the following:
file:/C:/Stratosfera/pos_back/%5BCARCON%5Dstratosfera-verifica-cartoline-concorso/war/WEB-INF/classes/
this form fails in the current implementation because of line 40:
File f = new File(url.getPath());
this results in a non existing file. Replacing the line with the following solves the problem:
File f;
try {
f = new File(url.toURI());
}
catch ( URISyntaxException e ) {
throw new RuntimeException( e );
}
this problems creates various compatibility problems in depending libraries (hibernate entitymanager for one).
|
|
Description
|
Current code in FileProtocolArchiveBrowserFactory has problems when the URL coming from above contains escaped characters. E.g.: In an app. I'm writing, the class receives an URL coming from a ClassLoader.getResources method: resources in directories containing square brackets arrive to the class in escaped URLs such as the following:
file:/C:/Stratosfera/pos_back/%5BCARCON%5Dstratosfera-verifica-cartoline-concorso/war/WEB-INF/classes/
this form fails in the current implementation because of line 40:
File f = new File(url.getPath());
this results in a non existing file. Replacing the line with the following solves the problem:
File f;
try {
f = new File(url.toURI());
}
catch ( URISyntaxException e ) {
throw new RuntimeException( e );
}
this problems creates various compatibility problems in depending libraries (hibernate entitymanager for one). |
Show » |
|
|