From bf97ef3a084f449983a67298b5eedb3f6d8868ab Mon Sep 17 00:00:00 2001 From: Redkale <8730487+redkale@users.noreply.github.com> Date: Sun, 26 Jan 2020 14:03:49 +0800 Subject: [PATCH] --- src/org/redkale/net/http/Rest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/redkale/net/http/Rest.java b/src/org/redkale/net/http/Rest.java index 1f1629dc5..37f19c07e 100644 --- a/src/org/redkale/net/http/Rest.java +++ b/src/org/redkale/net/http/Rest.java @@ -1555,7 +1555,7 @@ public final class Rest { RestUploadFile ru = field.getAnnotation(RestUploadFile.class); RestURI ri = field.getAnnotation(RestURI.class); if (rh == null && rc == null && ra == null && rb == null && rs == null && ru == null && ri == null) continue; - if (rh != null && field.getType() != String.class) throw new RuntimeException("@RestHeader must on String Field in " + field); + if (rh != null && field.getType() != String.class && field.getType() != InetSocketAddress.class) throw new RuntimeException("@RestHeader must on String Field in " + field); if (rc != null && field.getType() != String.class) throw new RuntimeException("@RestCookie must on String Field in " + field); if (rs != null && field.getType() != String.class) throw new RuntimeException("@RestSessionid must on String Field in " + field); if (ra != null && field.getType() != String.class) throw new RuntimeException("@RestAddress must on String Field in " + field);