Skip to content
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

[jsscripting] Minor fixes & improvements #13960

Merged
merged 4 commits into from
Dec 20, 2022

Conversation

florian-h05
Copy link
Contributor

@florian-h05 florian-h05 commented Dec 15, 2022

Fixes #13950.

Description

Completes a few minor improvements and fixes that were left over from #13924:

  • Make sure to also unlock the ReentrantLock on exceptions from all synchronized ScriptEngine methods
  • Fix the wrong implementation of createScriptEngine

For more details, please have a look at the commits (messages).

Testing

This shouldn't change the behaviour of the addon, but anyway I tested this (not extensively), works fine.

@J-N-K I've fixed the createScriptEngine implementation.
@jpg0 I made sure that all exceptions are handled and the lock is removed. I also call the super methods from their overrides.

Reference openhab#13924 (comment).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Reference openhab#13924 (comment).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 changed the title Jsscripting minor improvements [jsscripting] Minor improvements & fixes Dec 15, 2022
@jlaur jlaur requested review from J-N-K and a team December 15, 2022 20:06
@jpg0
Copy link
Contributor

jpg0 commented Dec 16, 2022

Great! You may want to extract out the exception processing into a single method, such as:

private void processAndThrow(Exception e) throws ScriptException {
        Exception processed = afterThrowsInvocation(e);

        if(processed instanceof ScriptException) {
            throw (ScriptException) processed;
        } else {
            throw new UndeclaredThrowableException(processed);
        }
}

so that you can just:

    public Object eval(Reader reader, ScriptContext scriptContext) throws ScriptException {
        try {
            beforeInvocation();
            return afterInvocation(super.eval(reader, scriptContext));
        } catch (Exception e) {
            processAndThrow(e);
        }
    }

And not have to repeat the exception logic for each method.

Either way I'm happy though.

@florian-h05
Copy link
Contributor Author

florian-h05 commented Dec 16, 2022

FYI I‘ve switched from the e instanceof XXXException checks to catch (XXXException e) since SAT showed warnings. I can try out what SAT does when I introduce a exception processing method.

@jpg0 Although I'd prefer to extract that, it's not possible because we are then missing the return statement and therefore get a compilation failure: [61,19] This method must return a result of type java.lang.Object.

As your are also happy with the current state, let's keep and get this merged.

@florian-h05
Copy link
Contributor Author

@jlaur Can you please merge this? @jpg0 is happy with the changes.

@jpg0
Copy link
Contributor

jpg0 commented Dec 16, 2022

@jpg0 Although I'd prefer to extract that, it's not possible because we are then missing the return statement and therefore get a compilation failure: [61,19] This method must return a result of type java.lang.Object.

One option is to throw an InternalError or AssertionError but it's debatable whether that's better style, happy to keep as-is.

(It's awkward because the throws clause in a Java method allows declaring an implicit union-type of exception classes via multiple exception types, but the language itself doesn't actually support union types, making it impossible to return rather than throw the same set of exception types.)

@florian-h05
Copy link
Contributor Author

@kaikreuzer Please consider to merge this before the release candidate is published and we have a code freeze.

@florian-h05 florian-h05 added the bug An unexpected problem or unintended behavior of an add-on label Dec 16, 2022
@florian-h05 florian-h05 changed the title [jsscripting] Minor improvements & fixes [jsscripting] Minor fixes & improvements Dec 16, 2022
@jlaur
Copy link
Contributor

jlaur commented Dec 17, 2022

@florian-h05 - we have a code freeze now. However, perhaps you can help me with some clarifications, because it's not obvious to me which concrete issue is resolved with this PR. From the linked issue two issues are mentioned:

@J-N-K commented in #13924 (comment) on GraalJSScriptEngineFactory:
In general this implementation is wrong, you should check whether the requested scriptType is supported by the factory and return null if it is not. However, that is beyond the scope here, just noticed it.

The way I read this, is that it's a design flaw, but the implementation in current state will work (for now), so it's more like a technical improvement?

@jpg0 commented in #13924 (comment) on InvocationInterceptingScriptEngineWithInvocableAndAutoCloseable:
There are two other issues*, but maybe we should look at them another time; I don't want to hold this up any longer and they are not things that are hard to change later.

I also read this as a matter which is not urgent to fix?

So my conclusion is that #13924 already contained the "MVP" fixes needed for the release, while the mentioned two mentioned left-overs were intentionally left to be fixed later, because we wanted to merge the PR without further delay.

Therefore, and please correct me if I'm wrong, it seems we should not risk merging this PR before the release, as it could cause regressions which we have no time to discover and fix. Cc @jpg0, @J-N-K, @kaikreuzer

@florian-h05 florian-h05 removed the bug An unexpected problem or unintended behavior of an add-on label Dec 17, 2022
@kaikreuzer
Copy link
Member

I agree with @jlaur - we can only merge really critical fixes now and unless we are talking about something severely broken right now, we should not take the risk of a merge.

@florian-h05
Copy link
Contributor Author

florian-h05 commented Dec 17, 2022

@jlaur

The way I read this, is that it's a design flaw, but the implementation in current state will work (for now), so it's more like a technical improvement?

You are absolutely right, it‘s a design flaw but in fact it is working fine for 1 year on my system, so it‘s only a technical improvement.

I also read this as a matter which is not urgent to fix?

You are again right. This is again more a technical improvement, because ScriptEngine.eval should not throw anything other than a ScriptException and this one is already covered.
I guess if we got any other exception here, we have other problems with JS Scripting than a deadlocked script.

My intention behind this PR was to get these technical improvements into the RC1 to battle-test them, but I now totally agree with both of you (also @kaikreuzer) that we shouldn‘t risk a merge now. So let‘s wait for the release and then merge after it.

The current implementation works fine, this PR only improves it a bit from the technical side.

@J-N-K
Copy link
Member

J-N-K commented Dec 17, 2022

This is correct. The factory should not be called with an incompatible script type (that would be a bug in core) but if that was the case (which is not ATM), then it should return null and not a script engine that can't handle the requested script type.

@florian-h05
Copy link
Contributor Author

@kaikreuzer Documentation & translations updates shouldn‘t be a problem, correct?

@kaikreuzer
Copy link
Member

@kaikreuzer Documentation & translations updates shouldn‘t be a problem, correct?

Yes, that should be fine.

@florian-h05
Copy link
Contributor Author

@jlaur
Since the stable is released I’d guess the code freeze is over and we can merge this?

@jlaur
Copy link
Contributor

jlaur commented Dec 19, 2022

@jpg0 - can you do a final review of this PR and approve if it looks good to you?

Copy link
Contributor

@jpg0 jpg0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A single minor issue, other than that it lgtm

@jpg0
Copy link
Contributor

jpg0 commented Dec 19, 2022

@jlaur I've submitted my review, however I don't have access to approve/merge.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05
Copy link
Contributor Author

@jpg0 Done, see 9289764.
@jlaur I addressed the review.

@florian-h05
Copy link
Contributor Author

@kaikreuzer I think @jpg0 is missing in the contributors group and therefore can't review PRs and also is not automatically requested for review here although he is a codeowner.

Can you please add him to the contributors group?

Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@florian-h05
Copy link
Contributor Author

The build is failing, seems like the missing openHAB 4.0.0 artifactes are the problem.
My local build is working fine.

@jlaur
Copy link
Contributor

jlaur commented Dec 19, 2022

@florian-h05 - yes, we might need the nightly core build first. This is not the only PR having this issue.

@jlaur jlaur added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Dec 19, 2022
@florian-h05
Copy link
Contributor Author

@jlaur All builds except the Java 11 build succeeded. The Java 11 build has been removed a few minutes ago, I think we can therefore ignore its failure.

