Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop >> mail # dev >> Report as a bug?


Copy link to this message
-
Re: Report as a bug?
Yes, please do. Thanks for looking into this.
--
  Take care,
Konstantin (Cos) Boudnik

On Sat, Jan 29, 2011 at 12:44, Niels Basjes <[EMAIL PROTECTED]> wrote:
> I was playing around with PMD, just to see what kind of messages it
> gives on my hadoop feature.
> I noticed a message about "Dead code" in org.apache.hadoop.fs.ftp.FTPFileSystem
>
> Starting at about line 80:
>
>    String userAndPassword = uri.getUserInfo();
>    if (userAndPassword == null) {
>      userAndPassword = (conf.get("fs.ftp.user." + host, null) + ":" + conf
>          .get("fs.ftp.password." + host, null));
>      if (userAndPassword == null) {
>        throw new IOException("Invalid user/passsword specified");
>      }
>    }
>
>
> The last "if" block is the dead code as the string will always contain
> at least the text ":" or "null:null"
> It will probably fail a bit later when really trying to login with a
> wrong uid/password.
> So, is this worth reporting as a bug?
>
> --
> Met vriendelijke groeten,
>
> Niels Basjes
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB