felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.W. Janssen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FELIX-4719) SnapshotCommand never properly restores archived data-areas
Date Fri, 05 Dec 2014 09:21:13 GMT

     [ https://issues.apache.org/jira/browse/FELIX-4719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

J.W. Janssen resolved FELIX-4719.
---------------------------------
    Resolution: Fixed

Fixed in rev #1643202.

> SnapshotCommand never properly restores archived data-areas
> -----------------------------------------------------------
>
>                 Key: FELIX-4719
>                 URL: https://issues.apache.org/jira/browse/FELIX-4719
>             Project: Felix
>          Issue Type: Bug
>          Components: Deployment Admin
>            Reporter: J.W. Janssen
>            Assignee: J.W. Janssen
>             Fix For: deploymentadmin-0.9.8
>
>
> The {{RestoreSnapshotRunnable}} task that is used by {{SnapshotCommand}} to restore the
data area of a bundle cannot ever work:
> {code}
> private void unpack(File source, File target) throws IOException {
>   ZipInputStream input = null;
>   try {
>     input = new ZipInputStream(new FileInputStream(source));
>     for (ZipEntry entry = input.getNextEntry(); entry != null; entry = input.getNextEntry())
{
>       if (entry.isDirectory()) {
>         (new File(target, entry.getName())).mkdirs();
>       } else {
>         OutputStream output = null;
>         try {
>           output = new FileOutputStream(target);
> // THIS:                                ^^^^^^
> // ...
> {code}
> Given that {{target}} is *always* a directory, the marked line above will never succeed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message