NoSuchElementException when uploading empty data
Description
Environment
None
Activity
Show:
Former user 10 May 2016 at 04:20
Ready for Release
Details
Details
Assignee
Sean Flanigan
Sean FlaniganReporter
Former user
Former user(Deactivated)Labels
Tested Version/s
None
Components
Fix versions
Affects versions
Priority

More fields
Time tracking
More fields
Time trackingCreated 9 May 2016 at 06:47
Updated 27 June 2018 at 02:21
Resolved 12 May 2016 at 00:15
When uploading a file that somehow has empty parameters, the batching process ends up with an empty list of states and breaks with the indicated exception.
13:34:18,037 ERROR [org.zanata.async.AsyncTaskManager] (pool-8-thread-4) Exception when executing an asynchronous task.: java.util.NoSuchElementException at com.google.common.collect.Iterables.getLast(Iterables.java:784) at org.zanata.service.impl.TranslationStateCacheImpl.textFlowStateUpdated(TranslationStateCacheImpl.java:206) at org.zanata.service.impl.TranslationStateCacheImpl$Proxy$_$$_WeldClientProxy.textFlowStateUpdated(Unknown Source) at org.zanata.service.impl.TranslationUpdatedManager.textFlowStateUpdated(TranslationUpdatedManager.java:57) at org.zanata.service.impl.TranslationUpdatedManager$Proxy$_$$_WeldSubclass.textFlowStateUpdated$$super(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal(TerminalAroundInvokeInvocationContext.java:49) at org.jboss.weld.interceptor.proxy.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:77) at org.zanata.async.AsyncMethodInterceptor.aroundInvoke(AsyncMethodInterceptor.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:74) at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeAroundInvoke(InterceptorMethodHandler.java:84) at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:72) at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:56) at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:79) at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:68) at org.zanata.service.impl.TranslationUpdatedManager$Proxy$_$$_WeldSubclass.textFlowStateUpdated(Unknown Source) at org.zanata.service.impl.TranslationUpdatedManager$Proxy$_$$_WeldClientProxy.textFlowStateUpdated(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.zanata.async.AsyncMethodInterceptor.lambda$aroundInvoke$1(AsyncMethodInterceptor.java:92) at org.zanata.async.AsyncTaskManager.lambda$startTask$0(AsyncTaskManager.java:115) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)