Author: markt
Date: Tue Nov  6 22:51:15 2012
New Revision: 1406388

URL: http://svn.apache.org/viewvc?rev=1406388&view=rev
Log:
Refactor to avoid Eclipse warning

Modified:
    tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java?rev=1406388&r1=1406387&r2=1406388&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java Tue Nov  6 
22:51:15 2012
@@ -196,7 +196,8 @@ public class SmapUtil {
 
         static void install(File classFile, byte[] smap) throws IOException {
             File tmpFile = new File(classFile.getPath() + "tmp");
-            new SDEInstaller(classFile, smap, tmpFile);
+            SDEInstaller installer = new SDEInstaller(classFile, smap);
+            installer.install(tmpFile);
             if (!classFile.delete()) {
                 throw new IOException("classFile.delete() failed");
             }
@@ -205,7 +206,7 @@ public class SmapUtil {
             }
         }
 
-        SDEInstaller(File inClassFile, byte[] sdeAttr, File outClassFile)
+        SDEInstaller(File inClassFile, byte[] sdeAttr)
             throws IOException {
             if (!inClassFile.exists()) {
                 throw new FileNotFoundException("no such file: " + 
inClassFile);
@@ -215,7 +216,9 @@ public class SmapUtil {
             // get the bytes
             orig = readWhole(inClassFile);
             gen = new byte[orig.length + sdeAttr.length + 100];
+        }
 
+        void install(File outClassFile) throws IOException {
             // do it
             addSDE();
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to