Skip to content

Commit

Permalink
Micronaut upgrade (#3548)
Browse files Browse the repository at this point in the history
* Micronaut upgrade
* Excluding spotbugs and jsr305 annotations.

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>
  • Loading branch information
tomas-langer authored Oct 14, 2021
1 parent 40934aa commit 1a6113e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
14 changes: 11 additions & 3 deletions dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@
<version.lib.mariadb-java-client>2.6.2</version.lib.mariadb-java-client>
<version.lib.maven-wagon>2.10</version.lib.maven-wagon>
<version.lib.micrometer>1.6.6</version.lib.micrometer>
<version.lib.micronaut>2.2.0</version.lib.micronaut>
<version.lib.micronaut.data>2.2.0</version.lib.micronaut.data>
<version.lib.micronaut.sql>3.3.1</version.lib.micronaut.sql>
<version.lib.micronaut>2.5.13</version.lib.micronaut>
<version.lib.micronaut.data>2.5.0</version.lib.micronaut.data>
<version.lib.micronaut.sql>3.4.0</version.lib.micronaut.sql>
<version.lib.microprofile-config>1.4</version.lib.microprofile-config>
<version.lib.microprofile-fault-tolerance-api>2.1.1</version.lib.microprofile-fault-tolerance-api>
<version.lib.microprofile-graphql>1.1.0</version.lib.microprofile-graphql>
Expand Down Expand Up @@ -1095,6 +1095,14 @@
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</exclusion>
<exclusion>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 Oracle and/or its affiliates.
* Copyright (c) 2020, 2021 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -22,8 +22,8 @@
import javax.persistence.Id;
import javax.persistence.ManyToOne;

import edu.umd.cs.findbugs.annotations.Nullable;
import io.micronaut.core.annotation.Creator;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.data.annotation.AutoPopulated;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 Oracle and/or its affiliates.
* Copyright (c) 2020, 2021 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -154,7 +154,10 @@ private static AnnotationMetadata annotationMetadata(Annotated annotated, Annota
for (String miAnnotationName : miAnnotationNames) {
try {
Annotation annotation = miAnnotated.synthesize((Class<? extends Annotation>) Class.forName(miAnnotationName));
annotations.put(annotation.annotationType(), annotation);
if (annotation != null) {
// annotation is present
annotations.put(annotation.annotationType(), annotation);
}
} catch (Throwable ignored) {
// this annotation is not on the classpath, we can ignore it
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 Oracle and/or its affiliates.
* Copyright (c) 2020, 2021 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,8 +21,8 @@
import javax.persistence.Id;
import javax.persistence.ManyToOne;

import edu.umd.cs.findbugs.annotations.Nullable;
import io.micronaut.core.annotation.Creator;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.data.annotation.AutoPopulated;

@Entity
Expand Down

0 comments on commit 1a6113e

Please sign in to comment.