Miss Saung
Miss Saung

Reputation: 21

The type Prevayler is not generic; it cannot be parameterized with arguments <P>

I have been reading about checkpointing technique for fault tolerance. So, I am working with prevayler java library for checkpointing. Now, I have a error showed The type Prevayler is not generic; it cannot be parameterized with arguments <P>. Can you give me guidance for this error?

Here is my code:

import org.prevayler.Prevayler;
import org.prevayler.PrevaylerFactory;
import java.io.IOException;
import java.util.ArrayList;
public final class PrevaylerSample {

    public static void main(final String[] args) throws Exception {
        final Prevayler prevayler = PrevaylerFactory.createPrevayler(new   ArrayList<String>());

        prevayler.execute(new SampleTransaction());

        prevayler.takeSnapshot();

        prevayler.close();
    }
}

Upvotes: 2

Views: 115

Answers (1)

Spotted
Spotted

Reputation: 4091

Your current declaration of Prevayler uses raw type at the moment. Have you tried to parametrized it ?

final Prevayler<ArrayList<String>> prevayler = PrevaylerFactory.createPrevayler(new ArrayList<String>());

Upvotes: 0

Related Questions