Commit Graph

650 Commits

Author SHA1 Message Date
Christoph Weitkamp
1bbf250d1f Removed deprecated methods (#721)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-28 18:52:16 +02:00
Hilbrand Bouwkamp
bb86507871 [archetype] Fix copyright in archetype example java files (#765)
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2019-04-28 16:56:10 +02:00
Markus Rathgeb
25d7f14dfc safe caller: respect classloader of the class and the interfaces (#763)
Related to: https://github.com/openhab/openhab2-addons/issues/5519

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-28 16:20:53 +02:00
Markus Rathgeb
1ac2e8978b automation: remove specific handling for CompositeModuleHandlerFactory (#764)
The member variable "compositeFactory" that holds the
"CompositeModuleHandlerFactory" instance is set in the activation method
by calling the constructor of of "CompositeModuleHandlerFactory".
This reference is destroyed and unset in the deactivate method.

There exists DS managed multiple optional references to
"ModuleHandlerFactory".
The "add" logic does not touch the "compositeFactory" variable.
The "remove" logic checks if the given service reference is a
"CompositeModuleHandlerFactory" and unsets the "compositeFactory" member
variable.

If e.g. a module handler factory is injected that also implements the
CompositeModuleHandlerFactory the CompositeModuleHandlerFactory created
by the activate method is still be used. If that specific module handler
factory is removed again, the variable "compositeFactory" is unset and
there is NO CompositeModuleHandlerFactory present anymore.

There are two options:
* The instance created in the activate method should be used as long as
  no other one is injected.
* The instance created in the activate method should be used all the
  time.

The whole code base does not contain another specific implementation for
CompositeModuleHandlerFactory, so there is no (at least in openHAB Core)
change that a CompositeModuleHandlerFactory is injected.

So instead of adding a non deterministic usage of "some" composite
module handler factory (which will require a fix of the "set module
handler factory method" and some others), let's drop the buggy code in
the "remove module handler factory" and use the manually created
composite module handler factory all the time.

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-28 16:19:06 +02:00
Hilbrand Bouwkamp
d1e333d8e3 [archetype] .classpath should contain tabs. (#762)
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2019-04-27 22:27:40 +02:00
Hilbrand Bouwkamp
ff57db8396 Added maven archetype project to generate binding skeletons (#589)
This archetype generates bindings for the new bnd based build system.
It also updates specific bundle files that need information about the new binding.

This doesn't yet include generation of test projects.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2019-04-26 13:03:28 +02:00
Christoph Weitkamp
bc91446ae1 Added i18n feature for dynamic state descriptions (#655)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-26 12:54:40 +02:00
Christoph Weitkamp
d0800c902e Added RawButtonTogglePlayerProfile, RawRockerNextPreviousProfile and RawRockerRewindFastforwardProfile (#747)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-26 12:53:16 +02:00
Markus Rathgeb
ce72e1083f drop blocking async SSE implementation (#754)
There workaround for a servlet implementation lower then 3 can be removed.
After we migrated from ESH to openHAB Core we could set servlet >= 3 as a requirement.

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-25 20:05:22 +02:00
Christoph Weitkamp
e3cb062610 Fixed unit tests magic bundle (#756)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-25 17:49:38 +02:00
Christoph Weitkamp
387b439509 Reduced logging level in AbstractRegistry (#755)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-25 15:10:33 +02:00
Markus Rathgeb
e92cdace3c REST SSE: disable compression also if servlet 3 support is present (#752)
We should disable the compression regardless if servlet 3 is used or
not. It does not matter which servlet version is used, the client should
receive the messages as soon as possible without compression or
buffering.
You can identify the lost SSE feature as soon as you enable the usage of
Jetty's GzipHandler.

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-24 17:03:48 +02:00
Christoph Weitkamp
89da305fd3 Import SmartHomeUnits in Script Scope (#745)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-18 21:45:33 +02:00
Scott Rushworth
77992e7df6 Sort by filename instead of path (#724)
Currently, the scripts are loaded based on the lexicographical order of
the absolute paths of the scripts. This makes it difficult to control
the load order. This change bases the load order solely on the filename,
as was originally used before
https://github.com/eclipse/smarthome/pull/3855, and preserves the
ability to use scripts with the same filename.

Signed-off-by: Scott Rushworth <openhab@5iver.com>
2019-04-18 20:15:50 +02:00
Gaël L'hopital
20ee4b8fe0 Added change and update timestamp profiles (#732)
* Added change and update timestamp profiles

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
2019-04-18 12:59:15 +02:00
Wouter Born
f4348cd6e8 Attach source JARs without forking to fix Jenkins warnings (#741)
This fixes the following warnings on Jenkins builds:

[WARNING] Failed to getClass for org.apache.maven.plugins.source.SourceJarMojo

See also: https://issues.jenkins-ci.org/browse/JENKINS-27372

Signed-off-by: Wouter Born <github@maindrain.net>
2019-04-17 06:55:41 +02:00
Wouter Born
fb972f385a Configure LanguageServer exit behavior (#742)
Xtext 2.17 allows for configuring the LanguageServer exit behavior so the SecurityManager workaround can be removed.

Fixes: https://github.com/eclipse/smarthome/issues/6291
Undos: https://github.com/openhab/openhab-core/pull/409

See also:
* "Configurable Server Exit Behavior" in the Xtext 2.16.0 release notes:
  https://www.eclipse.org/Xtext/releasenotes.html#/releasenotes/2018/12/04/version-2-16-0
* https://github.com/eclipse/xtext-core/issues/885

Signed-off-by: Wouter Born <github@maindrain.net>
2019-04-17 06:52:42 +02:00
Markus Rathgeb
32845ef36d differ between min. karaf version (OSGi) und karaf compilation tooling (#740)
Related to: https://github.com/openhab/openhab-core/pull/723#issuecomment-483595667

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-16 22:41:27 +02:00
Wouter Born
0c07ac99d6 Update Karaf to 4.2.4 in openHAB add-ons Parent POM (#723)
For Karaf 4.2.3 release notes, see:
  https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12311140&version=12344587

For Karaf 4.2.4 release notes, see:
  https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12344856&projectId=12311140

Signed-off-by: Wouter Born <github@maindrain.net>
2019-04-15 23:29:35 +02:00
Christoph Weitkamp
bddddb224b Enable Model Language Server Protocol Tests (#730)
* Activated org.openhab.core.model.lsp.tests
* Renamed bundle

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-15 18:05:58 +02:00
Christoph Weitkamp
c91d566dd2 Activate org.openhab.core.model.core.tests (#728)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-15 17:41:49 +02:00
Christoph Weitkamp
c3885c9016 Activated org.openhab.core.model.persistence.tests (#729)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-15 17:28:12 +02:00
David Gräff
8819eb6ef9 add default constructor to MetadataKey (Gson deserialization support) (#727)
Signed-off-by: David Gräff <david.graeff@web.de>
2019-04-15 15:42:46 +02:00
Christoph Weitkamp
309a1af45f Deprecated method - could be removed because of superflous code (#720)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-15 14:35:48 +02:00
Christoph Weitkamp
0aa7661764 Revert ThingImpl and BridgeImpl changes as the storage uses those implementations (#719)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-14 23:09:09 +02:00
Kai Kreuzer
48ce8357f5 remove build path entries for non-existent folders (#716)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2019-04-14 09:55:32 +02:00
David Gräff
31c3ba3713 Add serial transport to runtime BOM (#714)
Add nrjavaserial to runtime bom

Signed-off-by: David Graeff <david.graeff@web.de>
2019-04-13 12:09:15 +02:00
Scott Rushworth
5f880e1062 Added ScriptModuleTypeProvider (#635)
Added ScriptModuleTypeProvider, which dynamically adds available script
languages to the ParameterOptions used in Paper UI when configuring a
ScriptAction or ScriptCondition.

Signed-off-by: Scott Rushworth <openhab@5iver.com>
2019-04-11 06:57:39 +02:00
Christoph Weitkamp
48a97c1ac2 Improved thing / bridge performance (#693)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-10 08:50:04 +02:00
Markus Rathgeb
9630a7eb1a runtime: add support for Paho MQTT (#702)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-09 21:25:50 +02:00
Markus Rathgeb
33cfb5dbac mapdb storage: minor cleanups (#707)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-09 21:23:25 +02:00
Christoph Weitkamp
ff158f9735 Enable Network I/O HTTP Integration Tests (#700)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-09 17:03:33 +02:00
Thomas Weißschuh
82b7ff6db9 Channel groups should not require static channels (#696)
* channel groups should not require static channels
* Added unit tests

Also-by: Christoph Weitkamp <github@christophweitkamp.de>
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2019-04-08 21:44:52 +02:00
David Gräff
7838a6a46f Update Metadata.java (#704)
Fixes #699 

Signed-off-by: David Gräff <david.graeff@web.de>
2019-04-08 21:07:33 +02:00
Wouter Born
02208f487a Enable Semantics Integration Tests (#697)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-04-08 20:34:15 +02:00
Hilbrand Bouwkamp
1d8b7be59b Added units kvarh and kvar. (#695)
Also simplified gravity unit.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2019-04-07 11:12:06 +02:00
Wouter Born
6900fcbe3e Add commons-net to bom (#694)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-04-03 07:28:04 +02:00
Wouter Born
338c8b7bbc Require successful Travis CI Java 11 build (#688)
* Update enforcer to allow compilation with Java 8, 9, 10 and 11
* Update Travis CI configuration to require the Java 11 build to succeed

Signed-off-by: Wouter Born <github@maindrain.net>
2019-04-01 06:25:43 +02:00
Wouter Born
806d1889b0 Add required bundles to itests for successful Java 11 build (#685)
Adds the following bundles required for building on Java 11 by default to the run requirements:

* org.apache.servicemix.specs.activation-api-1.1
* org.apache.servicemix.specs.annotation-api-1.3
* org.apache.servicemix.specs.jaxb-api-2.2

Signed-off-by: Wouter Born <github@maindrain.net>
2019-03-31 17:53:56 +02:00
Wouter Born
648cfac66d Avoid ByteBuffer incompatibility when compiling with JDK9+ (#686)
Incompatible code can be used/generated when using JDK8 on the command line and JDK11 in Eclipse (or vice versa).

The explanation for this is given in https://github.com/apache/felix/pull/114 :

Java 9 introduces overridden methods with covariant return types for the following methods in java.nio.ByteBuffer:

* position​(int newPosition)
* limit​(int newLimit)
* flip​()
* clear​()
* mark​()
* reset​()
* rewind​()

In Java 9 they all now return ByteBuffer, whereas the methods they override return Buffer,
resulting in exceptions like this when executing on Java 8 and lower:
java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer
This is because the generated byte code includes the static return type of the method, which is not found on Java 8 and lower because the overloaded methods with covariant return types don't exist (the issue appears even with source and target 8 or lower in compilation parameters).
The solution is to cast ByteBuffer instances to Buffer before calling the method.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-03-31 14:45:29 +02:00
Wouter Born
fc5f5bba91 Increase stability of MDNSDiscoveryServiceOSGiTest by increasing timeouts to 5s (#687)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-03-31 13:38:49 +02:00
Gaël L'hopital
c6a9085a74 Adding DataAmount (bit and derivatives) and DataTransferRates (bits per second) (#681)
* Adding DataAmount (bit and derivatives) and DataTransferRates (bits per second) to UoM

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
2019-03-30 21:43:15 +01:00
Scott Rushworth
d1a343d8b2 Add DynamicImport-Package for scripted automation (#663)
Fixes #610

Signed-off-by: Scott Rushworth <openhab@5iver.com>
2019-03-30 19:55:01 +01:00
J-N-K
167211d640 bump SAT version to 0.6.1 (#679)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2019-03-26 13:05:37 +01:00
Wouter Born
cbb96945f0 Ignore and remove Eclipse project specific settings (#677)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-03-26 13:04:09 +01:00
Patrick Fink
d82efc5f5b Add unleash plugin to pom.xml (#675)
Signed-off-by: Patrick Fink <mail@pfink.de>
2019-03-23 10:53:26 +01:00
Patrick Fink
05d350d5d6 Handle itests as part of the reactor during release (#673)
(for version bump etc.)

Signed-off-by: Patrick Fink <mail@pfink.de>
2019-03-21 20:55:28 +01:00
Wouter Born
1acb9c8ff2 [core] Increase DateTimeType parsing and formatting precision (#668)
Since Java 9 (JDK-8164428) the maximum resolution from the underlying clock is used.
Instead of just milliseconds the resolution can now even be tenth of microseconds.

According to the Type JavaDocs toFullString() should return the full string representation of the type to be consumed by 'valueOf(String)'.

With the changes in this PR toFullString() may return higher resolution date time strings on newer Java versions and valueOf(value) is able to parse these.

Code depending on a certain resolution returned by toFullString() should use the format(pattern) method instead so the resolution will not change.

Fixes #667

Signed-off-by: Wouter Born <github@maindrain.net>
2019-03-17 13:18:30 +01:00
Wouter Born
7e94df1656 Print message instead of null on console when specified play volume is invalid (#670)
The fix helps users and also ensures the unit test works on both Java 8 and 11.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-03-17 13:00:35 +01:00
Wouter Born
71b241ae21
Update ohdr.version to 1.0.42 (#666)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-03-16 00:50:24 +01:00