Skip to content

Commit

Permalink
Update Spring Boot to 2.3.7.RELEASE (#60)
Browse files Browse the repository at this point in the history
* Various Spring Boot Update changes and Vaadin 8 merge

- Change versions
- Fix and restructure classes

Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>

* Change to proper versioning

Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>

* Remove obsolete null check

Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>

* Changes requested within pull request review.

Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
  • Loading branch information
AmmarBikic committed Feb 16, 2021
1 parent 4eccd8f commit afc0c84
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 50 deletions.
Expand Up @@ -14,6 +14,7 @@
import org.eclipse.hawkbit.ui.components.NotificationUnreadButton;
import org.eclipse.hawkbit.ui.menu.DashboardMenu;
import org.eclipse.hawkbit.ui.push.EventPushStrategy;
import org.eclipse.hawkbit.ui.push.UIEventProvider;
import org.eclipse.hawkbit.ui.utils.VaadinMessageSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
Expand All @@ -34,11 +35,11 @@ public class AzureUI extends AbstractHawkbitUI {
private static final long serialVersionUID = 1L;

@Autowired
AzureUI(final EventPushStrategy pushStrategy, final UIEventBus eventBus, final SpringViewProvider viewProvider,
AzureUI(final EventPushStrategy pushStrategy, final UIEventBus eventBus, final UIEventProvider eventProvider, final SpringViewProvider viewProvider,
final ApplicationContext context, final DashboardMenu dashboardMenu, final ErrorView errorview,
final NotificationUnreadButton notificationUnreadButton, final UiProperties uiProperties,
final VaadinMessageSource i18n) {
super(pushStrategy, eventBus, viewProvider, context, dashboardMenu, errorview, notificationUnreadButton,
super(pushStrategy, eventBus, eventProvider, viewProvider, context, dashboardMenu, errorview, notificationUnreadButton,
uiProperties, i18n);
}
}
58 changes: 29 additions & 29 deletions hawkbit-extended-runtimes/pom.xml
@@ -1,30 +1,30 @@
<!--
Copyright (c) 2018 Microsoft and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-extensions-parent</artifactId>
<version>0.3.0-SNAPSHOT</version>
</parent>

<version>0.3.0-SNAPSHOT</version>
<packaging>pom</packaging>

<artifactId>hawkbit-extended-runtimes</artifactId>

<name>hawkBit :: Extensions :: Runtimes</name>
<description>Parent pom for hawkBit runtimes pre-bundled with extensions</description>

<modules>
<module>hawkbit-update-server-azure</module>
</modules>
<!--
Copyright (c) 2018 Microsoft and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-extensions-parent</artifactId>
<version>0.3.0-SNAPSHOT</version>
</parent>

<version>0.3.0-SNAPSHOT</version>
<packaging>pom</packaging>

<artifactId>hawkbit-extended-runtimes</artifactId>

<name>hawkBit :: Extensions :: Runtimes</name>
<description>Parent pom for hawkBit runtimes pre-bundled with extensions</description>

<modules>
<module>hawkbit-update-server-azure</module>
</modules>
</project>
5 changes: 5 additions & 0 deletions hawkbit-extension-artifact-repository-mongo/pom.xml
Expand Up @@ -29,6 +29,11 @@
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
Expand Down
Expand Up @@ -14,13 +14,9 @@
import org.eclipse.hawkbit.artifact.repository.model.AbstractDbArtifact;
import org.eclipse.hawkbit.artifact.repository.model.DbArtifactHash;

import com.mongodb.gridfs.GridFSDBFile;

/**
* A wrapper object for the {@link AbstractDbArtifact} object which returns the
* {@link InputStream} directly from {@link GridFSDBFile#getInputStream()} which
* retrieves when calling {@link #getFileInputStream()} always a new
* {@link InputStream} and not the same.
* A wrapper object for the {@link AbstractDbArtifact} object which returns
* always a new {@link InputStream} and not the same.
*/
public class GridFsArtifact extends AbstractDbArtifact {

Expand Down
Expand Up @@ -25,7 +25,6 @@

import com.mongodb.MongoClientException;
import com.mongodb.MongoException;
import com.mongodb.MongoGridFSException;
import com.mongodb.client.gridfs.model.GridFSFile;

/**
Expand Down Expand Up @@ -199,7 +198,7 @@ private GridFsArtifact createGridFsArtifact(final GridFSFile file) {
return null;
}
return createGridFsArtifact(file, getContentType(file),
new DbArtifactHash(file.getFilename(), file.getMD5(), null));
new DbArtifactHash(file.getFilename(), null, null));
}

/**
Expand Down Expand Up @@ -235,13 +234,6 @@ private static final String getContentType(final GridFSFile file) {
if (metadata != null) {
contentType = metadata.getString(CONTENT_TYPE);
}
if (contentType == null) {
try {
contentType = file.getContentType();
} catch (final MongoGridFSException e) {
throw new ArtifactStoreException("Could not determine content type for file " + file.getId(), e);
}
}
return contentType;
}

Expand Down
Expand Up @@ -38,7 +38,7 @@
@Story("Artifact Store MongoDB")
@RunWith(SpringRunner.class)
@SpringBootTest(classes = {MongoDBArtifactStoreAutoConfiguration.class, TestConfiguration.class}, properties = {
"spring.data.mongodb.port=0", "spring.mongodb.embedded.version=3.5.5",
"spring.mongodb.embedded.version=3.5.5",
"spring.mongodb.embedded.features=sync_delay,no_http_interface_arg"})
public class MongoDBArtifactStoreTest {
private static final String TENANT = "test_tenant";
Expand Down Expand Up @@ -120,7 +120,7 @@ private String storeRandomArtifactAndVerify(final String tenant) throws NoSuchAl
assertThat(loaded).isNotNull();
assertThat(loaded.getContentType()).isEqualTo("application/json");
assertThat(loaded.getHashes().getSha1()).isEqualTo(sha1Hash16);
assertThat(loaded.getHashes().getMd5()).isEqualTo(md5Hash16);
assertThat(loaded.getHashes().getMd5()).isNull();
assertThat(loaded.getSize()).isEqualTo(filelengthBytes);

return sha1Hash16;
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Expand Up @@ -16,7 +16,7 @@
<parent>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-parent</artifactId>
<version>0.3.0M6</version>
<version>0.3.0M7</version>
</parent>

<artifactId>hawkbit-extensions-parent</artifactId>
Expand All @@ -41,7 +41,7 @@

<properties>

<hawkbit.version>0.3.0M6</hawkbit.version>
<hawkbit.version>0.3.0M7</hawkbit.version>
<aws.sdk.version>1.11.415</aws.sdk.version>
<gcp.sdk.version>0.77.0-alpha</gcp.sdk.version>

Expand Down

0 comments on commit afc0c84

Please sign in to comment.