ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject [3/3] ant git commit: whitespace
Date Tue, 20 Dec 2016 19:44:54 GMT
whitespace


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

Branch: refs/heads/1.9.x
Commit: c8a72df5913d2f6816b66837bee8030633fa9189
Parents: 032e888
Author: Stefan Bodewig <bodewig@apache.org>
Authored: Tue Dec 20 20:43:46 2016 +0100
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Tue Dec 20 20:43:46 2016 +0100

----------------------------------------------------------------------
 .../optional/depend/DirectoryIterator.java      | 14 ++--
 .../ant/taskdefs/optional/jlink/jlink.java      | 80 ++++++++++----------
 .../taskdefs/optional/sound/AntSoundPlayer.java | 34 ++++-----
 .../tools/ant/types/resources/ResourceList.java | 10 +--
 4 files changed, 69 insertions(+), 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/c8a72df5/src/main/org/apache/tools/ant/taskdefs/optional/depend/DirectoryIterator.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/depend/DirectoryIterator.java
b/src/main/org/apache/tools/ant/taskdefs/optional/depend/DirectoryIterator.java
index e12f684..af28c96 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/depend/DirectoryIterator.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/depend/DirectoryIterator.java
@@ -134,16 +134,16 @@ public class DirectoryIterator implements ClassFileIterator {
                             = new FileInputStream(element);
 
                         try {
-                        if (element.getName().endsWith(".class")) {
+                            if (element.getName().endsWith(".class")) {
 
-                            // create a data input stream from the jar
-                            // input stream
-                            ClassFile javaClass = new ClassFile();
+                                // create a data input stream from the jar
+                                // input stream
+                                ClassFile javaClass = new ClassFile();
 
-                            javaClass.read(inFileStream);
+                                javaClass.read(inFileStream);
 
-                            nextElement = javaClass;
-                        }
+                                nextElement = javaClass;
+                            }
                         } finally {
                             inFileStream.close();
                         }

http://git-wip-us.apache.org/repos/asf/ant/blob/c8a72df5/src/main/org/apache/tools/ant/taskdefs/optional/jlink/jlink.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jlink/jlink.java b/src/main/org/apache/tools/ant/taskdefs/optional/jlink/jlink.java
index 3916477..b2c5d0f 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/jlink/jlink.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/jlink/jlink.java
@@ -224,52 +224,52 @@ public class jlink {
         }
         ZipFile zipf = new ZipFile(f);
         try {
-        Enumeration entries = zipf.entries();
-
-        while (entries.hasMoreElements()) {
-            ZipEntry inputEntry = (ZipEntry) entries.nextElement();
-            //Ignore manifest entries.  They're bound to cause conflicts between
-            //files that are being merged.  User should supply their own
-            //manifest file when doing the merge.
-            String inputEntryName = inputEntry.getName();
-            int index = inputEntryName.indexOf("META-INF");
-
-            if (index < 0) {
-                //META-INF not found in the name of the entry. Go ahead and process it.
-                try {
-                    output.putNextEntry(processEntry(zipf, inputEntry));
-                } catch (ZipException ex) {
-                    //If we get here, it could be because we are trying to put a
-                    //directory entry that already exists.
-                    //For example, we're trying to write "com", but a previous
-                    //entry from another mergefile was called "com".
-                    //In that case, just ignore the error and go on to the
-                    //next entry.
-                    String mess = ex.getMessage();
-
-                    if (mess.indexOf("duplicate") >= 0) {
-                        //It was the duplicate entry.
-                        continue;
-                    } else {
-                        // I hate to admit it, but we don't know what happened
-                        // here.  Throw the Exception.
-                        throw ex;
+            Enumeration entries = zipf.entries();
+
+            while (entries.hasMoreElements()) {
+                ZipEntry inputEntry = (ZipEntry) entries.nextElement();
+                //Ignore manifest entries.  They're bound to cause conflicts between
+                //files that are being merged.  User should supply their own
+                //manifest file when doing the merge.
+                String inputEntryName = inputEntry.getName();
+                int index = inputEntryName.indexOf("META-INF");
+
+                if (index < 0) {
+                    //META-INF not found in the name of the entry. Go ahead and process it.
+                    try {
+                        output.putNextEntry(processEntry(zipf, inputEntry));
+                    } catch (ZipException ex) {
+                        //If we get here, it could be because we are trying to put a
+                        //directory entry that already exists.
+                        //For example, we're trying to write "com", but a previous
+                        //entry from another mergefile was called "com".
+                        //In that case, just ignore the error and go on to the
+                        //next entry.
+                        String mess = ex.getMessage();
+
+                        if (mess.indexOf("duplicate") >= 0) {
+                            //It was the duplicate entry.
+                            continue;
+                        } else {
+                            // I hate to admit it, but we don't know what happened
+                            // here.  Throw the Exception.
+                            throw ex;
+                        }
                     }
-                }
 
-                InputStream in = zipf.getInputStream(inputEntry);
-                int len = buffer.length;
-                int count = -1;
+                    InputStream in = zipf.getInputStream(inputEntry);
+                    int len = buffer.length;
+                    int count = -1;
 
-                while ((count = in.read(buffer, 0, len)) > 0) {
-                    output.write(buffer, 0, count);
+                    while ((count = in.read(buffer, 0, len)) > 0) {
+                        output.write(buffer, 0, count);
+                    }
+                    in.close();
+                    output.closeEntry();
                 }
-                in.close();
-                output.closeEntry();
             }
-        }
         } finally {
-        zipf.close();
+            zipf.close();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ant/blob/c8a72df5/src/main/org/apache/tools/ant/taskdefs/optional/sound/AntSoundPlayer.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sound/AntSoundPlayer.java b/src/main/org/apache/tools/ant/taskdefs/optional/sound/AntSoundPlayer.java
index 2a99124..5007c45 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sound/AntSoundPlayer.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sound/AntSoundPlayer.java
@@ -117,25 +117,25 @@ public class AntSoundPlayer implements LineListener, BuildListener {
             DataLine.Info   info = new DataLine.Info(Clip.class, format,
                                              AudioSystem.NOT_SPECIFIED);
             try {
-            try {
-                audioClip = (Clip) AudioSystem.getLine(info);
-                audioClip.addLineListener(this);
-                audioClip.open(audioInputStream);
-            } catch (LineUnavailableException e) {
-                project.log("The sound device is currently unavailable");
-                return;
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
+                try {
+                    audioClip = (Clip) AudioSystem.getLine(info);
+                    audioClip.addLineListener(this);
+                    audioClip.open(audioInputStream);
+                } catch (LineUnavailableException e) {
+                    project.log("The sound device is currently unavailable");
+                    return;
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
 
-            if (duration != null) {
-                playClip(audioClip, duration.longValue());
-            } else {
-                playClip(audioClip, loops);
-            }
-            audioClip.drain();
+                if (duration != null) {
+                    playClip(audioClip, duration.longValue());
+                } else {
+                    playClip(audioClip, loops);
+                }
+                audioClip.drain();
             } finally {
-            audioClip.close();
+                audioClip.close();
             }
         } else {
             project.log("Can't get data from file " + file.getName());

http://git-wip-us.apache.org/repos/asf/ant/blob/c8a72df5/src/main/org/apache/tools/ant/types/resources/ResourceList.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/resources/ResourceList.java b/src/main/org/apache/tools/ant/types/resources/ResourceList.java
index 6c16b5e..da83ea9 100644
--- a/src/main/org/apache/tools/ant/types/resources/ResourceList.java
+++ b/src/main/org/apache/tools/ant/types/resources/ResourceList.java
@@ -198,12 +198,12 @@ public class ResourceList extends DataType implements ResourceCollection
{
             Union streamResources = new Union();
             BufferedReader reader = new BufferedReader(crh.getAssembledReader());
             try {
-            streamResources.setCache(true);
+                streamResources.setCache(true);
 
-            String line = null;
-            while ((line = reader.readLine()) != null) {
-                streamResources.add(parse(line));
-            }
+                String line = null;
+                while ((line = reader.readLine()) != null) {
+                    streamResources.add(parse(line));
+                }
             } finally {
                 reader.close();
             }


Mime
View raw message