Skip to content

Commit

Permalink
[website] slight feature documentation updates (Just bringing them in…
Browse files Browse the repository at this point in the history
… line with reality)
  • Loading branch information
rzwitserloot committed Feb 8, 2022
1 parent 261758b commit 560ded5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 2 additions & 4 deletions website/templates/features/experimental/FieldDefaults.html
Expand Up @@ -10,14 +10,12 @@
<@f.experimental>
<ul>
<li>
New feature; unsure if this busts enough boilerplate.
</li><li>
Would be nice if you could stick this on the package-info.java package to set the default for all classes in that package.
</li><li>
Part of the work on @Value, which is experimental.
[UPDATE 2022-02-04] Currently simply having a <code>lombok.config</code> entry of <code>lombok.fieldDefaults.defaultPrivate = true</code> (or, analogously, <code>defaultFinal</code>) is enough to modify <em>every</em> source file that is affected by that configuration, even if said source file has absolutely no trace whatsoever of lombok anything inside it. We're not quite sure if this is a good idea. Our current point of view is that this is too much magic, and there is an alternative plan: meta-annotations. Until at least the meta-annotations idea has been explored and discarded, this feature will not be leaving <em>experimental</em> in its current state. Most likely, if it ever does, the <code>lombok.FieldDefaults</code> annotation will be <em>required</em>, though, you may set it via the to be built meta-annotation.
</li>
</ul>
Current status: <em>positive</em> - Currently we feel this feature may move out of experimental status with no or minor changes soon.
Current status: <em>neutral</em> - Currently we feel this feature may not move out of experimental status without changes.
</@f.experimental>

<@f.overview>
Expand Down
Expand Up @@ -48,6 +48,8 @@
There is a very slight functional difference: Normally, invoking <code>new SomeException(message, null)</code> will initialize
the cause to be <em>no cause</em>, and this cannot be later changed by invoking <code>initCause</code>. However, lombok's
standard exceptions <strong>do</strong> let you overwrite an explicit no-cause with <code>initCause</code> later.
</p><p>
A second slight functional difference: Normally, invoking <code>new SomeException(cause)</code>, if implemented as <code>super(cause);</code>, will set the message to be equal to the message of the cause. However, lombok does not do this - it leaves the exception as having no message at all. We think inheriting the message is fundamentally wrong - messages are not guaranteed to be sensible in the absence of the context of the exception-type. The cause ought to be listed anywhere where it is relevant; if you are using messages as direct user feedback (which is rare, in the java community), <code>@StandardException</code> can't really help you anyway; the infrastructure of e.g. <code>getLocalizedMessage()</code> is too complicated.
</p>
</@f.smallPrint>
</@f.scaffold>
7 changes: 3 additions & 4 deletions website/templates/features/experimental/index.html
Expand Up @@ -28,10 +28,6 @@
</p>
</div>
<div class="row">
<@main.feature title="var" href="var">
Modifiable local variables with a type inferred by assigning value.
</@main.feature>

<@main.feature title="@Accessors" href="Accessors">
A more fluent API for getters and setters.
</@main.feature>
Expand Down Expand Up @@ -101,6 +97,9 @@ <h3 class="text-center">Putting the "Ex" in "Experimental": promoted or deleted
<@main.feature title="@Wither: renamed to @With, and promoted" href="/features/With">
Immutable 'setters' - methods that create a clone but with one changed field.
</@main.feature>
<@main.feature title="var" href="/features/var">
Modifiable local variables with a type inferred by assigning value.
</@main.feature>
</div>
</div>
</div>
Expand Down

0 comments on commit 560ded5

Please sign in to comment.