Age | Commit message (Collapse) | Author |
|
|
|
|
|
hitting 'find callers' on a @Data annotation should find callers of the (static) constructor.
Right now it'll find callers to the *static* constructor ONLY. Letting it find callers of the public constructor if there is no static constructor just doesn't work.
|
|
|
|
If boolean fields already start with a typical getter prefix (is, has, or get), lombok's @Getter will no longer generate its own prefix as well, so a field named 'hasFoo' will result in a getter named 'hasFoo()', not 'isHasFoo()'.
Also, if any likely getter name already exists for a boolean, a getter will not be generated. Thus, if your field is called 'hasFoo', and you already have a method named 'isFoo', then @Getter will not generate anything (and warn, unless the getter is being generated due to @Data).
This last mechanism works by taking the field name *AND* any other likely base names (defined by the field name being named as prefix+baseName, with prefix being is/has/get), and then prefixing all the likely fieldnames with is/has/get, and checking if any method with that name exists.
Of course, this means weird things are going to happen if you have 2 fields named 'isFoo' and 'hasFoo', but then, you'd be a real idiot if you did that.
|
|
For whatever reason, the path to the javaagent in eclipse.ini on linux needs to be absolute.
|
|
JVM now correctly detects being on a mac, and using mac-specific code for finding and installing eclipses.
|
|
|
|
Honestly, we haven't tested it! Also updated instructions on how to
build the 64-bit version of the JVM, and generalized some of the loading
aspects of the DLL, as we now need to potentially try 2 of them.
|
|
A) FSUTIL is internationalized, so on non-english installs, we can't figure out if a disk is fixed.
B) I trust this better than fsutil for user control access (a.k.a. popups from hell) on vista.
C) fsutil.exe is in C:\windows\system32 so pretty sure it would be there, but there's always a chance it's not in the PATH, or otherwise not accessible.
|
|
User Action Control dialogs on vista, and has internationalized messages so fails to parse correctly on any non-english windows install.
|
|
lombok.jar to your eclipse projects, lets people get confused and think it can work without doing that.
|
|
bottom. This way, the icon showing up in dialog boxes doesn't look borked.
|
|
|
|
according to Roel, it looks better too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
platform path separator in installer "What do I do" text.
|
|
development environment
|
|
the class would generate errors regarding IllegalArgumentException in setSourcePosition in ASTNode.
|
|
generating it" warnings
when the getter/setter already there was in fact generated by lombok, and fixed a bug
in eclipse where a boolean array's getter method would be called isFoo() instead of getFoo().
|
|
Also fixed a bug in javac's toString() generation for the @Data constructor. It did
not include the transient fields.
|
|
upon anymore when reporting errors.
They were logging 4 or more identical warnings per problem before this change.
|
|
|
|
|
|
|
|
package, of course),
and fixed a showstopper bug in the installer that would add -javaagent:lombok.jar to
eclipse.ini, which is wrong of course; it needs to be lombok.eclipse.agent.jar.
|
|
|
|
especially the docs
on the lombok annotations in the lombok package need far more massaging.
Also added a feature to HandleSynchronized to not auto-generate the locker fields if
a specific name is provided (because, imagine you typoed those. You'd never find it!)
|
|
|
|
- some bug fixes for linux
- renamed InstallerWindow to Installer
- Apple-specific prettification added (dock icon, app name)
- more documentation.
Also, I started added an open source licence to all files.
|
|
and Mac OS X. Bumped the version number to celebrate, and changed build to roll the agent.jar into the main jar, and
change the executable class from the minimal help that was there to the installer. That minimal help thing (ShowUserHelp.java) is now gone.
|
|
|
|
|
|
that would show up rarely or not at all.
|
|
|
|
|
|
|
|
|
|
Spruced up @Cleanup's position settings and also forced initialization, because the error appears in a screwed up place if you don't, and we can't seem to move it.
|
|
|
|
anything else generates a warning.
|
|
the same thing for javac.
|
|
pretty big fix in making the loop detection algorithm far more robust. Still not sure what was the problem, but the robustificationization helped.
|
|
caused nested @Cleanup annotations to simply be ignored (rebuild was broken).
HandleCleanup seems to work swimmingly now on both targets. yay!
|
|
(exceptions from the cleanup call WILL mask exceptions from the body - this isn't intended, but it's just not possible to fix this without java 7 features or requiring a rewrite of the class file data.
Tried tactics, and why they won't work:
- Replace every 'return', 'break', and 'continue' statement (for the latter 2, only if they break/continue out of the try block) with a block that first sets a uniquely named flag before doing the operation.
Then, check that flag in the finally block to see if the cleanup call should be guarded by a try/catchThrowable. This doesn't work, because its not possible to instrument the 4th way out of a try block without throwing an exception: Just letting it run its course. Tossing a "#flag = true;" at the end may cause a compile time error if the code is not reachable, but figuring that out requires resolution and quite a bit of analysis.
- Put catch blocks in for all relevant exceptions (RuntimeException, Error, all exceptions declared as thrown by the method, and all types of exceptions of the catch blocks of encapsulating try blocks.
This doesn't work, partly because it'll fail for sneakily thrown exceptions, but mostly because you can't just catch an exception listed in the 'throws' clause of the method body; catching an exception
that no statement in the try block can throw is a compile time error, but it is perfectly allright to declare these as 'thrown'.
- Put in a blanket catch Throwable to set the flag. Two problems with this:
First, sneaky throw can't be done. Thread.stop invokes a security manager and triggers a warning, Calling a sneakyThrow method creates a runtime dependency on lombok, constructing a sneakyThrow in-class creates visible methods or at least visible class files, and creating a new class via Class.loadClass would be very slow without caching - which gets you the same issues.
Secondly, this would mean that any statements in the try body that throw an exception aren't flagged to the user as needing to be handled.
The Cleanup annotation now also calls the cleanup method for you, and will call it at the END of the current scope. The following plans have been tried and abandoned:
- Cleanup right after the final mention. This doesn't work, because the final mention may not be the final use-place. Example:
@Cleanup InputStream in = new FileInputStream(someFile);
InputStreamReader reader = new InputStreamReader(in);
reader.read(); //oops - in is already closed by now.
- Require an explicit var.cleanup() call and consider that the cue to close off the try block.
This doesn't work either, because now variables set in between the @Cleanup declaration and the var.cleanup() call become invisible to following statements. Example:
@Cleanup InputStream in = new FileInputStream(someFile);
int i = in.read();
in.close();
System.out.println(i); //fail - i is inside the generated try block but this isn't, so 'i' is not visible from here.
By running to the end of visible scope, all these problems are avoided. This does remove the flexibility of declaring where you want a close call to be executed, but there are two mitigating factors available:
1) Create an explicit scope block. You can just stick { code } in any place where you can legally write a statement, in java. This is relatively unknown, so I expect most users will go for:
2) Just call close explicitly. I've yet to see a cleanup method which isn't idempotent anyway (calling it multiple times is no different than calling it once).
During the course of investigating these options, the AST code has been extended to support live replacement of any child node, including updating the actual underlying system AST as well as our own.
Unfortunately, this code has NOT been tested. It was rather a lot of work so I'm leaving it in, and at least for eclipse it even seemed to work.
|