JDK-8050221 : Missing type variable in where clause
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7u15
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • OS: windows_7
  • Submitted: 2013-02-25
  • Updated: 2014-07-29
  • Resolved: 2014-07-29
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version  " 1.7.0_15 " 
Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]

A DESCRIPTION OF THE PROBLEM :
The below code caused javac to crash:

    private final Notifier<Task<?>> notifier = null;
    
    private <R> Future<R> add(final Task<R> task) {

        ExecutorService service = Executors.newCachedThreadPool();

        return service.submit(new Callable<R>() {
            @Override
            public R call() throws Exception {
                try {
                    R rtn = task.execute();
                    notifier.notifyRemove(TaskManager.this, this);
                    return rtn;
                } catch (Exception e) {
                    String err =  " Exception while executing task:  "  + task;
                    logger.log(Level.SEVERE, err, e);
                    throw new RuntimeException(err, e);
                }
            }
        });
    }

Where Notifier is defined as such:
public interface Notifier<T> {

    void notifyAdd(Object source, T... newObjects);

    void notifyUpdate(Object source, T... changedObjects);

    void notifyRemove(Object source, T... removedObjects);
}


REPRODUCIBILITY :
This bug can be reproduced always.
Comments
Not reproducible in either 8 or 9.
29-07-2014