Skip to content

Instantly share code, notes, and snippets.

@theomega
theomega / gist:ca3fce61dd2552d7af37
Created July 29, 2014 14:02
Fails because of the life cycle of abstract classes
public class AnonInnerClass {
private final List<Job> jobsCache = new ArrayList<>();
private Class<? extends Job> getClass(final String s) {
final Job job = new Job() {
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
System.out.println(s);
}
};