Author: tv
Date: Sun Feb 11 14:57:18 2018
New Revision: 1823843

URL: http://svn.apache.org/viewvc?rev=1823843&view=rev
Log:
Fix formatting, some cleanup.

Modified:
    
turbine/fulcrum/trunk/intake/src/java/org/apache/fulcrum/intake/IntakeServiceImpl.java

Modified: 
turbine/fulcrum/trunk/intake/src/java/org/apache/fulcrum/intake/IntakeServiceImpl.java
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/intake/src/java/org/apache/fulcrum/intake/IntakeServiceImpl.java?rev=1823843&r1=1823842&r2=1823843&view=diff
==============================================================================
--- 
turbine/fulcrum/trunk/intake/src/java/org/apache/fulcrum/intake/IntakeServiceImpl.java
 (original)
+++ 
turbine/fulcrum/trunk/intake/src/java/org/apache/fulcrum/intake/IntakeServiceImpl.java
 Sun Feb 11 14:57:18 2018
@@ -776,35 +776,35 @@ public class IntakeServiceImpl extends A
             um.setSchema(schemaFactory.newSchema(schemaURL));
             appDataElements = new HashMap<AppData, File>();
 
-                       for (File xmlFile : xmlFiles) {
-                               getLogger().debug("Now parsing: " + xmlFile);
-                               FileInputStream fis = null;
-                               try {
-                                       // fix for parallel deployment, passing 
file directly results in file not found
-                                       // exception
-                                       fis = new FileInputStream(xmlFile);
-                                       AppData appData = (AppData) 
um.unmarshal(fis);
-
-                                       if ( fis != null )
-                                               fis.close();
-
-                                       appDataElements.put(appData, xmlFile);
-                                       getLogger().debug("Saving appData for " 
+ xmlFile);
-                               } catch (Exception e) {
-                                       getLogger().debug("Error parsing Intake 
xml file: " + e.getMessage());
-                               } finally {
-                                       if (fis != null) {
-                                               try {
-                                                       fis.close();
-                                               } catch (IOException e) {
-                                                       
getLogger().debug("Intake xml file could not be opened");
-                                               }
-                                       }
-                               }
-                       }
+            for (File xmlFile : xmlFiles)
+            {
+                getLogger().debug("Now parsing: " + xmlFile);
+                FileInputStream fis = null;
+                try
+                {
+                    fis = new FileInputStream(xmlFile);
+                    AppData appData = (AppData) um.unmarshal(fis);
+
+                    appDataElements.put(appData, xmlFile);
+                    getLogger().debug("Saving AppData for " + xmlFile);
+                }
+                finally
+                {
+                    if (fis != null)
+                    {
+                        try
+                        {
+                            fis.close();
+                        }
+                        catch (IOException e)
+                        {
+                            getLogger().warn("Could not close file " + 
xmlFile);
+                        }
+                    }
+                }
+            }
 
             getLogger().debug("Parsing took " + (System.currentTimeMillis() - 
timer));
-
             saveSerialized(serialDataPath, appDataElements);
         }
 


Reply via email to