[
https://issues.apache.org/jira/browse/LANG-1550?focusedWorklogId=445330&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-445330
]
ASF GitHub Bot logged work on LANG-1550:
----------------------------------------
Author: ASF GitHub Bot
Created on: 13/Jun/20 12:17
Start Date: 13/Jun/20 12:17
Worklog Time Spent: 10m
Work Description: garydgregory commented on a change in pull request #551:
URL: https://github.com/apache/commons-lang/pull/551#discussion_r439734790
##########
File path: src/main/java/org/apache/commons/lang3/ArrayUtils.java
##########
@@ -3110,19 +3110,22 @@ public static int indexOf(final short[] array, final
short valueToFind, int star
}
/**
- * Returns whether a given array can safely be accessed at the given index.
+ * <p>Returns whether a given array can safely be accessed at the given
index.
+ *
+ * <pre>
+ * ArrayUtils.isArrayIndexValid(null, 0) = false
+ * ArrayUtils.isArrayIndexValid([], 0) = false
+ * ArrayUtils.isArrayIndexValid(["a"], 0) = true
+ * </pre>
Review comment:
Unfortunately, Javadoc created with a closed pre tag after an EOL appear
with an extra blank line. so pre tags should be closed at the end of the last
line.
##########
File path: src/main/java/org/apache/commons/lang3/ArrayUtils.java
##########
@@ -3110,19 +3110,22 @@ public static int indexOf(final short[] array, final
short valueToFind, int star
}
/**
- * Returns whether a given array can safely be accessed at the given index.
+ * <p>Returns whether a given array can safely be accessed at the given
index.
Review comment:
Paragraph tags are not needed for the first paragraph of a Javadoc
comment. When you do use HTML tags (elsewhere), you should close them.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 445330)
Time Spent: 0.5h (was: 20m)
> Method ArrayUtils::isArrayIndexValid not optimized.
> ---------------------------------------------------
>
> Key: LANG-1550
> URL: https://issues.apache.org/jira/browse/LANG-1550
> Project: Commons Lang
> Issue Type: Improvement
> Components: lang.*
> Affects Versions: 3.8, 3.9, 3.10
> Reporter: Edgar Asatryan
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> The *ArrayUtils::isArrayIndexValid* is can retrieve array length 2 times in
> some cases.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)