-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move results in IndexOutOfBounds Exception #333
Comments
Thanks for reporting this @HendrikHoetker. |
Hi, I just go the same issue. My code is as simple as
|
This fail because of this check (https://github.com/jfrog/artifactory-client-java/blob/e39db33c2d8b87134bac115ae43a1408ee1964b6/services/src/main/groovy/org/jfrog/artifactory/client/impl/ItemHandleImpl.groovy#L153C1-L155C10)
Looks message.getMessages() is empty for some reason. I would like to submit a patch to check check that the messages are notEmpty before checking the first element |
I am using the Artifactory Client API in my java application:
I am sure I am logged in correctly via username/password as other functions work properly
The file to be renamed is a simple text file (32bytes) which is confirmed to exists and is a valid file.
Renaming the same file via Web User Interface with same name works fine.
Resulting exception:
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
at java.base/java.util.Objects.checkIndex(Objects.java:372)
at java.base/java.util.ArrayList.get(ArrayList.java:459)
at java_util_List$get.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
at org.jfrog.artifactory.client.impl.ItemHandleImpl.moveOrCopy(ItemHandleImpl.groovy:153)
at org.jfrog.artifactory.client.impl.ItemHandleImpl.move(ItemHandleImpl.groovy:133)
The text was updated successfully, but these errors were encountered: