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 errors and changes after importing add-ons in Eclipse #7270

Merged
merged 4 commits into from
Apr 3, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions bundles/org.openhab.binding.adorne/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,11 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

81 changes: 32 additions & 49 deletions bundles/org.openhab.binding.goecharger/.classpath
Original file line number Diff line number Diff line change
@@ -1,49 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

This file was deleted.

This file was deleted.

17 changes: 0 additions & 17 deletions bundles/org.openhab.binding.hpprinter/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.util.Map;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
Expand All @@ -31,7 +32,7 @@ public class HPStatus {

private static final Map<String, String> STATUS_MESSAGES = initializeStatus();

private final String printerStatus;
private final @Nullable String printerStatus;

public HPStatus(Document document) {
NodeList nodes = document.getDocumentElement().getElementsByTagName("psdyn:Status");
Expand Down Expand Up @@ -61,7 +62,7 @@ private static Map<String, String> initializeStatus() {
return statusMap;
}

public String getPrinterStatus() {
return STATUS_MESSAGES.getOrDefault(printerStatus, printerStatus);
public @Nullable String getPrinterStatus() {
return STATUS_MESSAGES.get(printerStatus);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void dispose() {
}

public void findMyDevice(String deviceId) throws IOException {
if(connection == null) {
if (connection == null) {
logger.debug("Can't send Find My Device request, because connection is null!");
return;
}
Expand All @@ -136,13 +136,13 @@ private void startHandler() {
try {
logger.debug("iCloud bridge starting handler ...");
ICloudAccountThingConfiguration config = getConfigAs(ICloudAccountThingConfiguration.class);
final String appleId = config.appleId;
final String password = config.password;
if(appleId != null || password != null) {
connection = new ICloudConnection(appleId, password);
}
else {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Apple ID/Password is not set!");
final String localAppleId = config.appleId;
final String localPassword = config.password;
if (localAppleId != null && localPassword != null) {
connection = new ICloudConnection(localAppleId, localPassword);
} else {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
"Apple ID/Password is not set!");
return;
}
refreshJob = scheduler.scheduleWithFixedDelay(this::refreshData, 0, config.refreshTimeInMinutes, MINUTES);
Expand All @@ -167,7 +167,7 @@ public void refreshData() {

try {
ICloudAccountDataResponse iCloudData = deviceInformationParser.parse(json);
if(iCloudData == null) {
if (iCloudData == null) {
return;
}
int statusCode = Integer.parseUnsignedInt(iCloudData.getICloudAccountStatusCode());
Expand Down
6 changes: 6 additions & 0 deletions bundles/org.openhab.binding.innogysmarthome/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,11 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
Expand Down Expand Up @@ -191,19 +192,21 @@ public final List<InboundSpec> getReadSpec(Configuration configuration) throws K
}

public final @Nullable InboundSpec getListenSpec(Configuration configuration, GroupAddress groupAddress) {
return getAllGAKeys().stream()
Optional<ListenSpecImpl> result = getAllGAKeys().stream()
.map(key -> new ListenSpecImpl(parse((String) configuration.get(key)), getDefaultDPT(key)))
.filter(spec -> !spec.getGroupAddresses().isEmpty())
.filter(spec -> spec.getGroupAddresses().contains(groupAddress)).findFirst().orElse(null);
.filter(spec -> spec.getGroupAddresses().contains(groupAddress)).findFirst();
return result.isPresent() ? result.get() : null;
}

protected abstract String getDefaultDPT(String gaConfigKey);

public final @Nullable OutboundSpec getResponseSpec(Configuration configuration, GroupAddress groupAddress,
Type type) throws KNXFormatException {
return getAllGAKeys().stream()
Optional<ReadResponseSpecImpl> result = getAllGAKeys().stream()
.map(key -> new ReadResponseSpecImpl(parse((String) configuration.get(key)), getDefaultDPT(key), type))
.filter(spec -> groupAddress.equals(spec.getGroupAddress())).findFirst().orElse(null);
.filter(spec -> groupAddress.equals(spec.getGroupAddress())).findFirst();
return result.isPresent() ? result.get() : null;
}

@Override
Expand Down
6 changes: 6 additions & 0 deletions bundles/org.openhab.binding.lgwebos/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,11 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
6 changes: 0 additions & 6 deletions bundles/org.openhab.binding.logreader/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/classes" path="src/3rdparty/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
wborn marked this conversation as resolved.
Show resolved Hide resolved
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
Expand Down
7 changes: 6 additions & 1 deletion bundles/org.openhab.binding.loxone/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src/test/resources"/>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
Expand Down
6 changes: 6 additions & 0 deletions bundles/org.openhab.binding.millheat/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,11 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 6 additions & 0 deletions bundles/org.openhab.binding.networkupstools/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,11 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Loading