diff options
author | Marcus Arendt <[email protected]> | 2014-10-01 09:58:13 +0200 |
---|---|---|
committer | Marcus Arendt <[email protected]> | 2014-10-01 09:58:13 +0200 |
commit | 40bfc04288f623d7dbabc90f0c93c6baef997ba7 (patch) | |
tree | a2c2cdd9cd744b72679d23fb7a1cb380c29ee920 /lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java | |
parent | 0e1adc9d399f5854d5b789e5d6a32a92a6ea0d74 (diff) | |
parent | fd0b19efafcd146f96aa98fbb2c996b6e2ca9e98 (diff) | |
download | otp-40bfc04288f623d7dbabc90f0c93c6baef997ba7.tar.gz otp-40bfc04288f623d7dbabc90f0c93c6baef997ba7.tar.bz2 otp-40bfc04288f623d7dbabc90f0c93c6baef997ba7.zip |
Merge branch 'vladdu/jinterface_code_cleanup/OTP-12211' into maint
* vladdu/jinterface_code_cleanup/OTP-12211:
fix warning: Socket's InputStream not closed
silence 'potential resource leak' warnings
don't warn about some unused fields/variables
handle warnings about potential null pointers
keep all method parameters final
renamed method parameters hiding fields
add 'break' statements to make compiler happy
remove warnings from OtpMD5
rename OtpNode.flags to connFlags
rename OtpNode.Acceptor.port to acceptorPort
rename field 'self' to 'localNode'
mark deprecated unused private constructor
simplify 'if' statements
remove warnings: @Override, switch fall-through
make serialVersionUID fields private
remove unnecessary syntax (casts)
remove unused variables
removed unnecessary semicolons, imports, labels
remove unnecessary null pointer checks
remove unnecessary Cloneable and Serializable
Diffstat (limited to 'lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java')
-rw-r--r-- | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java index e363fdb457..9f7c5f5499 100644 --- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java +++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java @@ -18,7 +18,6 @@ */ package com.ericsson.otp.erlang; -import java.io.Serializable; import java.util.Iterator; import java.util.NoSuchElementException; @@ -30,9 +29,9 @@ import java.util.NoSuchElementException; * The arity of the list is the number of elements it contains. */ public class OtpErlangList extends OtpErlangObject implements - Iterable<OtpErlangObject>, Serializable, Cloneable { + Iterable<OtpErlangObject> { // don't change this! - static final long serialVersionUID = 5999112769036676548L; + private static final long serialVersionUID = 5999112769036676548L; private static final OtpErlangObject[] NO_ELEMENTS = new OtpErlangObject[0]; @@ -187,12 +186,11 @@ public class OtpErlangList extends OtpErlangObject implements public OtpErlangObject[] elements() { if (arity() == 0) { return NO_ELEMENTS; - } else { + } final OtpErlangObject[] res = new OtpErlangObject[arity()]; System.arraycopy(elems, 0, res, 0, res.length); return res; } - } /** * Get the string representation of the list. @@ -361,9 +359,8 @@ public class OtpErlangList extends OtpErlangObject implements if (arity >= n) { if (arity == n && lastTail != null) { return lastTail; - } else { - return new SubList(this, n); } + return new SubList(this, n); } return null; } |