flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject git commit: [flex-falcon] [refs/heads/feature-autobuild/example-maven-dirs] - - Added temporary code to help track down a build problem.
Date Thu, 27 Oct 2016 15:52:12 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/feature-autobuild/example-maven-dirs 7adda9597 -> f9423008d


- Added temporary code to help track down a build problem.


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/f9423008
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/f9423008
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/f9423008

Branch: refs/heads/feature-autobuild/example-maven-dirs
Commit: f9423008dbfc5af05ec35b6373641f8436191708
Parents: 7adda95
Author: Christofer Dutz <christofer.dutz@codecentric.de>
Authored: Thu Oct 27 17:52:04 2016 +0200
Committer: Christofer Dutz <christofer.dutz@codecentric.de>
Committed: Thu Oct 27 17:52:04 2016 +0200

----------------------------------------------------------------------
 .../codegen/js/goog/JSGoogPublisher.java        | 60 ++++++++++----------
 1 file changed, 30 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/f9423008/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
index ea39e45..4791887 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
@@ -273,41 +273,41 @@ public class JSGoogPublisher extends JSPublisher implements IJSPublisher
 
     protected void dumpJar(File jarFile, File outputDir) throws IOException
     {
-        // TODO (mschmalle) for some reason ide thinks this has not been closed
-        @SuppressWarnings("resource")
-        JarFile jar = new JarFile(jarFile);
-
-        for (Enumeration<JarEntry> jarEntries = jar.entries(); jarEntries.hasMoreElements();)
-        {
-            JarEntry jarEntry = jarEntries.nextElement();
-            if (!jarEntry.getName().endsWith("/"))
-            {
-                File file = new File(outputDir, jarEntry.getName());
-
-                // Check if the parent directory exists. If not -> create it.
-                File dir = file.getParentFile();
-                if (!dir.exists())
-                {
-                    if (!dir.mkdirs())
-                    {
-                        throw new IOException("Unable to create directory "
-                                + dir.getAbsolutePath());
+        try {
+            // TODO (mschmalle) for some reason ide thinks this has not been closed
+            @SuppressWarnings("resource")
+            JarFile jar = new JarFile(jarFile);
+
+            for (Enumeration<JarEntry> jarEntries = jar.entries(); jarEntries.hasMoreElements();
) {
+                JarEntry jarEntry = jarEntries.nextElement();
+                if (!jarEntry.getName().endsWith("/")) {
+                    File file = new File(outputDir, jarEntry.getName());
+
+                    // Check if the parent directory exists. If not -> create it.
+                    File dir = file.getParentFile();
+                    if (!dir.exists()) {
+                        if (!dir.mkdirs()) {
+                            throw new IOException("Unable to create directory "
+                                    + dir.getAbsolutePath());
+                        }
                     }
-                }
 
-                // Dump the file.
-                InputStream is = jar.getInputStream(jarEntry);
-                FileOutputStream fos = new FileOutputStream(file);
-                while (is.available() > 0)
-                {
-                    fos.write(is.read());
+                    // Dump the file.
+                    InputStream is = jar.getInputStream(jarEntry);
+                    FileOutputStream fos = new FileOutputStream(file);
+                    while (is.available() > 0) {
+                        fos.write(is.read());
+                    }
+                    fos.close();
+                    is.close();
                 }
-                fos.close();
-                is.close();
             }
-        }
 
-        jar.close();
+            jar.close();
+        }catch(Throwable t) {
+            t.printStackTrace();
+            throw new RuntimeException(t);
+        }
     }
 
     public class JSGoogErrorManager implements ErrorManager


Mime
View raw message