ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colm O hEigeartaigh (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (RANGER-1287) Remove code duplication from Java method EmbeddedServer.start()
Date Mon, 16 Jan 2017 17:04:26 GMT

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

Colm O hEigeartaigh updated RANGER-1287:
----------------------------------------
    Fix Version/s: 0.7.0

> Remove code duplication from Java method EmbeddedServer.start()
> ---------------------------------------------------------------
>
>                 Key: RANGER-1287
>                 URL: https://issues.apache.org/jira/browse/RANGER-1287
>             Project: Ranger
>          Issue Type: Improvement
>          Components: admin
>    Affects Versions: 0.7.0
>            Reporter: Qiang Zhang
>            Assignee: Qiang Zhang
>            Priority: Minor
>              Labels: patch
>             Fix For: 0.7.0
>
>         Attachments: 0001-RANGER-1287-Remove-code-duplication-from-EmbeddedSer.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> In java class incubator-ranger\embeddedwebserver\src\main\java\org\apache\ranger\server\tomcat\EmbeddedServer.java,
> there is some code duplication in method start().
> 1.The following code is repeated twice, should remove one of them.
> {code}
> valve.setRotatable(true);
> {code} 
> 2.The following code is repeated three times which can be refactored.
> {code}
> try{
> 	server.start();
> 	server.getServer().await();
> 	shutdownServer();
> }catch (LifecycleException e) {
> 	LOG.severe("Tomcat Server failed to start:" + e.toString());
> 	e.printStackTrace();
> }catch (Exception e) {
> 	LOG.severe("Tomcat Server failed to start:" + e.toString());
> 	e.printStackTrace();
> }
> {code}



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

Mime
View raw message