In below stuff, shows me errror as "The type TransactionCallback is not generic; it cannot be parameterized with arguments <EntityIssues>" in eclipse editor.
import com.atlassian.sal.api.transaction.TransactionCallback; ao.executeInTransaction(new TransactionCallback<EntityIssues>() // (1) { @Override public Todo doInTransaction() { //storing stuff } });
here is the dependency:
<dependency> <groupId>com.atlassian.sal</groupId> <artifactId>sal-api</artifactId> <version>2.0.17</version> <scope>provided</scope> </dependency>
any idea why it does not taking generic object ?
Community moderators have prevented the ability to post new answers.
Thanks for your comments.
By removing the generic parameterizationm it works. (not sure why it did not work with generic even though updated with latest version 2.7.0.
newTransactionCallback()
I don't know enough about Eclipse to tell you what's wrong with it but the error seems to be coming from it.
The TransactionCallback from SAL is definitely genericisable (if that's even a word). One thing I note in your code above is that the generic type and the return type of the method 'doInTransaction' are not the same when they should be... Maybe Eclipse is getting confused here...
What happens when you try to compile this code with maven?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It was mistake in pasted stuff.. in actual, EntityIssues same at both side.
I have compiled direclty through - atlas-cli by keeping TransactionCallback<EntityIssues> but still, it did not work.
i have just removed generic term and keep TransactionCallback then it works..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i have also tried by updating version to "<version>2.7.0/1</version>". no works still.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.