ether-camp / ethereum-harmony

DEPRECATED! Ethereum Independent Peer
GNU General Public License v3.0
253 stars 89 forks source link

Fix "Variable might not have been initialized" #89

Closed feiqihang closed 6 years ago

feiqihang commented 6 years ago

When I compile the project source code with IntelliJ IDEA, a compilation error "Variable XXX might not have been initialized" appears. My development environment is JDK1.8.

zilm13 commented 6 years ago

I guess it's something wrong with your lombok plugin settings. Init is not required here. Whole class is not valid in Java without lombok plugin generating class using this annotations. Also there are many other classes in project with variables not initialized according to Java but this thing should be overriden by Lombok plugin. Here's my Lombok settings, plugin version is 0.15.17.2 Do you have the same?

screen shot 2018-05-30 at 12 18 00
feiqihang commented 6 years ago

Yes, I also found out that this problem was caused by the missing Lombok plug-in. Everything was normal after the plug-in was installed. Thank you.