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

Upgrade Netty to 4.1.73.Final #6769

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3d79e73
New version is 3.3.0-SNAPSHOT
ilopmar Nov 24, 2021
7a70446
add jaeger support for codec (#6535)
manuelmartinoracle Dec 1, 2021
cebae92
Merge branch '3.2.x' into 3.3.x
jameskleeh Dec 14, 2021
8eb1b44
Merge branch '3.2.x' into 3.3.x
graemerocher Dec 18, 2021
94178ac
build: updates logback.xml from 1.2.3 to 1.2.8 (#6660)
sdelamo Dec 20, 2021
7a37a4a
Merge branch '3.2.x' into 3.3.x
graemerocher Dec 21, 2021
04a272b
Merge remote-tracking branch 'origin/3.2.x' into 3.3.x
ilopmar Dec 21, 2021
6a1ad95
Update libs.versions.toml
sdelamo Dec 23, 2021
bb89a27
Bump micronaut-views to 3.1.2 (#6688)
micronaut-build Jan 3, 2022
625f5c7
Add new `@AccessorsStyle` annotation (#6620)
ilopmar Jan 4, 2022
d23df29
Introdce a static optimizations loader (#6694)
melix Jan 4, 2022
34dcd52
Constant property sources shouldn't all be loaded (#6668)
melix Jan 4, 2022
cd9794e
Merge branch '3.2.x' into 3.3.x
jameskleeh Jan 7, 2022
ff78dd4
Allow @Inherited annotations for nullability (#6716)
timyates Jan 7, 2022
219cc60
Bump micronaut-sql to 4.1.0 (#6676)
micronaut-build Jan 7, 2022
a771ce4
Bump micronaut-picocli to 4.1.0 (#6674)
micronaut-build Jan 7, 2022
85dbb0c
Bump micronaut-kafka to 4.1.1 (#6673)
micronaut-build Jan 7, 2022
249bef2
Allow file watcher restarts for messaging apps (#6728)
timyates Jan 10, 2022
971da94
Delay response for `Mono` bodies of `HttpResponse` return values (#6722)
yawkat Jan 10, 2022
be317db
Bump micronaut-liquibase to 5.1.0 (#6736)
micronaut-build Jan 11, 2022
be0686b
Bump micronaut-flyway to 5.1.0 (#6738)
micronaut-build Jan 11, 2022
b435e6f
Pick JSON Content-Type by default when route info is missing (#6748)
yawkat Jan 12, 2022
856e204
add serde to BOM (#6747)
graemerocher Jan 12, 2022
31c0c87
Bump micronaut-serialization to 1.0.0-M4 (#6758)
micronaut-build Jan 17, 2022
aec86df
Upgrade Netty to 4.1.73.Final
ilopmar Jan 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2020 original authors
* Copyright 2017-2022 original authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,7 +18,7 @@
import io.micronaut.context.annotation.Requires;
import io.micronaut.context.event.ApplicationEventListener;
import io.micronaut.core.util.StringUtils;
import io.micronaut.runtime.server.EmbeddedServer;
import io.micronaut.runtime.EmbeddedApplication;
import io.micronaut.scheduling.io.watch.FileWatchConfiguration;
import io.micronaut.scheduling.io.watch.event.FileChangedEvent;
import jakarta.inject.Singleton;
Expand All @@ -34,25 +34,25 @@
* @since 1.1.0
*/
@Singleton
@Requires(beans = EmbeddedServer.class)
@Requires(beans = EmbeddedApplication.class)
@Requires(property = FileWatchConfiguration.RESTART, value = StringUtils.TRUE, defaultValue = StringUtils.FALSE)
public class FileWatchRestartListener implements ApplicationEventListener<FileChangedEvent> {

private static final Logger LOG = LoggerFactory.getLogger(FileWatchRestartListener.class);

private final EmbeddedServer embeddedServer;
private final EmbeddedApplication<?> embeddedApplication;

/**
* Default constructor.
* @param embeddedServer The embedded server
* @param embeddedApplication The embedded application
*/
public FileWatchRestartListener(EmbeddedServer embeddedServer) {
this.embeddedServer = embeddedServer;
public FileWatchRestartListener(EmbeddedApplication<?> embeddedApplication) {
this.embeddedApplication = embeddedApplication;
}

@Override
public void onApplicationEvent(FileChangedEvent event) {
embeddedServer.stop();
embeddedApplication.stop();
if (LOG.isInfoEnabled()) {
LOG.info("Shutting down server following file change.");
}
Expand Down
@@ -0,0 +1,92 @@
/*
* Copyright 2017-2021 original authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.micronaut.core.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
* Annotate a class (typically a Java Bean) to make it explicit the style of its accessors when not using the standard
* getter and setters:
*
* <pre class="code">
* &#064;AccessorsStyle(readPrefixes = {""}, writePrefixes = {""})
* public class Person {
*
* private String name;
* private int age;
*
* public Person(String name, int age) {
* this.name = name;
* this.age = age;
* }
*
* public String name() {
* return this.name;
* }
*
* public void name(String name) {
* this.name = name;
* }
*
* public int age() {
* return this.age;
* }
*
* public void age(int age) {
* this.age = age;
* }
* }</pre>
* <p>
* Defining the {@code readPrefixes} and {@code writePrefixes} as empty strings makes Micronaut aware of those accessors.
*
* It is also possible to annotate fields with this annotation but the usage is only limited when using it with @ConfigurationBuilder.
*
* @author Iván López
* @since 3.3.0
*/
@Documented
@Retention(RUNTIME)
@Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE, ElementType.FIELD})
@Inherited
@Experimental
public @interface AccessorsStyle {

/**
* The default read prefix.
*/
String DEFAULT_READ_PREFIX = "get";

/**
* The default write prefix.
*/
String DEFAULT_WRITE_PREFIX = "set";

/**
* @return The valid read prefixes.
*/
String[] readPrefixes() default {DEFAULT_READ_PREFIX};

/**
* @return The valid write prefixes.
*/
String[] writePrefixes() default {DEFAULT_WRITE_PREFIX};
}
Expand Up @@ -29,27 +29,27 @@ public interface AnnotatedElement extends AnnotationMetadataProvider, Named {
* @return Whether the element is nullable.
*/
default boolean isDeclaredNullable() {
return getAnnotationMetadata().hasDeclaredAnnotation(AnnotationUtil.NULLABLE);
return getAnnotationMetadata().hasDeclaredStereotype(AnnotationUtil.NULLABLE);
}

/**
* @return Whether the element is nullable.
*/
default boolean isNullable() {
return getAnnotationMetadata().hasAnnotation(AnnotationUtil.NULLABLE);
return getAnnotationMetadata().hasStereotype(AnnotationUtil.NULLABLE);
}

/**
* @return Whether the element is declared as not being null
*/
default boolean isNonNull() {
return getAnnotationMetadata().hasAnnotation(AnnotationUtil.NON_NULL);
return getAnnotationMetadata().hasStereotype(AnnotationUtil.NON_NULL);
}

/**
* @return Whether the element is declared as not being null
*/
default boolean isDeclaredNonNull() {
return getAnnotationMetadata().hasDeclaredAnnotation(AnnotationUtil.NON_NULL);
return getAnnotationMetadata().hasDeclaredStereotype(AnnotationUtil.NON_NULL);
}
}