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

Steve Loughran commented on HADOOP-11293:
-----------------------------------------

you did this in sed? Bold. 

This is how I'd have done it in IntelliJ idea
# write the new class
# have Shell.* relay direct {{final Shell.WINDOWS = OsType.IS_WINDOWS}}
# copy that code and stick it somewhere safe (like a comment)
# in intellij, hit "refactor|inline" and had the shell operations placed inline 
*wherever they are used*
# reinstate the now-legacy shell.methods for downstream use.

Excluding the ostype class & tests, the migration would take ~20 seconds a 
constant. 


> Factor OSType out from Shell
> ----------------------------
>
>                 Key: HADOOP-11293
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11293
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: util
>            Reporter: Yongjun Zhang
>            Assignee: Yongjun Zhang
>         Attachments: HADOOP-11293.001.patch, HADOOP-11293.002.patch
>
>
> Currently the code that detects the OS type is located in Shell.java. Code 
> that need to check OS type refers to Shell, even if no other stuff of Shell 
> is needed. 
> I am proposing to refactor OSType out to  its own class, so to make the 
> OSType easier to access and the dependency cleaner.
>  



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

Reply via email to