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

Fix null type mismatch errors #2976

Merged
merged 1 commit into from
May 23, 2022
Merged

Fix null type mismatch errors #2976

merged 1 commit into from
May 23, 2022

Conversation

wborn
Copy link
Member

@wborn wborn commented May 23, 2022

This fixes the null type errors in Eclipse which were introduced by #2906.

This fixes the null type errors in Eclipse which were introduced by openhab#2906.

Signed-off-by: Wouter Born <github@maindrain.net>
@wborn wborn requested a review from a team as a code owner May 23, 2022 09:38
Copy link
Member

@J-N-K J-N-K left a comment

Choose a reason for hiding this comment

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

Looks much cleaner. Thank you.

@J-N-K J-N-K merged commit 86ee4dc into openhab:main May 23, 2022
@wborn wborn deleted the null-type-errors branch May 23, 2022 14:36
@lolodomo
Copy link
Contributor

@wborn : I believe you broke what was introduced for the interpret method:

        if (!interpreters.isEmpty()) {
            Locale locale = localeProvider.getLocale();
            for (var interpreter : interpreters) {
                try {
                    String answer = interpreter.interpret(locale, text);
                    logger.debug("Interpretation result: {}", answer);
                    return answer;
                } catch (InterpretationException e) {
                    logger.debug("Interpretation exception: {}", e.getMessage());
                    throw e;
                }
            }
        }

This will throw an exception as soon as it fails for one interpreter.
The idea was to try all interpreters until one is not failing.

@lolodomo
Copy link
Contributor

@GiviMAD for information.

@GiviMAD
Copy link
Member

GiviMAD commented May 24, 2022

@wborn @lolodomo yes in fact it breaks what we did, I will open another pr and ping you there. Watching the changes I think it could be simplified.

@wborn wborn added this to the 3.3 milestone Jun 23, 2022
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 12, 2023
This fixes the null type errors in Eclipse which were introduced by openhab#2906.

Signed-off-by: Wouter Born <github@maindrain.net>
GitOrigin-RevId: 86ee4dc
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.

4 participants