Async REST API for pushing source documents allows copyTrans but will end in exception

Description

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31
Build Identifier:

org.zanata.rest.service.AsynchronousProcessResourceService has two methods to push source documents and they all allow a boolean parameter to trigger copyTrans. If the parameter is set to true, it will end in an exception at line 210 where a ClassCastException trying to cast an async document push handler to a copyTrans handler.

Reproducible: Always

Steps to Reproduce:
1. invoke that async resource with copyTrans set to true

Actual Results:
Exception in server log

Expected Results:
either not allow user to invoke copyTrans or handle it on the server. i.e. only invoke copyTrans async task once source push async task has finished.

Environment

None

Assignee

Unassigned

Reporter

Patrick Huang

Tested Version/s

None

Components

Priority

Medium
Configure