You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Sangjin Lee (JIRA)" <ji...@apache.org> on 2014/09/05 06:29:27 UTC

[jira] [Updated] (HADOOP-11049) javax package system class default is too broad

     [ https://issues.apache.org/jira/browse/HADOOP-11049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sangjin Lee updated HADOOP-11049:
---------------------------------
    Attachment: HADOOP-11049.patch

Proposed patch.

Basically refined the "javax" package into subpackages, taking into account what is in JavaSE and what is in JavaEE. Looked at the best practices in dealing with system packages (such as OSGi). The idea is to spell out javax packages that are included in the JavaSE.

I also factored out the system classes default into a properties file. The main reason is to help people override this value more easily now that the list has become longer. Looking at the properties file would be significantly easier than checking out the source and getting the value from the java source file.

> javax package system class default is too broad
> -----------------------------------------------
>
>                 Key: HADOOP-11049
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11049
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 2.6.0
>            Reporter: Sangjin Lee
>            Assignee: Sangjin Lee
>            Priority: Minor
>         Attachments: HADOOP-11049.patch
>
>
> The system class default defined in ApplicationClassLoader has "javax.". This is too broad. The intent of the system classes is to exempt classes that are provided by the JDK along with hadoop and minimally necessary dependencies that are guaranteed to be on the system classpath. "javax." is too broad for that.
> For example, JSR-330 which is part of JavaEE (not JavaSE) has "javax.inject". Packages like them should not be declared as system classes, as they will result in ClassNotFoundException if they are needed and present on the user classpath.



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