2014-03-02 12 views
1

我有一個問題,當我用maven編譯我的類。堆棧跟蹤看起來是這樣的:

[ERROR] Failure executing javac, but could not parse the error: 
[ERROR] An exception has occurred in the compiler (1.7.0_51). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you. 
[ERROR] java.lang.NullPointerException 
[ERROR] at com.sun.tools.javac.code.Symbol$ClassSymbol.isSubClass(Symbol.java:804) 
[ERROR] at com.sun.tools.javac.comp.Lower.accessClass(Lower.java:1023) 

這是相同的堆棧跟蹤像的oracle (JDK-6956758)官方錯誤頁面,但是這個bug與1.6.0_20遇到在2011-03-08得到解決,因爲你可以看到我的版本是1.7.0_51。我能做些什麼來擺脫這個問題。

回答

1

問題在於以下幾點。我有這樣的代碼:

public class Class extends AbstractClass { 
    public void increaseSomething(){ 
     super.something++; 
    } 

    public void addSomethingElse(int value){ 
     super.somethingElse += value; 
    } 
} 

我刪除了兩個超級的編譯器成功運行通過。我知道這是我的失敗,但如果編譯器可以打印出這樣的故障或者IDE可以,那將會很好。