You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Sahoo (JIRA)" <ji...@apache.org> on 2009/05/26 14:23:45 UTC
[jira] Created: (FELIX-1179) FileInstall should recognize Jar files
by content instead of extension
FileInstall should recognize Jar files by content instead of extension
----------------------------------------------------------------------
Key: FELIX-1179
URL: https://issues.apache.org/jira/browse/FELIX-1179
Project: Felix
Issue Type: Improvement
Components: File Install
Affects Versions: fileinstall-1.0.0
Environment: generic
Reporter: Sahoo
Fix For: fileinstall-1.2.0
Currently FileInstall recognizes files of two types: .cfg files and .jar files. I know there is already a request to have a plugin mechanism in FileInstall to support different kinds of file types, but that's more of a long term change. In short term, we can modify fileinstall to recognize Jar files by their content instead of going by just file extensions. It will allow us to use files like .war files in watched dir.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (FELIX-1179) FileInstall should recognize Jar files
by content instead of extension
Posted by "Filippo Diotalevi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Filippo Diotalevi updated FELIX-1179:
-------------------------------------
Attachment: FELIX-1179-2.txt
> 1. Should we optimize it for files with .jar extension?
The purpose is to install bundle with other extensions, so, I'd say, no.
> 2. Should we close() the JarFile instead of waiting for finalizer() to do so? I am not sure if just constructing a new
> JarFile locks any resource, but closing would not hurt.
Attached a second patch that closes the JarFile
> FileInstall should recognize Jar files by content instead of extension
> ----------------------------------------------------------------------
>
> Key: FELIX-1179
> URL: https://issues.apache.org/jira/browse/FELIX-1179
> Project: Felix
> Issue Type: Improvement
> Components: File Install
> Affects Versions: fileinstall-1.0.0
> Environment: generic
> Reporter: Sahoo
> Fix For: fileinstall-1.2.0
>
> Attachments: FELIX-1179-2.txt, FELIX-1179.txt
>
>
> Currently FileInstall recognizes files of two types: .cfg files and .jar files. I know there is already a request to have a plugin mechanism in FileInstall to support different kinds of file types, but that's more of a long term change. In short term, we can modify fileinstall to recognize Jar files by their content instead of going by just file extensions. It will allow us to use files like .war files in watched dir.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-1179) FileInstall should recognize Jar
files by content instead of extension
Posted by "Sahoo (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713027#action_12713027 ]
Sahoo commented on FELIX-1179:
------------------------------
Filippo,
I had the similar idea when I submitted the bug and I was waiting for Richard to apply patch to 1174 before uploading a patch. Thanks for making a patch and test case available. There are two questions that come to my mind:
1. Should we optimize it for files with .jar extension? Probably not.
2. Should we close() the JarFile instead of waiting for finalizer() to do so? I am not sure if just constructing a new JarFile locks any resource, but closing would not hurt.
Thanks,
Sahoo
> FileInstall should recognize Jar files by content instead of extension
> ----------------------------------------------------------------------
>
> Key: FELIX-1179
> URL: https://issues.apache.org/jira/browse/FELIX-1179
> Project: Felix
> Issue Type: Improvement
> Components: File Install
> Affects Versions: fileinstall-1.0.0
> Environment: generic
> Reporter: Sahoo
> Fix For: fileinstall-1.2.0
>
> Attachments: FELIX-1179.txt
>
>
> Currently FileInstall recognizes files of two types: .cfg files and .jar files. I know there is already a request to have a plugin mechanism in FileInstall to support different kinds of file types, but that's more of a long term change. In short term, we can modify fileinstall to recognize Jar files by their content instead of going by just file extensions. It will allow us to use files like .war files in watched dir.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (FELIX-1179) FileInstall should recognize Jar files
by content instead of extension
Posted by "Sahoo (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sahoo closed FELIX-1179.
------------------------
> FileInstall should recognize Jar files by content instead of extension
> ----------------------------------------------------------------------
>
> Key: FELIX-1179
> URL: https://issues.apache.org/jira/browse/FELIX-1179
> Project: Felix
> Issue Type: Improvement
> Components: File Install
> Affects Versions: fileinstall-1.0.0
> Environment: generic
> Reporter: Sahoo
> Assignee: Richard S. Hall
> Fix For: fileinstall-1.2.0
>
> Attachments: FELIX-1179-2.txt, FELIX-1179.txt
>
>
> Currently FileInstall recognizes files of two types: .cfg files and .jar files. I know there is already a request to have a plugin mechanism in FileInstall to support different kinds of file types, but that's more of a long term change. In short term, we can modify fileinstall to recognize Jar files by their content instead of going by just file extensions. It will allow us to use files like .war files in watched dir.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-1179) FileInstall should recognize Jar
files by content instead of extension
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713038#action_12713038 ]
Richard S. Hall commented on FELIX-1179:
----------------------------------------
Close it.
> FileInstall should recognize Jar files by content instead of extension
> ----------------------------------------------------------------------
>
> Key: FELIX-1179
> URL: https://issues.apache.org/jira/browse/FELIX-1179
> Project: Felix
> Issue Type: Improvement
> Components: File Install
> Affects Versions: fileinstall-1.0.0
> Environment: generic
> Reporter: Sahoo
> Fix For: fileinstall-1.2.0
>
> Attachments: FELIX-1179.txt
>
>
> Currently FileInstall recognizes files of two types: .cfg files and .jar files. I know there is already a request to have a plugin mechanism in FileInstall to support different kinds of file types, but that's more of a long term change. In short term, we can modify fileinstall to recognize Jar files by their content instead of going by just file extensions. It will allow us to use files like .war files in watched dir.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (FELIX-1179) FileInstall should recognize Jar
files by content instead of extension
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard S. Hall resolved FELIX-1179.
------------------------------------
Resolution: Fixed
Assignee: Richard S. Hall
Thanks for the patch Filippo. I only made minor changes to the formatting. (FYI, see http://felix.apache.org/site/coding-standards.html for Felix coding style standards). Please close this issue if you are satisfied.
> FileInstall should recognize Jar files by content instead of extension
> ----------------------------------------------------------------------
>
> Key: FELIX-1179
> URL: https://issues.apache.org/jira/browse/FELIX-1179
> Project: Felix
> Issue Type: Improvement
> Components: File Install
> Affects Versions: fileinstall-1.0.0
> Environment: generic
> Reporter: Sahoo
> Assignee: Richard S. Hall
> Fix For: fileinstall-1.2.0
>
> Attachments: FELIX-1179-2.txt, FELIX-1179.txt
>
>
> Currently FileInstall recognizes files of two types: .cfg files and .jar files. I know there is already a request to have a plugin mechanism in FileInstall to support different kinds of file types, but that's more of a long term change. In short term, we can modify fileinstall to recognize Jar files by their content instead of going by just file extensions. It will allow us to use files like .war files in watched dir.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (FELIX-1179) FileInstall should recognize Jar files
by content instead of extension
Posted by "Filippo Diotalevi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Filippo Diotalevi updated FELIX-1179:
-------------------------------------
Attachment: FELIX-1179.txt
The attached patch performs a simple check using the JarFile class constructor
new JarFile(filePath)
In my samples it works well. Do you think it is enough, or there are better ways to do that?
> FileInstall should recognize Jar files by content instead of extension
> ----------------------------------------------------------------------
>
> Key: FELIX-1179
> URL: https://issues.apache.org/jira/browse/FELIX-1179
> Project: Felix
> Issue Type: Improvement
> Components: File Install
> Affects Versions: fileinstall-1.0.0
> Environment: generic
> Reporter: Sahoo
> Fix For: fileinstall-1.2.0
>
> Attachments: FELIX-1179.txt
>
>
> Currently FileInstall recognizes files of two types: .cfg files and .jar files. I know there is already a request to have a plugin mechanism in FileInstall to support different kinds of file types, but that's more of a long term change. In short term, we can modify fileinstall to recognize Jar files by their content instead of going by just file extensions. It will allow us to use files like .war files in watched dir.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.