jfrog / artifactory-client-java

Artifactory REST Client Java API bindings
Apache License 2.0
319 stars 153 forks source link

IndexoutOfBoundException for item.move #243

Open maqzee-git opened 5 years ago

maqzee-git commented 5 years ago

Release used - artifactory-client-java.2.8.3

I have tried multiple ways to move a folder within a repo and failed to do so. If I try with same user from UI, it works so not sure what I am missing or doing incorrectly, can someone help me with fixing the issue

Gist of Code ItemHandle prevJarFolder = artifactory.repository("libs-feature-local").folder("company/component/0.10.10"); println prevJarFolder.info(); prevJarFolder.move("libs-feature-local", 'company/component/0.10.10.1') //adding 1

Error

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:657) at java.util.ArrayList.get(ArrayList.java:433) at java_util_List$get$3.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at org.jfrog.artifactory.client.impl.ItemHandleImpl.moveOrCopy(ItemHandleImpl.groovy:153) at org.jfrog.artifactory.client.impl.ItemHandleImpl.move(ItemHandleImpl.groovy:133)`

jonesbusy commented 8 months ago

Same issue : https://github.com/jfrog/artifactory-client-java/issues/333