You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by ia...@apache.org on 2016/02/24 16:31:18 UTC
incubator-taverna-language git commit: Move the zip block outside the
bundle block
Repository: incubator-taverna-language
Updated Branches:
refs/heads/master 26664a807 -> c954f5b77
Move the zip block outside the bundle block
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/commit/c954f5b7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/tree/c954f5b7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/diff/c954f5b7
Branch: refs/heads/master
Commit: c954f5b77e30011bbc31df05c660f161594acff2
Parents: 26664a8
Author: Ian Dunlop <ia...@manchester.ac.uk>
Authored: Wed Feb 24 15:29:25 2016 +0000
Committer: Ian Dunlop <ia...@manchester.ac.uk>
Committed: Wed Feb 24 15:29:25 2016 +0000
----------------------------------------------------------------------
.../taverna/robundle/validator/RoValidator.java | 28 +++++++++-----------
1 file changed, 13 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/c954f5b7/taverna-robundle/src/main/java/org/apache/taverna/robundle/validator/RoValidator.java
----------------------------------------------------------------------
diff --git a/taverna-robundle/src/main/java/org/apache/taverna/robundle/validator/RoValidator.java b/taverna-robundle/src/main/java/org/apache/taverna/robundle/validator/RoValidator.java
index 7757135..7035262 100644
--- a/taverna-robundle/src/main/java/org/apache/taverna/robundle/validator/RoValidator.java
+++ b/taverna-robundle/src/main/java/org/apache/taverna/robundle/validator/RoValidator.java
@@ -81,24 +81,22 @@ public class RoValidator {
}
public void validate(){
-
- try (Bundle bundle = Bundles.openBundle(path)) {
-
+ // Autoclose the zip file
+ try(ZipFile zip = new ZipFile(new File(path.toString()))) {
+ Enumeration<? extends ZipEntry> ent = zip.entries();
+ while(ent.hasMoreElements()){
+ ZipEntry entry = ent.nextElement();
+ if(!entry.isDirectory()){
+ items.add("/"+entry.getName());
+ }
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ try (Bundle bundle = Bundles.openBundle(path)) {
Manifest manifest = bundle.getManifest();
this.aggr = manifest.getAggregates();
this.anno = manifest.getAnnotations();
- // Autoclose the zip file
- try(ZipFile zip = new ZipFile(new File(path.toString()))) {
- Enumeration<? extends ZipEntry> ent = zip.entries();
- while(ent.hasMoreElements()){
- ZipEntry entry = ent.nextElement();
- if(!entry.isDirectory()){
- items.add("/"+entry.getName());
- }
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
} catch (IOException e) {
// TODO Auto-generated catch block
System.err.println("Unable to open the bundle");