-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArrayIndexOutOfBoundsException when using 'Actions on Save' in Eclipse with @Setter annotation #163
Comments
👤 nzipsi 🕗 Dec 19, 2009 at 09:20 UTC What steps will reproduce the problem? import lombok.AccessLevel; @ Data
} Put that into Eclipse, and set it up so that will do the following actions Format all lines, Make a change to the file and save it. It should generate the following java.lang.ArrayIndexOutOfBoundsException: 7 Now add in a new method. Can do whatever you want. e.g. private void Alternatively, remove the @ Setter annotation, or set the AccessLevel to e.g. @ javax.persistence.Column If you place another Annotation after @ Setter, the errors continue e.g. @ Setter(AccessLevel.PRIVATE) What is the expected output? What do you see instead? Expected to not see an error. What version of the product are you using? On what operating system? Lombok 0.9.2 from the Lombok Maven Repo, Ubuntu 9.04, Sun Java 1.6.0_16, Please provide any additional information below. Interestingly, the exact place where the AIOOBE occurs changes the more |
👤 mobile.uwe 🕗 Apr 19, 2010 at 07:00 UTC we face the exact same problem. |
👤 marc.schroetel 🕗 Apr 25, 2010 at 16:05 UTC So do I :/ |
👤 reinierz 🕗 Dec 31, 2010 at 21:33 UTC Issue #243 has been merged into this issue. |
👤 reinierz 🕗 Dec 31, 2010 at 21:36 UTC Lombok isn't going to be compatible with save actions for a while, unfortunately. Eclipse fundamentally doesn't grok the notion of AST nodes that are virtual. We'll fix it, eventually, by hiding them for these actions, but that's not an easy task, and some actions actually DO need to see them, such as code analysers, complicating the issue a lot. |
👤 grootjans 🕗 Jun 20, 2011 at 17:57 UTC Issue #236 has been merged into this issue. |
👤 mart788 🕗 Jul 19, 2011 at 15:33 UTC It would be good to know what specific formatters are causing this - if there is just one in particular I could turn it off for just that project for example. |
👤 BruceMFraser 🕗 Jul 26, 2011 at 05:13 UTC Disabling 'Format source code' under Window > Preferences > Java > Editor > Save Actions and manually formatting with Ctrl+Shift+F works for me. |
👤 amanic 🕗 Jul 26, 2011 at 06:28 UTC Sure that is a workaround, but 1) I keep on forgetting to do it and 2) when Comment ﹟7 on issue #163 by BruceMFr...@ gmail.com: issue #163 |
👤 dawid.chodura 🕗 Nov 15, 2011 at 09:08 UTC I have a similar problem. After creating a class and trying to save it, the window "Save Problems" shows up. After clicking "Details..." there is a message: A save participant caused problems. The only Save Action I have enabled is "Format source code". I do not have enabled "Organize imports" or "Additional actions". If I disable "Format source code" the problem does not occur. If I reenable "Format source code" the problem happens again. The code of the class: import lombok.Getter; public class A { I attach the StackTrace from Eclipse Error Log. Version of lombok: 0.10.1 and 0.10.2, downloaded from http://code.google.com/p/projectlombok/downloads/list |
👤 dawid.chodura 🕗 Nov 15, 2011 at 09:08 UTC |
👤 reinierz 🕗 Nov 15, 2011 at 13:58 UTC Thanks to another contributor (Jappe van der Hel, he's really been going toe to toe with various eclipse refactor scripts, cleanup actions, etc) I believe this is fixed now. (commit fd736cc and 1950820). Should be out in version after 0.10.2. Can all people affected by this give the latest edge build a whirl? Please report back here if formatting now works (or doesn't work!) You can find the edge release at: |
👤 reinierz 🕗 Nov 15, 2011 at 13:58 UTC |
👤 mart788 🕗 Nov 15, 2011 at 15:34 UTC Since I installed the edge build today, eclipse is hanging when I try to set a breakpoint. I know it doesnt seem related but it was working just fine yesterday before I updated lombok. |
👤 dawid.chodura 🕗 Nov 15, 2011 at 19:04 UTC I couldn't find any edge release on the page https://projectlombok.org/download-edge.html Can you post the direct URL to the edge release jar? |
👤 pe.fips 🕗 Nov 15, 2011 at 20:26 UTC 0.10.3 is the edge release.. |
👤 dawid.chodura 🕗 Nov 16, 2011 at 07:30 UTC I tested the "0.10.3 2011-11-15 1356 UTC" edge release. The formatting in Eclipse is working. I couldn't test it yesterday, because the page https://projectlombok.org/download-edge.html is somehow not accessible from Firefox 8.0 in Windows. It says "No edge build as been released since the last stable release of lombok." That's why I asked for the direct URL for the jar. I downloaded the page in IE9, Chrome and Firefox in Linux. I also downloaded the page with wget. It works in all the cases but it doesn't work in Firefox 8.0. I don't know why. |
👤 reinierz 🕗 Nov 21, 2011 at 23:02 UTC Now in release 0.10.4 |
👤 twisti4234 🕗 Jan 25, 2012 at 11:27 UTC Still broken in 10.6 for me |
End of migration |
…Handled Correctly" added check for existed builderMethods
Migrated from Google Code (issue 90)
The text was updated successfully, but these errors were encountered: