artifactory-client-java icon indicating copy to clipboard operation
artifactory-client-java copied to clipboard

IndexoutOfBoundException for item.move

Open maqzee-git opened this issue 6 years ago • 1 comments

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)`

maqzee-git avatar Apr 18 '19 19:04 maqzee-git

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

jonesbusy avatar Mar 17 '24 06:03 jonesbusy