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

Checkstyle now checks class javadocs. #2935

Merged
merged 1 commit into from
Apr 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
20 changes: 10 additions & 10 deletions common/http/src/main/java/io/helidon/common/http/MediaType.java
Original file line number Diff line number Diff line change
Expand Up @@ -489,16 +489,16 @@ public double qualityFactor() {
// fixme: Bidirectional wildcard compatibility
@Override
public boolean test(MediaType other) {
return other != null && // return false if other is null, else
(
type.equals(AcceptPredicate.WILDCARD_VALUE)
|| other.type.equals(AcceptPredicate.WILDCARD_VALUE)
|| (
type.equalsIgnoreCase(other.type)
&& (
subtype.equals(AcceptPredicate.WILDCARD_VALUE) || other.subtype
.equals(AcceptPredicate.WILDCARD_VALUE)))
|| (type.equalsIgnoreCase(other.type) && this.subtype.equalsIgnoreCase(other.subtype)));
return other != null // return false if other is null, else
&& (
type.equals(AcceptPredicate.WILDCARD_VALUE)
|| other.type.equals(AcceptPredicate.WILDCARD_VALUE)
|| (
type.equalsIgnoreCase(other.type)
&& (
subtype.equals(AcceptPredicate.WILDCARD_VALUE) || other.subtype
.equals(AcceptPredicate.WILDCARD_VALUE)))
|| (type.equalsIgnoreCase(other.type) && this.subtype.equalsIgnoreCase(other.subtype)));
}

/**
Expand Down
20 changes: 10 additions & 10 deletions common/key-util/src/main/java/io/helidon/common/pki/PemReader.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 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 @@ -51,19 +51,19 @@ final class PemReader {
private static final Logger LOGGER = Logger.getLogger(PemReader.class.getName());

private static final Pattern CERT_PATTERN = Pattern.compile(
"-+BEGIN\\s+.*CERTIFICATE[^-]*-+(?:\\s|\\r|\\n)+" + // Header
"([a-z0-9+/=\\r\\n]+)" + // Base64 text
"-+END\\s+.*CERTIFICATE[^-]*-+", // Footer
"-+BEGIN\\s+.*CERTIFICATE[^-]*-+(?:\\s|\\r|\\n)+" // Header
+ "([a-z0-9+/=\\r\\n]+)" // Base64 text
+ "-+END\\s+.*CERTIFICATE[^-]*-+", // Footer
Pattern.CASE_INSENSITIVE);
private static final Pattern KEY_PATTERN = Pattern.compile(
"-+BEGIN\\s+.*PRIVATE\\s+KEY[^-]*-+(?:\\s|\\r|\\n)+" + // Header
"([a-z0-9+/=\\r\\n]+)" + // Base64 text
"-+END\\s+.*PRIVATE\\s+KEY[^-]*-+", // Footer
"-+BEGIN\\s+.*PRIVATE\\s+KEY[^-]*-+(?:\\s|\\r|\\n)+" // Header
+ "([a-z0-9+/=\\r\\n]+)" // Base64 text
+ "-+END\\s+.*PRIVATE\\s+KEY[^-]*-+", // Footer
Pattern.CASE_INSENSITIVE);
private static final Pattern PUBLIC_KEY_PATTERN = Pattern.compile(
"-+BEGIN\\s+.*PUBLIC\\s+KEY[^-]*-+(?:\\s|\\r|\\n)+" + // Header
"([a-z0-9+/=\\r\\n\\s]+)" + // Base64 text
"-+END\\s+.*PUBLIC\\s+KEY[^-]*-+", // Footer
"-+BEGIN\\s+.*PUBLIC\\s+KEY[^-]*-+(?:\\s|\\r|\\n)+" // Header
+ "([a-z0-9+/=\\r\\n\\s]+)" // Base64 text
+ "-+END\\s+.*PUBLIC\\s+KEY[^-]*-+", // Footer
Pattern.CASE_INSENSITIVE);

private PemReader() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
* 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.helidon.common.reactive;
Expand Down Expand Up @@ -428,6 +427,9 @@ public Multi<ByteBuffer> build() {
}
}

/**
* Fluent API builder for {@link io.helidon.common.reactive.OutputStreamMulti}.
*/
final class OutputStreamMultiBuilder implements Builder<OutputStreamMulti> {

private final OutputStreamMulti streamMulti = new OutputStreamMulti();
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 @@ -44,6 +44,9 @@
import org.eclipse.microprofile.config.spi.ConfigSource;
import org.eclipse.microprofile.config.spi.Converter;

/**
* Implementation of the basic MicroProfile {@link org.eclipse.microprofile.config.Config} API.
*/
public class MpConfigImpl implements Config {
private static final Logger LOGGER = Logger.getLogger(MpConfigImpl.class.getName());
// for references resolving
Expand Down
5 changes: 4 additions & 1 deletion etc/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright (c) 2016, 2020 Oracle and/or its affiliates.
Copyright (c) 2016, 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 @@ -120,6 +120,9 @@
<module name="JavadocType">
<property name="scope" value="protected"/>
</module>
<module name="MissingJavadocType">
<property name="scope" value="protected"/>
</module>
<module name="JavadocVariable">
<property name="scope" value="protected"/>
</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
import io.helidon.examples.integrations.neo4j.mp.domain.Movie;
import io.helidon.examples.integrations.neo4j.mp.domain.MovieRepository;

/**
* REST endpoint for movies.
*/
@Path("/movies")
@RequestScoped
public class Neo4jResource {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +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 @@ -13,7 +12,6 @@
* 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.helidon.examples.messaging.se;
Expand All @@ -29,7 +27,7 @@

import org.apache.activemq.jndi.ActiveMQInitialContextFactory;

public class SendingService implements Service {
class SendingService implements Service {

private final Emitter<String> emitter;
private final Messaging messaging;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +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 @@ -13,7 +12,6 @@
* 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.helidon.examples.messaging.se;
Expand All @@ -38,6 +36,9 @@

import org.apache.activemq.jndi.ActiveMQInitialContextFactory;

/**
* WebSocket endpoint.
*/
public class WebSocketEndpoint extends Endpoint {

private static final Logger LOGGER = Logger.getLogger(WebSocketEndpoint.class.getName());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
* Copyright (c) 2020, 2021 Oracle and/or its affiliates.
*
Expand All @@ -13,7 +12,6 @@
* 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.helidon.examples.messaging.se;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +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 @@ -13,7 +12,6 @@
* 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.helidon.examples.messaging.se;
Expand All @@ -28,7 +26,7 @@

import org.apache.kafka.common.serialization.StringSerializer;

public class SendingService implements Service {
class SendingService implements Service {

private final Emitter<String> emitter;
private final Messaging messaging;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +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 @@ -13,7 +12,6 @@
* 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.helidon.examples.messaging.se;
Expand All @@ -38,6 +36,9 @@

import org.apache.kafka.common.serialization.StringDeserializer;

/**
* Web socket endpoint.
*/
public class WebSocketEndpoint extends Endpoint {

private static final Logger LOGGER = Logger.getLogger(WebSocketEndpoint.class.getName());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 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 @@ -41,6 +41,9 @@
import org.glassfish.jersey.media.multipart.BodyPartEntity;
import org.glassfish.jersey.media.multipart.MultiPart;

/**
* File service.
*/
@Path("/api")
@ApplicationScoped
public class FileService {
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 @@ -25,6 +25,9 @@
import io.helidon.media.common.MessageBodyReader;
import io.helidon.media.common.MessageBodyReaderContext;

/**
* Reader for the custom media type.
*/
public class NameReader implements MessageBodyReader<Name> {

private static final MediaType TYPE = MediaType.parse("application/name");
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 @@ -26,6 +26,9 @@

import io.helidon.messaging.MessagingException;

/**
* A JMS Bytes message representation.
*/
public class JmsBytesMessage extends AbstractJmsMessage<byte[]> {

private final javax.jms.BytesMessage msg;
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,6 +22,9 @@

import io.helidon.messaging.MessagingException;

/**
* A JMS Text message representation.
*/
public class JmsTextMessage extends AbstractJmsMessage<String> {

private final javax.jms.TextMessage msg;
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 @@ -25,6 +25,12 @@
import org.apache.kafka.common.header.Headers;
import org.apache.kafka.common.header.internals.RecordHeaders;

/**
* Kafka specific Micro Profile Reactive Messaging Producer Message.
*
* @param <K> the type of Kafka record key
* @param <V> the type of Kafka record value
*/
public class KafkaProducerMessage<K, V> implements KafkaMessage<K, V> {

private final Headers headers;
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 @@ -12,7 +12,6 @@
* 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.helidon.messaging;
Expand Down Expand Up @@ -63,6 +62,9 @@ static Builder builder() {
return new Builder();
}

/**
* Fluent API builder for {@link io.helidon.messaging.Messaging}.
*/
final class Builder implements io.helidon.common.Builder<Messaging> {

private final MessagingImpl messaging;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
* 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.helidon.metrics.exemplartrace;

Expand All @@ -21,6 +20,9 @@

import io.opentracing.SpanContext;

/**
* Service provider for {@link io.helidon.metrics.ExemplarService}.
*/
public class TraceExemplarService implements ExemplarService {
@Override
public String label() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020 Oracle and/or its affiliates.
* Copyright (c) 2018, 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 @@ -497,9 +497,9 @@ public static class Builder implements io.helidon.common.Builder<JwtAuthProvider
private static final String CONFIG_PUBLIC_KEY_PATH = "mp.jwt.verify.publickey.location";
private static final String JSON_START_MARK = "{";
private static final Pattern PUBLIC_KEY_PATTERN = Pattern.compile(
"-+BEGIN\\s+.*PUBLIC\\s+KEY[^-]*-+(?:\\s|\\r|\\n)+" + // Header
"([a-z0-9+/=\\r\\n\\s]+)" + // Base64 text
"-+END\\s+.*PUBLIC\\s+KEY[^-]*-+", // Footer
"-+BEGIN\\s+.*PUBLIC\\s+KEY[^-]*-+(?:\\s|\\r|\\n)+" // Header
+ "([a-z0-9+/=\\r\\n\\s]+)" // Base64 text
+ "-+END\\s+.*PUBLIC\\s+KEY[^-]*-+", // Footer
Pattern.CASE_INSENSITIVE);

private String expectedIssuer;
Expand Down
Loading