* Get all serial port identifiers by calling RXTX with and without using the gnu.io.rxtx.SerialPorts property
* Filter getSerialPortIdentifiers() stream on distinct port names
* Fix thread safety issues by saving getPortIdentifiers() Enumeration result to new list
Fixes#805
Signed-off-by: Wouter Born <github@maindrain.net>
Newer Jetty versions log warnings when weak cipher suites are configured.
This occurs when using Karaf 4.2.6 with Jetty 9.4.18.v20190429.
See also: https://github.com/eclipse/jetty.project/pull/3050
Signed-off-by: Wouter Born <github@maindrain.net>
* automation: Use constructor injection to simplify lifecycle
* Refactoring of 'DefaultScriptScopeProvider' class
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
If a component should be activated an instance is constructed and that
object is activated.
Let's split the construction and activation logic also if constructor
injection is used.
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
When debugging openHAB in Eclipse I ran into serial port locking issues again on Ubuntu 18.04.2.
We resolved these in the distro by using 3.15.0.OH2 which doesn't use liblockdev.
Errors similar to the one below may show after stopping/restarting openHAB when using serial ports on certain distros:
RXTX fhs_lock() Error: opening lock file: /var/lock/LCK..ttyUSB0: File exists. It is mine
testRead() Lock file failed
See also:
https://github.com/openhab/openhab-core/pull/761
Signed-off-by: Wouter Born <github@maindrain.net>
* Make sure to always send the correct 'item' member in SSE events.
If a change to item A causes visibility changes to item B, we previously
sent an SSE event for B including the new visibility for B, but included
item and state of A. This leads to client confusion, as it'll update its
internal state for the widget belonging to B with the item state of A.
Make sure to always send the item for B and to omit state in that case.
Closes#690
Signed-off-by: Danny Baumann <dannybaumann@web.de>
* Travis CI: check POM convention
We could use Travis CI to execute some checks in front of the normal
build.
This change adds a check if the POM files follow our POM conventions.
If something fails, it show which files violates the convention and the
command that should be executed to fix the situation.
For example if the base POM file breaks the convention:
At least one POM file breaks the convention, please use sortpom to fix the POM file(s).
modified: pom.xml
You should run the following command in the root directory of your working copy:
mvn com.github.ekryd.sortpom:sortpom-maven-plugin:sort -Dsort.keepBlankLines=true -Dsort.createBackupFile=false -Dsort.predefinedSortOrder=recommended_2008_06
* add sortpom plugin to verify phase
* do not use dependency reduced pom (use scope)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
The current rule registry implementation provides a configuration for
the "rule reinitialization delay". That configuration is not used by the
rule registry itself but used by the rule engine implementation.
This required the rule engine implementation to contain a special code
path that checks if the injected rule registry is an instance of that
special implementation to access that configuration parameter.
As the configuration is not used by the registry itself, it does not
make sense that it is a configuration of that component.
If the rule engine (at least this special implementation) would like to
use a configurable parameter, it should be part of that specific
component implementation.
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
After the bump of Paho from 1.2.0 to 1.2.1 the library enables the https
hostname verification.
This breaks compatibility with current consumers.
Connections cannot be established anymore.
We disable the https hostname verification to keep the old behaviour.
We should add an API so the hostname verification can be enabled if
desired.
This also makes the version 1.2.1 the lower version limit as we need to
use the API to disable the verification internally.
Related to: https://github.com/openhab/openhab-core/issues/815
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
The antlr generator has been downloaded by a specific download maven
plugin at build time.
Instead of calling the plugin goals it would be much simpler to add the
downloaded file to the repository (I assume it has been not possible on
the Eclipse repository before).
Another benefit would be the IDE integration as the IDE does not need to
know if the plugin needs to be executed or not...
The provided antlr generator has been taken from:
http://download.itemis.com/antlr-generator-3.2.0-patch.jar
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
We should not remove entries (so keys) from the map while we are using
the key set (a view) of that map (see JavaDoc: otherwise "results of the
iteration undefined").
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
The test suite for the audio servlet contains a test that will fail on
systems under heavy load (or just imperformant systems).
An audio stream should be added for 1 (streamTimeout) second.
The stream is requested and it is tested that it can be accessed.
After that the test waits until the stream is no more available (this
will be the cause after "streamTimeout").
If the "add stream" and "get request for stream" operations already
exceed the "streamTimeout" limit, the test will fail.
This can be handled in the test case itself if we check the timespan we
need to get the stream and if we know that the stream is allowed to be
non present already, we continue with the next step without failing.
Fixes: https://github.com/openhab/openhab-core/issues/799
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>