[ 
https://issues.apache.org/jira/browse/HADOOP-11500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14387881#comment-14387881
 ] 

mai shurong commented on HADOOP-11500:
--------------------------------------

The code in the patch is not supported by java6.
After I put the patch to hadoop-2.6.0 src , the build with maven fail. 
I found reason is the code  in the patch is not supported by java6. 
To solve the problem, firstly JAVA_HOME should be set to java7 home; secondly 
modify maven-compiler-plugin to 1.7 in POM file hadoop-project/pom.xml as 
follows:

--- a/hadoop-project/pom.xml     2014-11-14 05:09:25.000000000 +0800
+++ b/hadoop-project/pom.xml      2015-03-26 18:59:49.000000000 +0800
@@ -938,8 +938,8 @@
           <artifactId>maven-compiler-plugin</artifactId>
           <version>2.5.1</version>
           <configuration>
-            <source>1.6</source>
-            <target>1.6</target>
+            <source>1.7</source>
+            <target>1.7</target>
           </configuration>
         </plugin>
         <plugin>
@@ -1241,8 +1241,8 @@
             <artifactId>maven-compiler-plugin</artifactId>
             <configuration>
               <fork>true</fork>
-              <source>1.6</source>
-              <target>1.6</target>
+              <source>1.7</source>
+              <target>1.7</target>
               <compilerArguments>
                 <Xlint/>
                 <Xmaxwarns>9999</Xmaxwarns>

> InputStream is left unclosed in ApplicationClassLoader
> ------------------------------------------------------
>
>                 Key: HADOOP-11500
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11500
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.6.0
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>             Fix For: 2.7.0
>
>         Attachments: hadoop-11500-001.patch, hadoop-11500-002.patch
>
>
> {code}
>     InputStream is = null;
>     try {
>       is = ApplicationClassLoader.class.getClassLoader().
>           getResourceAsStream(PROPERTIES_FILE);
> {code}
> The InputStream is not closed in the static block.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to