@jlaur jlaur merged commit 4d98cca into openhab:main Dec 20, 2022
@jlaur jlaur added this to the 4.0 milestone Dec 20, 2022
@florian-h05 florian-h05 deleted the jsscripting-minor-improvements branch December 20, 2022 12:15
andrasU pushed a commit to andrasU/openhab-addons that referenced this pull request Dec 24, 2022
* [jsscripting] Correct wrong `createScriptEngine` implementation
* [jsscripting] Also unlock lock on unexpected exceptions (rethrow them)
* [jsscripting] Call super methods from their overrides
* [jsscripting] Move superclass call of `beforeInvocation`

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
dougculnane pushed a commit to dougculnane/openhab-addons that referenced this pull request Dec 26, 2022
* [jsscripting] Correct wrong `createScriptEngine` implementation
* [jsscripting] Also unlock lock on unexpected exceptions (rethrow them)
* [jsscripting] Call super methods from their overrides
* [jsscripting] Move superclass call of `beforeInvocation`

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Doug Culnane <doug@culnane.net>
andrewfg added a commit to andrewfg/openhab-addons that referenced this pull request Dec 27, 2022
commit 1df693a
Author: lsiepel <leosiepel@gmail.com>
Date:   Tue Dec 27 16:27:19 2022 +0100

    [bluetooth.am43] null annotations (openhab#13972)

    * null annotations forbidden package
    * improve createChecksum
    * spotless + typo

    Signed-off-by: lsiepel <leosiepel@gmail.com>

commit 8b1d0fc
Author: lsiepel <leosiepel@gmail.com>
Date:   Tue Dec 27 16:16:55 2022 +0100

    null annotations - checkstyle (openhab#13979)

    Signed-off-by: Leo Siepel <leosiepel@gmail.com>

commit df6454e
Author: lsiepel <leosiepel@gmail.com>
Date:   Tue Dec 27 16:13:12 2022 +0100

    minro checkstyle (openhab#13977)

    Signed-off-by: Leo Siepel <leosiepel@gmail.com>

commit 9687c3d
Author: Jiri Kraus <jkraus@nvidia.com>
Date:   Tue Dec 27 16:08:12 2022 +0100

    [velux] Updated Discovery instructions for scenes and actuators (openhab#14009)

    * Updated Discovery instructions for scenes and actuators

    Updated Discovery instructions as after KLF200 is auto discovered and configured discovery of scenes and actuators need to be manually triggered.

    * @jirikraus Updated Discovery instructions for scenes and actuators

    Formatting update to address comment from @andrewfg.

commit 35e930c
Author: lsiepel <leosiepel@gmail.com>
Date:   Tue Dec 27 12:56:43 2022 +0100

    [astro] Added moon phase precision (openhab#14067)

    * add more precision to MoonPhase.Age

    Signed-off-by: lsiepel <leosiepel@gmail.com>

commit 4a98295
Author: mlobstein <michael.lobstein@gmail.com>
Date:   Tue Dec 27 05:54:26 2022 -0600

    [nuvo] Auto update source channel for grouped zones (openhab#14012)

    * Auto update source channel for grouped zones

    Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>

commit e39e691
Author: Cody Cutrer <cody@cutrer.us>
Date:   Tue Dec 27 03:55:12 2022 -0700

    [homekit] support Rollershutter items for HoldPosition (openhab#14045)

    * [homekit] support Rollershutter items for HoldPosition

    just send STOP to them

    * [homekit] log a warning for incompatible HoldPosition items

    Signed-off-by: Cody Cutrer <cody@cutrer.us>

commit 0b59be6
Author: Jacob Laursen <jacob-github@vindvejr.dk>
Date:   Tue Dec 27 11:41:59 2022 +0100

    Skip loading/migrating items with invalid name (openhab#14054)

    Fixes openhab#14053

    Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

commit e7938ae
Author: Holger Friedrich <holgerfriedrich@users.noreply.github.com>
Date:   Tue Dec 27 10:55:15 2022 +0100

    [rrd4j] Improve logging of exceptions thrown by getDB (openhab#14068)

    Add exception message for better identification of root cause.

    Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>

commit e5f30b1
Author: Tim Harper <tharper@d2iq.com>
Date:   Tue Dec 27 02:25:28 2022 -0700

    [tplinksmarthome] Document sending raw commands to devices (openhab#14062)

    Signed-off-by: Tim Harper <timcharper@gmail.com>

    Signed-off-by: Tim Harper <timcharper@gmail.com>

commit 1c5b794
Author: lsiepel <leosiepel@gmail.com>
Date:   Mon Dec 26 17:00:53 2022 +0100

    [airvisualnode] Add null annotations (openhab#13895)

    * Add null annotation

    Signed-off-by: Leo Siepel <leosiepel@gmail.com>

commit 88c0b72
Author: Wouter Born <github@maindrain.net>
Date:   Mon Dec 26 15:27:03 2022 +0100

    [jsscriptingnashorn] JavaScript Scripting Nashorn Automation  (openhab#14013)

    * [jsscriptingnashorn] JavaScript Scripting Nashorn Automation

    This add-on allows you to use your older JavaScript (ECMAScript 5.1) rules on newer Java versions until they are migrated to JavaScript (ECMAScript 2021+).
    The add-on uses a standalone [Nashorn Engine](https://github.com/openjdk/nashorn) which was part of Java until it was removed in Java 15.

    * Update parent to 3.4.0-SNAPSHOT and nashorn-core to 15.4

    For the Nashorn changelog, see:

    https://github.com/openjdk/nashorn/blob/main/CHANGELOG.md

    * Update parent to 4.0.0-SNAPSHOT
    * Remove removeUnsupportedNashornArgs
    * Update scriptTypes
    * Add CODEOWNERS entry
    * Recycle ScriptScopeOSGiTest.java

    It got removed in openhab/openhab-core#2994

    * Remove redundant new line from pom.xml

    Signed-off-by: Wouter Born <github@maindrain.net>

commit 605574b
Author: Hilbrand Bouwkamp <hilbrand@h72.nl>
Date:   Mon Dec 26 10:17:42 2022 +0100

    Set openHAB to correct version in binding skeleton scripts. (openhab#14061)

    Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>

commit 6cd59e4
Author: Jørgen Austvik <jaustvik@acm.org>
Date:   Sun Dec 25 20:56:04 2022 +0100

    [nanoleaf] More robust caching of layout (openhab#13998)

    * [nanoleaf] More robust caching of layout

    This is a bugfix/enhancement to make sure the caching of the layout
    (to save it from being recalculated) works better:
    - Only save previous layout if indeed painted
    - Only save layout from the layout update, not the display state
    - Recalculate anyway if current state is null

    * Bugfix: Update colors

    When Stefan runs, the getBridge() returns null, when Jørgen runs, is doesn't. But it isn't needed, because we
    are already in the handler, so just call own methods.

    Improvement: Less draws when updating colors

    Instead of drawing the picture for each panel (which gave a cool effect), draw only once when we have parsed all color data.

    Signed-off-by: Jørgen Austvik <jaustvik@acm.org>

commit 0357049
Author: Holger Friedrich <holgerfriedrich@users.noreply.github.com>
Date:   Sat Dec 24 12:11:28 2022 +0100

    [knx] Fix SAT warnings (openhab#14052)

    Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>

commit f619798
Author: Cody Cutrer <cody@cutrer.us>
Date:   Fri Dec 23 16:00:57 2022 -0700

    [lifx] Handle and provide QuantityType for color-temperature-abs channel (openhab#14025)

    See openhab/openhab-core#3129

    Signed-off-by: Cody Cutrer <cody@cutrer.us>

commit b62e145
Author: Cody Cutrer <cody@cutrer.us>
Date:   Fri Dec 23 15:41:44 2022 -0700

    [homekit] Allow configuring secondary services as members of a group (openhab#13879)

    * [homekit] allow configuring secondary services as members of a group

    Required introduction of AccessoryGroup to represent the base
    AccessoryInformationService for ease of configuring multiple of the
    same service.

    This is also "breaking" in that someone who previously had HomeKit
    accessories nested directly inside of a group that was itself a
    HomeKit accessory will now have those items grouped within the Home
    app.

    * [homekit] combine multiple readme sections on complex accessories

    Signed-off-by: Cody Cutrer <cody@cutrer.us>

commit b1d4c40
Author: Wouter Born <github@maindrain.net>
Date:   Fri Dec 23 14:10:58 2022 +0100

    Remove JavaScript Transformation pom.xml (openhab#14048)

    Everything except for this pom.xml got removed in openhab#13276

    Signed-off-by: Wouter Born <github@maindrain.net>

commit 7c2d5dc
Author: Cody Cutrer <cody@cutrer.us>
Date:   Thu Dec 22 16:16:55 2022 -0700

    [homekit] implement List-Pairings method (openhab#13982)

    * [homekit] implement List-Pairings method
    * [homekit] fix listUsers() method
    * [homekit] bump HAP-java to 2.0.5

    refs openhab#13949

    Signed-off-by: Cody Cutrer <cody@cutrer.us>

commit fbf302e
Author: Wouter Born <github@maindrain.net>
Date:   Fri Dec 23 00:13:17 2022 +0100

    Use HTTPS in pom.xml where possible (openhab#14044)

    Signed-off-by: Wouter Born <github@maindrain.net>

commit 14c8b39
Author: Andreas Berger <Andy2003@users.noreply.github.com>
Date:   Thu Dec 22 21:17:07 2022 +0100

    [fineoffsetweatherstation] Fix QuantityType for rain-rate (openhab#14039)

    A community member realized, that the used unit for rain-rate was wrong (https://community.openhab.org/t/fine-offset-weather-station-binding-discussion/134167/153)
    Rain rate is measured in mm/h and so it is not a `VolumetricFlowRate` but a `Speed`.

    Additionally, I added some details to the doc.

    Signed-off-by: Andreas Berger <andreas@berger-freelancer.com>

commit af16d52
Author: Wouter Born <github@maindrain.net>
Date:   Thu Dec 22 18:21:13 2022 +0100

    Fix "Hello, World!" examples in automation documentation (openhab#14041)

    The documentation states incorrectly that "Hello, World!" is printed when instead "Hello world!" is printed.

    Signed-off-by: Wouter Born <github@maindrain.net>

commit 7195825
Author: lolodomo <lg.hc@free.fr>
Date:   Thu Dec 22 18:17:15 2022 +0100

    [keba] Fix unit in example for power channel (openhab#14031)

    Related to openhab#12529

    Signed-off-by: Laurent Garnier <lg.hc@free.fr>

commit 16fcd5d
Author: lsiepel <leosiepel@gmail.com>
Date:   Thu Dec 22 09:04:50 2022 +0100

    nul;l annotations and codestyle (openhab#13980)

    Signed-off-by: lsiepel <leosiepel@gmail.com>

commit fb31c14
Author: lsiepel <leosiepel@gmail.com>
Date:   Thu Dec 22 08:58:12 2022 +0100

    [bluetooth.govee] null annotations (openhab#13978)

    * null annotations and checkstyle
    * Fix more warnings

    Signed-off-by: lsiepel <leosiepel@gmail.com>

commit a079603
Author: Cody Cutrer <cody@cutrer.us>
Date:   Wed Dec 21 16:37:26 2022 -0700

    [homekit] allow configuring min/max light level (openhab#14034)

    since the default is weirdly 0.0001, yet my sensors can report a
    straight 0.

    Signed-off-by: Cody Cutrer <cody@cutrer.us>

commit 462dca8
Author: Cody Cutrer <cody@cutrer.us>
Date:   Wed Dec 21 16:31:05 2022 -0700

    [homekit] update AuthInfo objects when blockUserDeletion changes (openhab#14017)

    * [homekit] update AuthInfo objects when blockUserDeletion changes

    Signed-off-by: Cody Cutrer <cody@cutrer.us>

    * [homekit] general cleanup of redundant method call and unused local vars

    Signed-off-by: Cody Cutrer <cody@cutrer.us>

    Signed-off-by: Cody Cutrer <cody@cutrer.us>

commit 672b60b
Author: Cody Cutrer <cody@cutrer.us>
Date:   Wed Dec 21 14:43:46 2022 -0700

    [nanoleaf] Handle and provide QuantityType for color-temperature-abs channel (openhab#14026)

    * [nanoleaf] handle and provide QuantityType for color-temperature-abs channel

    see openhab/openhab-core#3129

    Signed-off-by: Cody Cutrer <cody@cutrer.us>

commit df8e0bb
Author: Cody Cutrer <cody@cutrer.us>
Date:   Wed Dec 21 12:21:53 2022 -0700

    [dali] tweak color temperature abs QuantityType fix (openhab#14029)

    adds an example of usage of the channel to the README, and
    simplifies one method call

    Signed-off-by: Cody Cutrer <cody@cutrer.us>

commit a0c2c76
Author: Christoph Weitkamp <github@christophweitkamp.de>
Date:   Wed Dec 21 20:10:21 2022 +0100

    [hue] Allow handling of QuantityType for color temperature channel (openhab#14024)

    * Allow handling of QuantityType for color temperature channel
    * Fixed log messages and reduce log level.

    Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>

commit 528140d
Author: Christoph Weitkamp <github@christophweitkamp.de>
Date:   Wed Dec 21 17:24:57 2022 +0100

    [darksky] Remove DarkSky binding due to EOL of their API (openhab#13037)

    * Remove DarkSky binding due to EOL of their API

    Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>

commit 324483d
Author: Cody Cutrer <cody@cutrer.us>
Date:   Tue Dec 20 13:15:10 2022 -0700

    [dali] handle and provide QuantityType for color-temperature-abs channel (openhab#14021)

    see openhab/openhab-core#3129

    Signed-off-by: Cody Cutrer <cody@cutrer.us>

commit 4d98cca
Author: Florian Hotze <florianh_dev@icloud.com>
Date:   Tue Dec 20 09:15:43 2022 +0100

    [jsscripting] Minor fixes & improvements (openhab#13960)

    * [jsscripting] Correct wrong `createScriptEngine` implementation
    * [jsscripting] Also unlock lock on unexpected exceptions (rethrow them)
    * [jsscripting] Call super methods from their overrides
    * [jsscripting] Move superclass call of `beforeInvocation`

    Signed-off-by: Florian Hotze <florianh_dev@icloud.com>

commit cd9e1b0
Author: J-N-K <github@klug.nrw>
Date:   Tue Dec 20 08:11:31 2022 +0100

    Fix build / Resolve itests (openhab#14018)

    * Fix build / Resolve itests
    * Remove Java 11 from GHA matrix

    Also-by: Wouter Born <github@maindrain.net>
    Signed-off-by: Jan N. Klug <github@klug.nrw>

commit 0b1eb2c
Author: lsiepel <leosiepel@gmail.com>
Date:   Tue Dec 20 00:06:52 2022 +0100

    null annotations (openhab#13976)

    Signed-off-by: Leo Siepel <leosiepel@gmail.com>

commit 1519cb4
Author: lsiepel <leosiepel@gmail.com>
Date:   Tue Dec 20 00:04:43 2022 +0100

    nul annotations, checkstyle, forbidden packagel (openhab#13981)

    Signed-off-by: lsiepel <leosiepel@gmail.com>

commit 40b8b77
Author: lsiepel <leosiepel@gmail.com>
Date:   Tue Dec 20 00:01:50 2022 +0100

    Very minor checkstyle (openhab#13973)

    Signed-off-by: Leo Siepel <leosiepel@gmail.com>

commit 127f998
Author: Jacob Laursen <jacob-github@vindvejr.dk>
Date:   Mon Dec 19 23:49:51 2022 +0100

    Upgrade MySQL Connector/J to 8.0.31 (openhab#13991)

    Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

commit 3bec273
Author: Holger Friedrich <holgerfriedrich@users.noreply.github.com>
Date:   Mon Dec 19 22:58:43 2022 +0100

    [rrd4j] Upgrade base library from 3.8.1 to 3.8.2 (openhab#13956)

    Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>

commit 3aefefb
Author: Holger Friedrich <holgerfriedrich@users.noreply.github.com>
Date:   Mon Dec 19 22:49:40 2022 +0100

    [knx] Upgrade Calimero library to release 2.5.1 (openhab#14015)

    Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>

commit 9f3b8e1
Author: J-N-K <github@klug.nrw>
Date:   Mon Dec 19 20:39:42 2022 +0100

    Raise minimum JDK version to 17 (openhab#13276)

    Signed-off-by: Jan N. Klug <github@klug.nrw>

commit 4d6d644
Author: J-N-K <github@klug.nrw>
Date:   Mon Dec 19 15:22:17 2022 +0100

    fix spotless after release (openhab#14014)

    Signed-off-by: Jan N. Klug <github@klug.nrw>

commit 7993786
Author: openhab-bot <infrastructure@openhabfoundation.org>
Date:   Mon Dec 19 00:55:11 2022 +0000

    [unleash-maven-plugin] Preparation for next development cycle.

commit c5b68d0
Author: Jacob Laursen <jacob-github@vindvejr.dk>
Date:   Sun Dec 18 23:22:40 2022 +0100

    Fix NullPointerException (openhab#14010)

    Fixes openhab#13961

    Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

commit 4871d6d
Author: Wouter Born <github@maindrain.net>
Date:   Sun Dec 18 19:50:23 2022 +0100

    [shelly] Remove broken images (openhab#14007)

    See also openhab#13993

    Signed-off-by: Wouter Born <github@maindrain.net>

commit 8d65371
Author: Wouter Born <github@maindrain.net>
Date:   Sun Dec 18 19:49:42 2022 +0100

    [shelly] Remove broken images (openhab#14007)

    See also openhab#13993

    Signed-off-by: Wouter Born <github@maindrain.net>

commit 3613799
Author: Kai Takac <kai.takac@gmail.com>
Date:   Sun Dec 18 19:04:43 2022 +0100

    [jdbc] Update org.xerial/sqlite-jdbc to 3.40.0.0 (openhab#14003)

    * [jdbc] Update org.xerial/sqlite-jdbc to 3.40.0.0

    Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
    Signed-off-by: Kai Takac <kai.takac@gmail.com>

commit ef836a1
Author: Дилян Палаузов <git-dpa@aegee.org>
Date:   Sun Dec 18 15:18:24 2022 +0200

    typos: success, successful (openhab#13997)

commit 6b1354f
Author: openhab-bot <bot@openhab.org>
Date:   Sun Dec 18 14:02:15 2022 +0100

    New Crowdin updates (openhab#13999)

    * New translations iCloud.properties (French)

    * New translations openwebnet.properties (Italian)

    * New translations plugwise.properties (Dutch)

commit 6dd8cd5
Author: MikeTheTux <44850211+MikeTheTux@users.noreply.github.com>
Date:   Sun Dec 18 13:35:08 2022 +0100

    fixed potential StringIndexOutOfBoundsExceptions (openhab#14000)

    fixed compiler warnings

    Signed-off-by: Michael Weger <weger.michael@gmx.net>

commit debdfa5
Author: Holger Friedrich <holgerfriedrich@users.noreply.github.com>
Date:   Sun Dec 18 11:55:59 2022 +0100

    [wolfsmartset] Fix link to external documentation (openhab#13996)

    Update link to current document from Wolf download center.
    Fixes openhab#13995.

    Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>

commit 9b89130
Author: Jacob Laursen <jacob-github@vindvejr.dk>
Date:   Sun Dec 18 10:22:07 2022 +0100

    Fix alignment/indentation (openhab#13994)

    Fixes openhab#13882

    Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

commit d03d3e4
Author: Wouter Born <github@maindrain.net>
Date:   Sat Dec 17 23:53:57 2022 +0100

    Show add-on intros in Main UI (openhab#13992)

    Using these Markdown tweaks a small intro will show in Main UI instead of emptyness and a "more" button.

    Signed-off-by: Wouter Born <github@maindrain.net>

commit 6753234
Author: Jacob Laursen <jacob-github@vindvejr.dk>
Date:   Sat Dec 17 17:25:38 2022 +0100

    Fix Zigbee name stylization (openhab#13954)

    Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

commit d20b103
Author: openhab-bot <bot@openhab.org>
Date:   Sat Dec 17 16:51:35 2022 +0100

    New Crowdin updates (openhab#13990)

    * New translations tr064.properties (German)
    * New translations jsscripting.properties (Danish)
    * New translations jsscripting.properties (Italian)

commit 15e6beb
Author: Florian Hotze <florianh_dev@icloud.com>
Date:   Sat Dec 17 15:42:23 2022 +0100

    [yamaha] README: Recommend correct binding for specific model (openhab#13985)

    This doc improvement tries to avoid future issue like openhab#10838.

    Signed-off-by: Florian Hotze <florianh_dev@icloud.com>

commit 11e2c4f
Author: Florian Hotze <florianh_dev@icloud.com>
Date:   Sat Dec 17 13:40:12 2022 +0100

    [jsscripting] Update add-on name in default translation (openhab#13984)

    Leftover from openhab#13764.

    Signed-off-by: Florian Hotze <florianh_dev@icloud.com>

commit 4a13e1a
Author: openhab-bot <bot@openhab.org>
Date:   Sat Dec 17 12:13:24 2022 +0100

    New Crowdin updates (openhab#13971)

    * New translations knx.properties (German)
    * New translations yamahamusiccast.properties (German)
    * New translations hdpowerview.properties (Danish)
    * New translations jsscripting.properties (Danish)

commit 23875a6
Author: Wouter Born <github@maindrain.net>
Date:   Fri Dec 16 11:22:48 2022 +0100

    [mapdb] Fix "a" typo and use "-" for bullets in docs (openhab#13966)

    Signed-off-by: Wouter Born <github@maindrain.net>

commit ab504bc
Author: Dan Cunningham <dan@digitaldan.com>
Date:   Thu Dec 15 23:31:02 2022 -0800

    [hydrawise] fixes null pointer error for some sprinkler controllers (openhab#13965)

    Signed-off-by: Dan Cunningham <dan@digitaldan.com>

commit 15ad22b
Author: Wouter Born <github@maindrain.net>
Date:   Thu Dec 15 23:39:37 2022 +0100

    [mapdb] Add some documentation (openhab#13964)

    This is based on the original OH1 documentation.

    Signed-off-by: Wouter Born <github@maindrain.net>

commit d6db727
Author: openhab-bot <bot@openhab.org>
Date:   Thu Dec 15 23:36:49 2022 +0100

    New Crowdin updates (openhab#13962)

    * New translations chromecast.properties (Italian)
    * New translations sonos.properties (Italian)
    * New translations exec.properties (Italian)
    * New translations knx.properties (German)
    * New translations jsscripting.properties (German)
    * New translations yamahamusiccast.properties (German)

commit c75b04e
Author: Wouter Born <github@maindrain.net>
Date:   Thu Dec 15 22:40:52 2022 +0100

    [wundergroundupdatereceiver] Prevent 😕 showing in documentation (openhab#13963)

    See: https://www.openhab.org/addons/bindings/wundergroundupdatereceiver/

    Signed-off-by: Wouter Born <github@maindrain.net>

commit 9318f6f
Author: Holger Friedrich <holgerfriedrich@users.noreply.github.com>
Date:   Thu Dec 15 16:22:43 2022 +0100

    [knx] Minor documentation update (openhab#13918)

    Slightly change wording of docs related to localSourceAddress to avoid
    address conflicts during initial setup.
    Add remark about knxd.
    Fixes openhab#13602.

    Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>

commit 83f0f7a
Author: Wouter Born <github@maindrain.net>
Date:   Thu Dec 15 12:28:32 2022 +0100

    Prevent Markdown rendering issues in Main UI (openhab#13958)

    Some add-ons use `---` separators which causes issues when rendering the documentation in Main UI.

    Fixes openhab#13953

    Signed-off-by: Wouter Born <github@maindrain.net>

commit 6ab0561
Author: Holger Friedrich <holgerfriedrich@users.noreply.github.com>
Date:   Thu Dec 15 11:31:20 2022 +0100

    [rrd4j] Error handling for broken rrd4j files (openhab#13955)

    * [rrd4j] Error handling for broken rrd4j files

    Catch exceptions thrown by getDB(..) and print the name of the affected
    database file. This allows to identify a broken rrd4j file.

    Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>

commit 04f059c
Author: Simon Spielmann <simon.spielmann@gmx.de>
Date:   Thu Dec 15 09:18:11 2022 +0100

    [icloud] Rework authentication to reflect changes in iCloud API (openhab#13691)

    * Implement Authentication (WIP)
    * Validation Code accepted
    * Refactor session state
    * RefreshClient working
    * Implement session persistence in openhab store
    * Integration in binding
    * Remove persistent cookies, which break authentication
    * Bugfixing
    * Add code configuration to UI
    * Improve documentation, error-handling and cleanup
    * Rework auth order
    * Rework auth process
    * Add 2-FA-auth to documentation
    * Set bridge to online if data refresh works
    * Case-sensitive rename ICloudAPIResponseException
    * Include authentication in refresh flow
    * Fix regression for data not being updated
    * Fix typo in i18n props
    * Fix review and checkstyle.
    * More javadoc, new RetryException
    * Introduce @NonNullByDefault
    * Introduce server for RetryException, add NonNullbyDefault, fix warnings
    * Rework for contribution, e.g. null checks, ...
    * Fix checkstyle
    * Move JsonUtils to utilities package
    * Async initialize bridge handler.
    * Report Device OFFLINE if Bridge is OFFLINE
    * Set bridge thing status to UNKOWN in init
    * Move refresh init into async init
    * Cancel init task in dispose

    Also-by: Leo Siepel <leosiepel@gmail.com>
    Signed-off-by: Simon Spielmann <simon.spielmann@gmx.de>

commit 6e8b35c
Author: Wouter Born <github@maindrain.net>
Date:   Thu Dec 15 07:51:22 2022 +0100

    [jsscripting] Fix broken event object table (openhab#13952)

    The table is not properly rendered when reading the documentation in Main UI.

    Signed-off-by: Wouter Born <github@maindrain.net>

commit 79060f3
Author: Jørgen Austvik <jaustvik@acm.org>
Date:   Wed Dec 14 20:15:47 2022 +0100

    [nanoleaf] Bugfix: Handle non-integer panel ids (openhab#13951)

    Panel ids are sometimes returned as BigInteger

    We haven't been able to understand why this happens somewhere and
    somewhere not, but this is an sledgehammer attempt to fix it quickly
    to unblock users, and then we will try to understand it later.

    Discussions:
    https://community.openhab.org/t/java-lang-classcastexception-class-java-math-bigdecimal-cannot-be-cast-to-class-java-lang-integer/142035/16
    https://community.openhab.org/t/nanoleaf-binding-oh3-stabilization-update/116300/61

    Signed-off-by: Jørgen Austvik <jaustvik@acm.org>

commit d4ec220
Author: Florian Hotze <florianh_dev@icloud.com>
Date:   Wed Dec 14 20:12:54 2022 +0100

    [jsscripting] Extend synchronization to common ScriptEngine methods (openhab#13924)

    * [jsscripting] Extend synchronization to common ScriptEngine methods

    This extends the multi-thread synchronization to "eval" and "invokeMethod" and moves synchronization for "invokeFunction" to the DelegatingScriptEngineWithInvocableAndAutocloseableAndSynchronization class. Fixes the multi-thread access requested warnings described in the community (https://community.openhab.org/t/openhab-3-4-milestone-discussion/138093/130) and related to openhab/openhab-core#3180.

    * Revert "[jsscripting] Extend synchronization to common ScriptEngine methods"

    This reverts commit aadd21e.

    * [jsscripting] Extend synchronization to common ScriptEngine methods & Switch to ReentrantLock

    This extends the multi-thread synchronization to "eval" and "invokeMethod" and moves synchronization for "invokeFunction" to the InvocationInterceptingScriptEngineWithInvocableAndAutoCloseable class.
    The synchronization mechanism changed from using synchronized to using a ReentrantLock together with catch_finally to avoid having deadlocks when an exception is thrown.
    Fixes the multi-thread access requested warnings described in the community (https://community.openhab.org/t/openhab-3-4-milestone-discussion/138093/130) and related to openhab/openhab-core#3180.

    * [jsscripting] Reduce compiler warnings
    * [jsscripting] Replace finally blocks & Wrap returns in afterInvocation
    * [jsscripting] Fix deadlock caused by NoSuchMethodException in Invocable interface methods

    During testing my latest changes, I noticed that there is a deadlock when invokeFunction or invokeMethod are called on a non-existing method.
    This happens because the NoSuchMethodException keeps afterInvocation from running and therefore the lock never gets released.

    * [jsscripting] Also rethrow NPE & Fix PMD warnings/errors
    * [jsscripting] Wrap and rethrow other exceptions instead of returning them
    * [jsscripting] Address review comment from @jpg0

    Signed-off-by: Florian Hotze <florianh_dev@icloud.com>

commit 1ca9baf
Author: Jerome Luckenbach <github@luckenba.ch>
Date:   Wed Dec 14 16:52:43 2022 +0100

    [Documentation] Markdown improvements n to s (openhab#13948)

    Signed-off-by: Jerome Luckenbach <github@luckenba.ch>

commit d73218d
Author: Udo Hartmann <udo1toni@users.noreply.github.com>
Date:   Wed Dec 14 08:21:34 2022 +0100

    [mqtt.generic] Change color example (openhab#13861)

    Change color example to fit to the real parameters.

commit 4aca2c6
Author: Cody Cutrer <cody@cutrer.us>
Date:   Tue Dec 13 15:28:55 2022 -0700

    [jrubyscripting] remove some development logging that crept in (openhab#13947)

    Signed-off-by: Cody Cutrer <cody@cutrer.us>

commit 8314433
Author: lolodomo <lg.hc@free.fr>
Date:   Tue Dec 13 09:04:16 2022 +0100

    [mielecloud] Fix integration tests (openhab#13935)

    Code change provided by @BjoernLange

    Signed-off-by: Laurent Garnier <lg.hc@free.fr>

commit e9473ca
Author: Hilbrand Bouwkamp <hilbrand@h72.nl>
Date:   Tue Dec 13 08:40:10 2022 +0100

    [airq] fix table in readme that broke rendering markup (openhab#13937)

    Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>

commit 9c3ec38
Author: openhab-bot <bot@openhab.org>
Date:   Tue Dec 13 07:27:26 2022 +0100

    New Crowdin updates (openhab#13932)

    * New translations boschshc.properties (Italian)

    * New translations ecowatt.properties (French)

    * New translations nikohomecontrol.properties (Dutch)

    * New translations systeminfo.properties (Dutch)

    * New translations upnpcontrol.properties (Dutch)

commit bd087f1
Author: Jacob Laursen <jacob-github@vindvejr.dk>
Date:   Mon Dec 12 22:55:38 2022 +0100

    Fix examples after migration of time channels (openhab#13933)

    Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

commit 286a27d
Author: Wouter Born <github@maindrain.net>
Date:   Mon Dec 12 22:12:24 2022 +0100

    [nest] Add missing enable SDM API configuration step to README.md (openhab#13931)

    Fixes openhab#11814

    Signed-off-by: Wouter Born <github@maindrain.net>

commit 518272a
Author: Jacob Laursen <jacob-github@vindvejr.dk>
Date:   Mon Dec 12 22:10:48 2022 +0100

    Fix dimension for powerConsumption channel (openhab#13930)

    Fixes openhab#13929

    Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

commit e027932
Author: lolodomo <lg.hc@free.fr>
Date:   Mon Dec 12 20:28:59 2022 +0100

    [goecharger] Consider correct channel ID (maxCurrentTemp) (openhab#13927)

    Fix openhab#13891

    Signed-off-by: Laurent Garnier <lg.hc@free.fr>
borazslo pushed a commit to borazslo/openhab-mideaac-addon that referenced this pull request Jan 8, 2023
* [jsscripting] Correct wrong `createScriptEngine` implementation
* [jsscripting] Also unlock lock on unexpected exceptions (rethrow them)
* [jsscripting] Call super methods from their overrides
* [jsscripting] Move superclass call of `beforeInvocation`

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Feb 28, 2023
* [jsscripting] Correct wrong `createScriptEngine` implementation
* [jsscripting] Also unlock lock on unexpected exceptions (rethrow them)
* [jsscripting] Call super methods from their overrides
* [jsscripting] Move superclass call of `beforeInvocation`

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
renescherer pushed a commit to renescherer/openhab-addons that referenced this pull request Mar 23, 2023
* [jsscripting] Correct wrong `createScriptEngine` implementation
* [jsscripting] Also unlock lock on unexpected exceptions (rethrow them)
* [jsscripting] Call super methods from their overrides
* [jsscripting] Move superclass call of `beforeInvocation`

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
andrasU pushed a commit to andrasU/openhab-addons that referenced this pull request Jan 6, 2024
* [jsscripting] Correct wrong `createScriptEngine` implementation
* [jsscripting] Also unlock lock on unexpected exceptions (rethrow them)
* [jsscripting] Call super methods from their overrides
* [jsscripting] Move superclass call of `beforeInvocation`

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[jsscripting] To-Dos from PR #13924
5 participants