Skip to content
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
Prev Previous commit
Javadoc and serialVersionUID
  • Loading branch information
rbygrave committed Aug 2, 2023
commit f99dc1bff3ad7a8e665c7ed550ec06c006b9371e
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
package io.avaje.http.api;

class DefaultException extends Exception {}
class DefaultException extends Exception {

private static final long serialVersionUID = 1;

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* This also serves as a mapping hint if the annotation itself does not narrow the exception
* types through its {@link #value()}.
* <li>Request and/or response objects (typically from the microframework). You may choose any
* specific request/response type, e.g. Javalin's {@link io.javalin.Context} or Helidon's
* Request/ServerResponse.
* specific request/response type, e.g. Javalin's {@code io.javalin.Context} or Helidon's
* ServerRequest/ServerResponse.
* </ol>
*
* <p>Handler methods may be void or return an object for serialization.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*/
public class InvalidPathArgumentException extends InvalidTypeArgumentException {

private static final long serialVersionUID = 1;

/**
* Construct with a message.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*/
public class InvalidTypeArgumentException extends IllegalArgumentException {

private static final long serialVersionUID = 1;

/**
* Construct with a message.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public static int asInt(String value) {
}

/** Convert to enum. */
@SuppressWarnings({"unchecked", "rawtypes"})
public static <T> Enum asEnum(Class<T> clazz, String value) {
checkNull(value);
try {
Expand Down
3 changes: 2 additions & 1 deletion http-api/src/main/java/io/avaje/http/api/Post.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
*
* @Post
* void save(Customer customer) {
...
* ...
* }
* }</pre>
*/
@Target(METHOD)
@Retention(RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*/
public class RequiredArgumentException extends IllegalArgumentException {

private static final long serialVersionUID = 1;

private String property;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.avaje.http.api;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

Expand Down Expand Up @@ -67,7 +68,9 @@ public void setErrors(List<Violation> errors) {
}

/** Error details including the field, error message and path */
public static class Violation {
public static class Violation implements Serializable {

private static final long serialVersionUID = 1;

protected String path;
protected String field;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public Segment segment(String varName) {
}

/**
* Return full path with <code>{}</code for named path params.
* Return full path with <code>{}</code> for named path params.
*/
public String fullPath() {
return fullPath("{", "}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
*
* @After
* void save(Customer customer) {
* ...
* ...
* }
*
* }</pre>
*/
@Target(METHOD)
@Retention(SOURCE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
*
* @Before
* void save(Customer customer) {
* ...
* ...
* }
*
* }</pre>
*/
@Target(METHOD)
@Retention(SOURCE)
Expand Down