You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2026/07/19 17:26:10 UTC
(juneau) branch master updated: Pre-10.0.0 cleanup batch: CopyUtils extraction + Shorts.cp aliases, null-coalesce/IDIOM sweeps, StringUtils de-Shorts, and assorted fixes
This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new ac4304e237 Pre-10.0.0 cleanup batch: CopyUtils extraction + Shorts.cp aliases, null-coalesce/IDIOM sweeps, StringUtils de-Shorts, and assorted fixes
ac4304e237 is described below
commit ac4304e23774ab6ccca5e267aed5a96523457377
Author: James Bognar <ja...@apache.org>
AuthorDate: Sun Jul 19 13:25:48 2026 -0400
Pre-10.0.0 cleanup batch: CopyUtils extraction + Shorts.cp aliases, null-coalesce/IDIOM sweeps, StringUtils de-Shorts, and assorted fixes
- TODO-264: move the copyOf/cloneOf family into new CopyUtils (+ SwaggerCopyUtils/OpenApiCopyUtils); hard-remove CollectionUtils.copyOf (10.0.0 breaking change).
- Add Shorts.cp(...) facade aliases for the CopyUtils.copyOf family; migrate consumer call sites.
- TODO-261: null-coalesce (x==null?d:x) -> Shorts.or(x,d) sweep + standardize static Shorts imports; boolean/Boolean sites kept as ternaries (Shorts.or overload ambiguity).
- TODO-238: IDIOM-dimension mechanical sweep across non-churn modules.
- TODO-267: de-Shorts StringUtils (use ObjectUtils.coalesce), completing the utils-layer Shorts-free invariant.
- Collapse leftover MessageFormat ''-escapes in printf format strings.
- openapi3: deep-copy fixes in bean copy-constructors (shared-mutable-bean bugs).
Co-authored-by: Cursor <cu...@cursor.com>
---
.../org/apache/juneau/bean/atom/AtomBuilder.java | 46 ++--
.../java/org/apache/juneau/bean/atom/Category.java | 2 +-
.../org/apache/juneau/bean/atom/CommonEntry.java | 33 +--
.../java/org/apache/juneau/bean/atom/Content.java | 2 +-
.../java/org/apache/juneau/bean/atom/Entry.java | 12 +-
.../java/org/apache/juneau/bean/atom/Feed.java | 17 +-
.../org/apache/juneau/bean/atom/Generator.java | 2 +-
.../java/org/apache/juneau/bean/atom/Icon.java | 2 +-
.../main/java/org/apache/juneau/bean/atom/Id.java | 2 +-
.../java/org/apache/juneau/bean/atom/Link.java | 6 +-
.../java/org/apache/juneau/bean/atom/Logo.java | 2 +-
.../java/org/apache/juneau/bean/atom/Person.java | 2 +-
.../java/org/apache/juneau/bean/atom/Text.java | 2 +-
.../java/org/apache/juneau/bean/LinkString.java | 4 +-
.../java/org/apache/juneau/bean/hal/HalLink.java | 18 +-
.../org/apache/juneau/bean/hal/HalResource.java | 36 +--
.../main/java/org/apache/juneau/bean/html5/A.java | 14 +-
.../java/org/apache/juneau/bean/html5/Area.java | 22 +-
.../java/org/apache/juneau/bean/html5/Article.java | 10 +-
.../java/org/apache/juneau/bean/html5/Audio.java | 15 +-
.../java/org/apache/juneau/bean/html5/Base.java | 5 +-
.../org/apache/juneau/bean/html5/Blockquote.java | 4 +-
.../java/org/apache/juneau/bean/html5/Body.java | 14 +-
.../java/org/apache/juneau/bean/html5/Button.java | 27 +-
.../java/org/apache/juneau/bean/html5/Canvas.java | 6 +-
.../java/org/apache/juneau/bean/html5/Col.java | 3 +-
.../org/apache/juneau/bean/html5/Colgroup.java | 3 +-
.../java/org/apache/juneau/bean/html5/Data.java | 5 +-
.../java/org/apache/juneau/bean/html5/Del.java | 6 +-
.../java/org/apache/juneau/bean/html5/Embed.java | 7 +-
.../org/apache/juneau/bean/html5/Fieldset.java | 7 +-
.../java/org/apache/juneau/bean/html5/Form.java | 22 +-
.../java/org/apache/juneau/bean/html5/Html.java | 4 +-
.../org/apache/juneau/bean/html5/HtmlBuilder.java | 249 +++++++++---------
.../org/apache/juneau/bean/html5/HtmlElement.java | 138 +++++-----
.../juneau/bean/html5/HtmlElementContainer.java | 11 +-
.../apache/juneau/bean/html5/HtmlElementMixed.java | 9 +-
.../juneau/bean/html5/HtmlElementRawText.java | 2 +-
.../apache/juneau/bean/html5/HtmlElementText.java | 2 +-
.../java/org/apache/juneau/bean/html5/Iframe.java | 11 +-
.../java/org/apache/juneau/bean/html5/Img.java | 12 +-
.../java/org/apache/juneau/bean/html5/Input.java | 56 ++--
.../java/org/apache/juneau/bean/html5/Ins.java | 6 +-
.../java/org/apache/juneau/bean/html5/Keygen.java | 10 +-
.../java/org/apache/juneau/bean/html5/Label.java | 6 +-
.../java/org/apache/juneau/bean/html5/Legend.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Li.java | 2 +-
.../java/org/apache/juneau/bean/html5/Link.java | 17 +-
.../java/org/apache/juneau/bean/html5/Map.java | 4 +-
.../java/org/apache/juneau/bean/html5/Mark.java | 2 +-
.../java/org/apache/juneau/bean/html5/Meta.java | 8 +-
.../java/org/apache/juneau/bean/html5/Meter.java | 8 +-
.../org/apache/juneau/bean/html5/Noscript.java | 2 +-
.../java/org/apache/juneau/bean/html5/Object_.java | 15 +-
.../main/java/org/apache/juneau/bean/html5/Ol.java | 6 +-
.../org/apache/juneau/bean/html5/Optgroup.java | 5 +-
.../java/org/apache/juneau/bean/html5/Option.java | 11 +-
.../java/org/apache/juneau/bean/html5/Output.java | 8 +-
.../java/org/apache/juneau/bean/html5/Param.java | 7 +-
.../java/org/apache/juneau/bean/html5/Pre.java | 2 +-
.../org/apache/juneau/bean/html5/Progress.java | 4 +-
.../main/java/org/apache/juneau/bean/html5/Q.java | 4 +-
.../main/java/org/apache/juneau/bean/html5/Rb.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Rp.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Rt.java | 2 +-
.../java/org/apache/juneau/bean/html5/Rtc.java | 2 +-
.../java/org/apache/juneau/bean/html5/Ruby.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/S.java | 2 +-
.../java/org/apache/juneau/bean/html5/Samp.java | 2 +-
.../java/org/apache/juneau/bean/html5/Script.java | 13 +-
.../java/org/apache/juneau/bean/html5/Select.java | 16 +-
.../java/org/apache/juneau/bean/html5/Small.java | 2 +-
.../java/org/apache/juneau/bean/html5/Source.java | 7 +-
.../java/org/apache/juneau/bean/html5/Span.java | 2 +-
.../java/org/apache/juneau/bean/html5/Strong.java | 2 +-
.../java/org/apache/juneau/bean/html5/Style.java | 6 +-
.../java/org/apache/juneau/bean/html5/Sub.java | 2 +-
.../java/org/apache/juneau/bean/html5/Sup.java | 2 +-
.../java/org/apache/juneau/bean/html5/Table.java | 3 +-
.../java/org/apache/juneau/bean/html5/Tbody.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Td.java | 6 +-
.../org/apache/juneau/bean/html5/Template.java | 4 +-
.../org/apache/juneau/bean/html5/Textarea.java | 28 +-
.../java/org/apache/juneau/bean/html5/Tfoot.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Th.java | 12 +-
.../java/org/apache/juneau/bean/html5/Thead.java | 2 +-
.../java/org/apache/juneau/bean/html5/Time.java | 4 +-
.../java/org/apache/juneau/bean/html5/Title.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Tr.java | 2 +-
.../java/org/apache/juneau/bean/html5/Track.java | 13 +-
.../main/java/org/apache/juneau/bean/html5/U.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Ul.java | 2 +-
.../java/org/apache/juneau/bean/html5/Var.java | 2 +-
.../java/org/apache/juneau/bean/html5/Video.java | 19 +-
.../juneau/bean/jsonapi/JsonApiDocument.java | 22 +-
.../apache/juneau/bean/jsonapi/JsonApiError.java | 22 +-
.../juneau/bean/jsonapi/JsonApiErrorSource.java | 6 +-
.../apache/juneau/bean/jsonapi/JsonApiLink.java | 20 +-
.../juneau/bean/jsonapi/JsonApiRelationship.java | 14 +-
.../juneau/bean/jsonapi/JsonApiResource.java | 33 +--
.../bean/jsonapi/JsonApiResourceIdentifier.java | 14 +-
.../apache/juneau/bean/jsonapi/JsonApiVersion.java | 10 +-
.../org/apache/juneau/bean/jsonpatch/AddOp.java | 6 +-
.../org/apache/juneau/bean/jsonpatch/CopyOp.java | 6 +-
.../juneau/bean/jsonpatch/JsonPatchOperation.java | 4 +-
.../org/apache/juneau/bean/jsonpatch/MoveOp.java | 6 +-
.../org/apache/juneau/bean/jsonpatch/RemoveOp.java | 2 +-
.../apache/juneau/bean/jsonpatch/ReplaceOp.java | 6 +-
.../org/apache/juneau/bean/jsonpatch/TestOp.java | 6 +-
.../apache/juneau/bean/jsonschema/JsonSchema.java | 62 ++---
.../bean/jsonschema/JsonSchemaBeanGenerator.java | 14 +-
.../juneau/bean/jsonschema/JsonSchemaMap.java | 6 +-
.../juneau/bean/jsonschema/JsonSchemaProperty.java | 6 +-
.../jsonschema/JsonSchemaPropertySimpleArray.java | 4 +-
.../JsonSchemaPropertyValidatorFactory.java | 2 +-
.../bean/jsonschema/JsonSchemaValidator.java | 55 ++--
.../apache/juneau/bean/jsonschema/JsonType.java | 2 +-
.../juneau/bean/mcp/BlobResourceContents.java | 6 +-
.../apache/juneau/bean/mcp/CallToolRequest.java | 8 +-
.../org/apache/juneau/bean/mcp/CallToolResult.java | 8 +-
.../apache/juneau/bean/mcp/ClientCapabilities.java | 12 +-
.../juneau/bean/mcp/EmbeddedResourceContent.java | 2 +-
.../apache/juneau/bean/mcp/GetPromptRequest.java | 8 +-
.../apache/juneau/bean/mcp/GetPromptResult.java | 8 +-
.../org/apache/juneau/bean/mcp/ImageContent.java | 4 +-
.../org/apache/juneau/bean/mcp/Implementation.java | 4 +-
.../apache/juneau/bean/mcp/InitializeRequest.java | 6 +-
.../apache/juneau/bean/mcp/InitializeResult.java | 8 +-
.../org/apache/juneau/bean/mcp/JsonRpcError.java | 4 +-
.../org/apache/juneau/bean/mcp/JsonRpcRequest.java | 8 +-
.../apache/juneau/bean/mcp/JsonRpcResponse.java | 8 +-
.../org/apache/juneau/bean/mcp/JsonSchema.java | 20 +-
.../apache/juneau/bean/mcp/ListPromptsResult.java | 8 +-
.../juneau/bean/mcp/ListResourcesResult.java | 8 +-
.../apache/juneau/bean/mcp/ListToolsResult.java | 8 +-
.../apache/juneau/bean/mcp/LoggingCapability.java | 2 +-
.../org/apache/juneau/bean/mcp/McpException.java | 8 +-
.../java/org/apache/juneau/bean/mcp/Prompt.java | 10 +-
.../org/apache/juneau/bean/mcp/PromptArgument.java | 6 +-
.../apache/juneau/bean/mcp/PromptCapability.java | 2 +-
.../org/apache/juneau/bean/mcp/PromptMessage.java | 4 +-
.../juneau/bean/mcp/ReadResourceRequest.java | 2 +-
.../apache/juneau/bean/mcp/ReadResourceResult.java | 6 +-
.../java/org/apache/juneau/bean/mcp/Resource.java | 12 +-
.../apache/juneau/bean/mcp/ResourceCapability.java | 4 +-
.../apache/juneau/bean/mcp/RootsCapability.java | 2 +-
.../apache/juneau/bean/mcp/ServerCapabilities.java | 14 +-
.../org/apache/juneau/bean/mcp/TextContent.java | 2 +-
.../juneau/bean/mcp/TextResourceContents.java | 6 +-
.../main/java/org/apache/juneau/bean/mcp/Tool.java | 6 +-
.../org/apache/juneau/bean/mcp/ToolCapability.java | 2 +-
.../bean/mcp/JsonSchema_Finiteness_Test.java | 75 ++++++
.../org/apache/juneau/bean/openapi3/Callback.java | 5 +-
.../apache/juneau/bean/openapi3/Components.java | 37 ++-
.../apache/juneau/bean/openapi3/Discriminator.java | 2 +-
.../org/apache/juneau/bean/openapi3/Encoding.java | 2 +-
.../apache/juneau/bean/openapi3/HeaderInfo.java | 3 +-
.../java/org/apache/juneau/bean/openapi3/Info.java | 5 +-
.../org/apache/juneau/bean/openapi3/Items.java | 13 +-
.../java/org/apache/juneau/bean/openapi3/Link.java | 3 +-
.../org/apache/juneau/bean/openapi3/MediaType.java | 3 +-
.../apache/juneau/bean/openapi3/OAuthFlows.java | 9 +-
.../org/apache/juneau/bean/openapi3/OpenApi.java | 11 +-
.../juneau/bean/openapi3/OpenApiCopyUtils.java | 168 ++++++++++++
.../juneau/bean/openapi3/OpenApiElement.java | 4 +-
.../org/apache/juneau/bean/openapi3/Operation.java | 5 +-
.../org/apache/juneau/bean/openapi3/Parameter.java | 5 +-
.../org/apache/juneau/bean/openapi3/PathItem.java | 22 +-
.../juneau/bean/openapi3/RequestBodyInfo.java | 2 +-
.../org/apache/juneau/bean/openapi3/Response.java | 6 +-
.../apache/juneau/bean/openapi3/SchemaInfo.java | 15 +-
.../juneau/bean/openapi3/SecurityRequirement.java | 3 +-
.../juneau/bean/openapi3/SecuritySchemeInfo.java | 3 +-
.../org/apache/juneau/bean/openapi3/Server.java | 2 +-
.../juneau/bean/openapi3/ServerVariable.java | 2 +-
.../java/org/apache/juneau/bean/openapi3/Tag.java | 3 +-
.../apache/juneau/bean/openapi3/ui/OpenApiUI.java | 4 +-
.../apache/juneau/bean/openapi3/ui/RedocUI.java | 8 +-
.../apache/juneau/bean/openapi3/Callback_Test.java | 2 +-
.../juneau/bean/openapi3/Components_Test.java | 2 +-
.../apache/juneau/bean/openapi3/OpenApi_Test.java | 2 +-
.../juneau/bean/openapi3/Parameter_Test.java | 2 +-
.../apache/juneau/bean/openapi3/PathItem_Test.java | 2 +-
.../juneau/bean/openapi3/SchemaInfo_Test.java | 2 +-
.../org/apache/juneau/bean/rfc7807/Problem.java | 12 +-
.../juneau/bean/rfc7807/ProblemMapperList.java | 6 +-
.../org/apache/juneau/bean/swagger/HeaderInfo.java | 3 +-
.../java/org/apache/juneau/bean/swagger/Info.java | 5 +-
.../java/org/apache/juneau/bean/swagger/Items.java | 3 +-
.../org/apache/juneau/bean/swagger/Operation.java | 3 +-
.../apache/juneau/bean/swagger/ParameterInfo.java | 9 +-
.../apache/juneau/bean/swagger/ResponseInfo.java | 7 +-
.../org/apache/juneau/bean/swagger/SchemaInfo.java | 9 +-
.../org/apache/juneau/bean/swagger/Swagger.java | 5 +-
.../juneau/bean/swagger/SwaggerCopyUtils.java | 108 ++++++++
.../apache/juneau/bean/swagger/SwaggerElement.java | 4 +-
.../java/org/apache/juneau/bean/swagger/Tag.java | 3 +-
.../apache/juneau/bean/swagger/ui/SwaggerUI.java | 4 +-
.../juneau/bean/swagger/ParameterInfo_Test.java | 2 +-
.../juneau/bean/swagger/ResponseInfo_Test.java | 2 +-
.../apache/juneau/commons/AnnotationObject.java | 4 +-
.../juneau/commons/AppliedAnnotationObject.java | 64 ++---
.../commons/AppliedOnClassAnnotationObject.java | 8 +-
.../juneau/commons/BasicRuntimeException.java | 4 +-
.../juneau/commons/bean/BeanConfigContext.java | 6 +-
.../juneau/commons/bean/BeanCtorAnnotation.java | 10 +-
.../juneau/commons/bean/BeanIgnoreAnnotation.java | 8 +-
.../org/apache/juneau/commons/bean/BeanMap.java | 14 +-
.../apache/juneau/commons/bean/BeanMapEntry.java | 5 +-
.../org/apache/juneau/commons/bean/BeanMeta.java | 8 +-
.../juneau/commons/bean/BeanPropAnnotation.java | 30 +--
.../juneau/commons/bean/BeanPropertyMeta.java | 56 ++--
.../juneau/commons/bean/BeanPropertyValue.java | 6 +-
.../commons/bean/BeanProxyInvocationHandler.java | 2 +-
.../juneau/commons/bean/BeanTypeAnnotation.java | 32 +--
.../apache/juneau/commons/bean/PropertyNamer.java | 4 +-
.../apache/juneau/commons/collections/BidiMap.java | 18 +-
.../apache/juneau/commons/collections/Cache.java | 4 +-
.../apache/juneau/commons/collections/Cache2.java | 2 +-
.../apache/juneau/commons/collections/Cache3.java | 2 +-
.../apache/juneau/commons/collections/Cache4.java | 26 +-
.../apache/juneau/commons/collections/Cache5.java | 32 +--
.../commons/collections/ControlledArrayList.java | 2 +-
.../juneau/commons/collections/FilteredList.java | 4 +-
.../juneau/commons/collections/FilteredMap.java | 4 +-
.../juneau/commons/collections/FilteredSet.java | 4 +-
.../apache/juneau/commons/collections/HashKey.java | 8 +-
.../juneau/commons/collections/SimpleMap.java | 6 +-
.../juneau/commons/conversion/BasicConverter.java | 32 +--
.../commons/conversion/CachingConverter.java | 10 +-
.../juneau/commons/conversion/Converter.java | 8 +-
.../apache/juneau/commons/function/Suppliers.java | 16 +-
.../org/apache/juneau/commons/function/Tuple1.java | 4 +-
.../org/apache/juneau/commons/function/Tuple2.java | 8 +-
.../org/apache/juneau/commons/function/Tuple3.java | 12 +-
.../org/apache/juneau/commons/function/Tuple4.java | 16 +-
.../org/apache/juneau/commons/function/Tuple5.java | 20 +-
.../apache/juneau/commons/http/HeaderElement.java | 4 +-
.../org/apache/juneau/commons/http/MediaRange.java | 2 +-
.../apache/juneau/commons/http/MediaRanges.java | 8 +-
.../org/apache/juneau/commons/http/MediaType.java | 11 +-
.../apache/juneau/commons/http/StringRanges.java | 13 +-
.../commons/httppart/HttpPartCollectionFormat.java | 4 +-
.../juneau/commons/httppart/HttpPartDataType.java | 2 +-
.../juneau/commons/httppart/HttpPartFormat.java | 2 +-
.../juneau/commons/inject/BasicBeanStore.java | 58 ++---
.../juneau/commons/inject/BeanAnnotation.java | 18 +-
.../juneau/commons/inject/BeanInstantiator.java | 36 +--
.../apache/juneau/commons/inject/BeanStore.java | 8 +-
.../apache/juneau/commons/inject/JsrSupport.java | 30 ++-
.../apache/juneau/commons/inject/StackOverlay.java | 2 +-
.../juneau/commons/inject/ValueResolver.java | 24 +-
.../juneau/commons/inject/WritableBeanStore.java | 2 +-
.../juneau/commons/io/CharSequenceReader.java | 12 +-
.../juneau/commons/io/FileReaderBuilder.java | 8 +-
.../juneau/commons/io/FileWriterBuilder.java | 6 +-
.../apache/juneau/commons/io/MimeTypeDetector.java | 12 +-
.../juneau/commons/io/PathReaderBuilder.java | 4 +-
.../juneau/commons/io/ReaderInputStream.java | 4 +-
.../juneau/commons/io/StringBuilderWriter.java | 5 +-
.../org/apache/juneau/commons/lang/AsciiMap.java | 4 +-
.../org/apache/juneau/commons/lang/AsciiSet.java | 12 +-
.../apache/juneau/commons/lang/BooleanHolder.java | 10 +-
.../org/apache/juneau/commons/lang/ByteHolder.java | 12 +-
.../org/apache/juneau/commons/lang/CharHolder.java | 14 +-
.../apache/juneau/commons/lang/DoubleHolder.java | 6 +-
.../apache/juneau/commons/lang/FloatHolder.java | 6 +-
.../org/apache/juneau/commons/lang/HashCode.java | 8 +-
.../org/apache/juneau/commons/lang/Holder.java | 14 +-
.../apache/juneau/commons/lang/IntegerHolder.java | 12 +-
.../org/apache/juneau/commons/lang/LongHolder.java | 12 +-
.../apache/juneau/commons/lang/ShortHolder.java | 12 +-
.../org/apache/juneau/commons/lang/StateEnum.java | 2 +-
.../apache/juneau/commons/lang/StringHolder.java | 8 +-
.../org/apache/juneau/commons/lang/Version.java | 11 +-
.../apache/juneau/commons/lang/VersionRange.java | 4 +-
.../juneau/commons/lang/WeightedAverage.java | 2 +-
.../apache/juneau/commons/logging/LogRecord.java | 4 +-
.../org/apache/juneau/commons/logging/Logger.java | 10 +-
.../juneau/commons/reflect/AccessibleInfo.java | 2 +-
.../juneau/commons/reflect/AnnotationInfo.java | 15 +-
.../juneau/commons/reflect/AnnotationProvider.java | 52 ++--
.../commons/reflect/BeanRuntimeException.java | 4 +-
.../apache/juneau/commons/reflect/ClassInfo.java | 48 ++--
.../juneau/commons/reflect/ClassInfoTyped.java | 6 +-
.../juneau/commons/reflect/ConstructorInfo.java | 6 +-
.../juneau/commons/reflect/ExecutableInfo.java | 8 +-
.../apache/juneau/commons/reflect/FieldInfo.java | 18 +-
.../apache/juneau/commons/reflect/MethodInfo.java | 8 +-
.../apache/juneau/commons/reflect/PackageInfo.java | 8 +-
.../juneau/commons/reflect/ParameterInfo.java | 28 +-
.../juneau/commons/reflect/ReflectionMap.java | 14 +-
.../juneau/commons/reflect/ReflectionUtils.java | 6 +-
.../juneau/commons/reflect/TypeVariables.java | 68 ++---
.../apache/juneau/commons/reflect/Visibility.java | 6 +-
.../org/apache/juneau/commons/runtime/Args.java | 12 +-
.../juneau/commons/runtime/ManifestFile.java | 26 +-
.../commons/settings/DotenvPropertySource.java | 2 +-
.../commons/settings/FunctionalPropertyStore.java | 17 ++
.../settings/ManifestFilePropertySource.java | 2 +-
.../commons/settings/PropertyLookupResult.java | 2 +-
.../apache/juneau/commons/settings/Settings.java | 12 +-
.../apache/juneau/commons/svl/DefaultingVar.java | 2 +-
.../java/org/apache/juneau/commons/svl/MapVar.java | 4 +-
.../juneau/commons/svl/MultipartResolvingVar.java | 2 +-
.../apache/juneau/commons/svl/MultipartVar.java | 2 +-
.../org/apache/juneau/commons/svl/SimpleVar.java | 2 +-
.../org/apache/juneau/commons/svl/StreamedVar.java | 2 +-
.../apache/juneau/commons/svl/TemplateSegment.java | 13 -
.../apache/juneau/commons/svl/TypedFunction.java | 4 +-
.../java/org/apache/juneau/commons/svl/Var.java | 2 +-
.../org/apache/juneau/commons/svl/VarList.java | 4 +-
.../org/apache/juneau/commons/svl/VarResolver.java | 14 +-
.../juneau/commons/svl/VarResolverSession.java | 18 +-
.../org/apache/juneau/commons/svl/VarTemplate.java | 20 +-
.../juneau/commons/svl/VarTemplateCompiler.java | 8 +-
.../commons/svl/functions/JsonFunctions.java | 42 +--
.../juneau/commons/svl/functions/MiniJson.java | 12 +-
.../apache/juneau/commons/svl/vars/DotenvVar.java | 2 +-
.../apache/juneau/commons/svl/vars/EnvFileVar.java | 2 +-
.../juneau/commons/time/GranularZonedDateTime.java | 23 +-
.../juneau/commons/utils/AnnotationUtils.java | 2 +-
.../juneau/commons/utils/AssertionUtils.java | 20 +-
.../apache/juneau/commons/utils/ClassUtils.java | 18 +-
.../juneau/commons/utils/CollectionUtils.java | 260 +++++--------------
.../org/apache/juneau/commons/utils/CopyUtils.java | 285 +++++++++++++++++++++
.../org/apache/juneau/commons/utils/DateUtils.java | 2 +-
.../org/apache/juneau/commons/utils/FileUtils.java | 24 +-
.../org/apache/juneau/commons/utils/IoUtils.java | 61 ++---
.../apache/juneau/commons/utils/ObjectUtils.java | 52 ++--
.../juneau/commons/utils/PredicateUtils.java | 16 +-
.../juneau/commons/utils/ResourceBundleUtils.java | 4 +-
.../org/apache/juneau/commons/utils/Shorts.java | 284 ++++++++++++++++----
.../apache/juneau/commons/utils/StringUtils.java | 163 ++++++------
.../apache/juneau/commons/utils/SystemUtils.java | 8 +-
.../juneau/commons/utils/ThrowableUtils.java | 34 +--
.../juneau/commons/utils/CollectionUtils_Test.java | 1 +
.../main/java/org/apache/juneau/config/Config.java | 6 +-
.../apache/juneau/config/ConfigPropertySource.java | 1 +
.../config/ConfigPropertySourceProvider.java | 4 +-
.../main/java/org/apache/juneau/config/Entry.java | 20 +-
.../apache/juneau/config/event/ConfigEvent.java | 6 +-
.../juneau/config/format/YamlConfigFormat.java | 2 +-
.../apache/juneau/config/internal/ConfigMap.java | 38 +--
.../juneau/config/internal/ConfigMapEntry.java | 5 +-
.../apache/juneau/config/store/ClasspathStore.java | 1 +
.../apache/juneau/config/ConfigImportsTest.java | 24 ++
.../org/apache/juneau/marshall/jena/RdfParser.java | 2 +-
.../juneau/marshall/jena/RdfParserSession.java | 2 +-
.../apache/juneau/marshall/jena/RdfSerializer.java | 4 +-
.../marshall/jena/RdfStreamParserSession.java | 2 +-
.../marshall/jena/RdfStreamSerializerSession.java | 2 +-
.../transforms/BinaryFormat_RoundTrip_Test.java | 25 +-
.../java/org/apache/juneau/marshall/Context.java | 18 +-
.../apache/juneau/marshall/ExampleAnnotation.java | 4 +-
.../juneau/marshall/ExternalDocsAnnotation.java | 4 +-
.../apache/juneau/marshall/ItemsAnnotation.java | 12 +-
.../juneau/marshall/MarshalledAnnotation.java | 6 +-
.../apache/juneau/marshall/MarshalledFilter.java | 10 +-
.../marshall/MarshalledIgnoreAnnotation.java | 4 +-
.../juneau/marshall/MarshalledPropAnnotation.java | 8 +-
.../marshall/MarshalledPropertyPostProcessor.java | 2 +-
.../apache/juneau/marshall/MarshallingContext.java | 24 +-
.../juneau/marshall/NamePropertyAnnotation.java | 4 +-
.../juneau/marshall/ParentPropertyAnnotation.java | 4 +-
.../apache/juneau/marshall/SchemaAnnotation.java | 41 ++-
.../apache/juneau/marshall/SubItemsAnnotation.java | 12 +-
.../org/apache/juneau/marshall/SwapAnnotation.java | 6 +-
.../org/apache/juneau/marshall/TemporalFormat.java | 3 +-
.../org/apache/juneau/marshall/UriAnnotation.java | 4 +-
.../juneau/marshall/bson/BsonAnnotation.java | 4 +-
.../juneau/marshall/bson/BsonOutputStream.java | 4 +-
.../juneau/marshall/cbor/CborAnnotation.java | 4 +-
.../juneau/marshall/cbor/CborOutputStream.java | 10 -
.../juneau/marshall/cbor/CborTokenReader.java | 4 +-
.../juneau/marshall/cp/ContextBeanCreator.java | 2 +-
.../org/apache/juneau/marshall/cp/Messages.java | 2 +-
.../apache/juneau/marshall/csv/CsvAnnotation.java | 4 +-
.../apache/juneau/marshall/csv/CsvCellParser.java | 4 +-
.../juneau/marshall/csv/CsvCellSerializer.java | 5 +-
.../org/apache/juneau/marshall/csv/CsvParser.java | 5 +-
.../juneau/marshall/csv/CsvParserSession.java | 2 +-
.../apache/juneau/marshall/csv/CsvSerializer.java | 5 +-
.../juneau/marshall/csv/CsvSerializerSession.java | 12 +-
.../juneau/marshall/encoders/EncoderSet.java | 4 +-
.../juneau/marshall/hocon/HoconParserSession.java | 2 +-
.../apache/juneau/marshall/hocon/HoconValue.java | 5 +-
.../juneau/marshall/html/HtmlAnnotation.java | 4 +-
.../juneau/marshall/html/HtmlDocSerializer.java | 4 +-
.../juneau/marshall/html/HtmlLinkAnnotation.java | 4 +-
.../apache/juneau/marshall/httppart/Constants.java | 150 -----------
.../juneau/marshall/httppart/HttpPartSchema.java | 2 +-
.../org/apache/juneau/marshall/ini/IniWriter.java | 2 +-
.../juneau/marshall/json/JsonAnnotation.java | 4 +-
.../marshall/json/JsonSerializerSession.java | 5 +-
.../juneau/marshall/markdown/MarkdownParser.java | 3 +-
.../marshall/markdown/MarkdownParserSession.java | 2 +-
.../marshall/markdown/MarkdownSerializer.java | 3 +-
.../markdown/MarkdownSerializerSession.java | 5 +-
.../juneau/marshall/msgpack/MsgPackAnnotation.java | 4 +-
.../marshall/msgpack/MsgPackTokenReader.java | 4 +-
.../marshall/msgpack/MsgPackTokenWriter.java | 13 +-
.../juneau/marshall/oapi/OpenApiAnnotation.java | 4 +-
.../marshall/parquet/ParquetColumnWriter.java | 4 -
.../marshall/parquet/ParquetParserSession.java | 2 +-
.../marshall/parquet/ParquetSchemaBuilder.java | 2 +-
.../marshall/parquet/ParquetSchemaElement.java | 4 +-
.../juneau/marshall/parquet/ParquetSerializer.java | 5 +-
.../marshall/parquet/ThriftCompactEncoder.java | 8 -
.../apache/juneau/marshall/parser/ParserSet.java | 2 +-
.../marshall/plaintext/PlainTextAnnotation.java | 4 +-
.../marshall/protobuf/ProtobufAnnotation.java | 4 +-
.../marshall/prototext/PrototextAnnotation.java | 4 +-
.../juneau/marshall/serializer/SerializerPipe.java | 2 +-
.../juneau/marshall/serializer/SerializerSet.java | 2 +-
.../juneau/marshall/soap/SoapXmlAnnotation.java | 4 +-
.../apache/juneau/marshall/stream/PojoWalker.java | 3 +-
.../apache/juneau/marshall/toml/TomlParser.java | 3 +-
.../juneau/marshall/toml/TomlSerializer.java | 3 +-
.../apache/juneau/marshall/uon/UonAnnotation.java | 4 +-
.../urlencoding/UrlEncodingAnnotation.java | 4 +-
.../apache/juneau/marshall/utils/Iso8601Utils.java | 3 +-
.../apache/juneau/marshall/xml/XmlAnnotation.java | 4 +-
.../transforms/BinaryFormat_RoundTrip_Test.java | 25 +-
.../test/assertions/FluentBooleanAssertion.java | 5 +-
.../test/assertions/FluentStringAssertion.java | 4 +-
.../apache/juneau/test/assertions/Messages.java | 3 +
.../apache/juneau/test/bct/BasicBeanConverter.java | 14 +-
.../org/apache/juneau/test/bct/Listifiers.java | 2 +-
.../apache/juneau/test/bct/NestedTokenizer.java | 5 +
.../test/junit/JuneauBeanStoreExtension.java | 4 +-
.../apache/juneau/test/junit/TestBeanStore.java | 8 +
.../examples/core/config/store/SqlStore.java | 5 +-
.../juneau/examples/core/pojo/PojoComplex.java | 4 +-
.../juneau/microservice/examples/LogParser.java | 48 ++--
.../juneau/microservice/examples/LogsResource.java | 4 +-
.../juneau/microservice/jetty/JettyLogger.java | 9 +-
.../microservice/jetty/JettyServerComponent.java | 4 +-
.../juneau/microservice/jetty/JettySettings.java | 4 +-
.../juneau/microservice/BootTimeBenchmark.java | 4 +-
.../microservice/tomcat/TomcatServerComponent.java | 4 +-
.../juneau/microservice/tomcat/TomcatSettings.java | 6 +-
.../org/apache/juneau/microservice/LogConfig.java | 10 +
.../apache/juneau/microservice/Microservice.java | 2 +-
.../microservice/logging/LogEntryFormatter.java | 26 +-
.../java/org/apache/juneau/petstore/dto/Pet.java | 6 +-
.../apache/juneau/petstore/service/PetStore.java | 9 +-
.../apachehttpclient45/ApacheHc45Transport.java | 16 +-
.../ApacheHc45TransportBuilder.java | 4 +-
.../apachehttpclient50/ApacheHc5Transport.java | 16 +-
.../ApacheHc5TransportBuilder.java | 4 +-
.../juneau/rest/client/classic/ResponseHeader.java | 8 +-
.../juneau/rest/client/classic/RestClient.java | 23 +-
.../juneau/rest/client/classic/RestRequest.java | 18 +-
.../rest/client/classic/remote/RemoteMeta.java | 2 +-
.../rest/client/jetty/JettyHttpTransport.java | 17 +-
.../client/jetty/JettyHttpTransportBuilder.java | 4 +-
.../juneau/rest/client/okhttp/OkHttpTransport.java | 8 +-
.../rest/client/okhttp/OkHttpTransportBuilder.java | 4 +-
.../apache/juneau/rest/client/ResponseBody.java | 8 +-
.../apache/juneau/rest/client/ResponseHeader.java | 2 +-
.../juneau/rest/client/remote/RemoteClient.java | 54 ++--
.../juneau/http/classic/BasicStatusLine.java | 8 +-
.../apache/juneau/http/classic/HttpHeaders.java | 41 +--
.../org/apache/juneau/http/classic/HttpParts.java | 4 +-
.../http/classic/entity/BasicHttpEntity.java | 6 +-
.../http/classic/entity/ByteArrayEntity.java | 9 +-
.../juneau/http/classic/entity/FileEntity.java | 12 +-
.../juneau/http/classic/entity/ReaderEntity.java | 8 +-
.../http/classic/entity/SerializedEntity.java | 10 +-
.../juneau/http/classic/entity/StreamEntity.java | 19 +-
.../juneau/http/classic/entity/StringEntity.java | 8 +-
.../http/classic/header/BasicBooleanHeader.java | 4 +-
.../juneau/http/classic/header/BasicCsvHeader.java | 9 +-
.../juneau/http/classic/header/BasicHeader.java | 19 +-
.../http/classic/header/BasicHeaderIterator.java | 2 +-
.../juneau/http/classic/header/HeaderBeanMeta.java | 6 +-
.../juneau/http/classic/header/HeaderList.java | 9 +-
.../http/classic/header/SerializedHeader.java | 24 +-
.../http/classic/part/BasicCsvArrayPart.java | 7 +-
.../apache/juneau/http/classic/part/BasicPart.java | 12 +-
.../http/classic/part/BasicPartIterator.java | 2 +-
.../juneau/http/classic/part/PartBeanMeta.java | 4 +-
.../apache/juneau/http/classic/part/PartList.java | 8 +-
.../juneau/http/classic/part/SerializedPart.java | 13 +-
.../classic/remote/RrpcInterfaceMethodMeta.java | 5 +-
.../http/classic/resource/BasicResource.java | 8 +-
.../http/classic/resource/ByteArrayResource.java | 2 +-
.../juneau/http/classic/resource/FileResource.java | 2 +-
.../http/classic/resource/ReaderResource.java | 2 +-
.../http/classic/resource/StreamResource.java | 2 +-
.../http/classic/resource/StringResource.java | 2 +-
.../juneau/http/classic/response/Accepted.java | 2 +-
.../http/classic/response/AlreadyReported.java | 2 +-
.../juneau/http/classic/response/BadRequest.java | 2 +-
.../http/classic/response/BasicHttpException.java | 28 +-
.../http/classic/response/BasicHttpResponse.java | 26 +-
.../juneau/http/classic/response/Conflict.java | 2 +-
.../juneau/http/classic/response/Continue.java | 2 +-
.../juneau/http/classic/response/Created.java | 2 +-
.../juneau/http/classic/response/EarlyHints.java | 2 +-
.../http/classic/response/ExpectationFailed.java | 2 +-
.../http/classic/response/FailedDependency.java | 2 +-
.../juneau/http/classic/response/Forbidden.java | 2 +-
.../apache/juneau/http/classic/response/Found.java | 2 +-
.../apache/juneau/http/classic/response/Gone.java | 2 +-
.../classic/response/HttpVersionNotSupported.java | 2 +-
.../juneau/http/classic/response/IMUsed.java | 2 +-
.../http/classic/response/InsufficientStorage.java | 2 +-
.../http/classic/response/InternalServerError.java | 2 +-
.../http/classic/response/LengthRequired.java | 2 +-
.../juneau/http/classic/response/Locked.java | 2 +-
.../juneau/http/classic/response/LoopDetected.java | 2 +-
.../http/classic/response/MethodNotAllowed.java | 2 +-
.../http/classic/response/MisdirectedRequest.java | 2 +-
.../http/classic/response/MovedPermanently.java | 2 +-
.../juneau/http/classic/response/MultiStatus.java | 2 +-
.../http/classic/response/MultipleChoices.java | 2 +-
.../response/NetworkAuthenticationRequired.java | 2 +-
.../juneau/http/classic/response/NoContent.java | 2 +-
.../response/NonAuthoritiveInformation.java | 2 +-
.../http/classic/response/NotAcceptable.java | 2 +-
.../juneau/http/classic/response/NotExtended.java | 2 +-
.../juneau/http/classic/response/NotFound.java | 2 +-
.../http/classic/response/NotImplemented.java | 2 +-
.../juneau/http/classic/response/NotModified.java | 2 +-
.../apache/juneau/http/classic/response/Ok.java | 2 +-
.../http/classic/response/PartialContent.java | 2 +-
.../http/classic/response/PayloadTooLarge.java | 2 +-
.../http/classic/response/PermanentRedirect.java | 2 +-
.../http/classic/response/PreconditionFailed.java | 2 +-
.../classic/response/PreconditionRequired.java | 2 +-
.../juneau/http/classic/response/Processing.java | 2 +-
.../http/classic/response/RangeNotSatisfiable.java | 2 +-
.../response/RequestHeaderFieldsTooLarge.java | 2 +-
.../juneau/http/classic/response/ResetContent.java | 2 +-
.../juneau/http/classic/response/SeeOther.java | 2 +-
.../http/classic/response/ServiceUnavailable.java | 2 +-
.../http/classic/response/SwitchingProtocols.java | 2 +-
.../http/classic/response/TemporaryRedirect.java | 2 +-
.../http/classic/response/TooManyRequests.java | 2 +-
.../juneau/http/classic/response/Unauthorized.java | 2 +-
.../response/UnavailableForLegalReasons.java | 2 +-
.../http/classic/response/UnprocessableEntity.java | 2 +-
.../classic/response/UnsupportedMediaType.java | 2 +-
.../http/classic/response/UpgradeRequired.java | 2 +-
.../juneau/http/classic/response/UriTooLong.java | 2 +-
.../juneau/http/classic/response/UseProxy.java | 2 +-
.../classic/response/VariantAlsoNegotiates.java | 2 +-
.../org/apache/juneau/http/ContactAnnotation.java | 6 +-
.../java/org/apache/juneau/http/HttpBodies.java | 2 +-
.../java/org/apache/juneau/http/HttpMethod.java | 2 +-
.../apache/juneau/http/HttpProtocolVersion.java | 4 +-
.../java/org/apache/juneau/http/HttpResponses.java | 34 +--
.../org/apache/juneau/http/LicenseAnnotation.java | 6 +-
.../org/apache/juneau/http/ResponseAnnotation.java | 14 +-
.../java/org/apache/juneau/http/TagAnnotation.java | 6 +-
.../apache/juneau/http/entity/HttpBodyBean.java | 1 +
.../apache/juneau/http/entity/MultipartBody.java | 11 +-
.../java/org/apache/juneau/http/header/Age.java | 7 +-
.../java/org/apache/juneau/http/header/Allow.java | 7 +-
.../apache/juneau/http/header/ContentLanguage.java | 7 +-
.../apache/juneau/http/header/ContentLocation.java | 9 +-
.../java/org/apache/juneau/http/header/Date.java | 9 +-
.../java/org/apache/juneau/http/header/Debug.java | 7 +-
.../org/apache/juneau/http/header/EntityTag.java | 2 +-
.../org/apache/juneau/http/header/EntityTags.java | 15 +-
.../org/apache/juneau/http/header/Expires.java | 9 +-
.../juneau/http/header/HttpBooleanHeader.java | 44 +++-
.../apache/juneau/http/header/HttpCsvHeader.java | 44 +++-
.../apache/juneau/http/header/HttpDateHeader.java | 35 +++
.../juneau/http/header/HttpEntityTagHeader.java | 35 +++
.../juneau/http/header/HttpEntityTagsHeader.java | 35 +++
.../apache/juneau/http/header/HttpHeaderList.java | 20 +-
.../juneau/http/header/HttpIntegerHeader.java | 35 +++
.../apache/juneau/http/header/HttpLongHeader.java | 35 +++
.../juneau/http/header/HttpMediaTypeHeader.java | 36 +++
.../apache/juneau/http/header/HttpUriHeader.java | 35 +++
.../apache/juneau/http/header/IfModifiedSince.java | 9 +-
.../juneau/http/header/IfUnmodifiedSince.java | 9 +-
.../apache/juneau/http/header/LastModified.java | 9 +-
.../org/apache/juneau/http/header/Location.java | 9 +-
.../org/apache/juneau/http/header/MaxForwards.java | 7 +-
.../org/apache/juneau/http/header/NoTrace.java | 7 +-
.../org/apache/juneau/http/header/Referer.java | 9 +-
.../org/apache/juneau/http/header/Upgrade.java | 7 +-
.../java/org/apache/juneau/http/header/Vary.java | 7 +-
.../java/org/apache/juneau/http/header/Via.java | 7 +-
.../org/apache/juneau/http/header/Warning.java | 2 +-
.../apache/juneau/http/part/HttpCsvArrayPart.java | 7 +-
.../org/apache/juneau/http/part/HttpPartList.java | 16 +-
.../java/org/apache/juneau/http/part/PartList.java | 3 +-
.../juneau/http/remote/RrpcInterfaceMeta.java | 6 +-
.../http/remote/RrpcInterfaceMethodMeta.java | 27 +-
.../juneau/http/response/BasicHttpException.java | 6 +-
.../juneau/http/response/BasicHttpResponse.java | 17 +-
.../juneau/httppart/bean/MethodInfoUtils.java | 2 +-
.../httppart/bean/RequestBeanPropertyMeta.java | 6 +-
.../apache/juneau/rest/common/utils/HttpUtils.java | 12 +-
.../apache/juneau/rest/mock/MockHttpTransport.java | 7 +-
.../juneau/rest/mock/classic/MockRestClient.java | 4 +-
.../juneau/rest/server/auth/jwt/JwksCache.java | 3 +
.../rest/server/auth/jwt/JwtTokenValidator.java | 35 ++-
.../server/auth/oauth/BoundedLruTokenCache.java | 18 +-
.../juneau/rest/server/auth/oauth/OAuthFilter.java | 16 +-
.../auth/oauth/OAuthIntrospectionValidator.java | 5 +-
.../juneau/rest/server/auth/oauth/OAuthToken.java | 6 +
.../juneau/rest/server/auth/oauth/flow/Flows.java | 6 +-
.../rest/server/auth/oidc/rp/OidcRelyingParty.java | 14 +-
.../auth/oidc/rp/SignedCookieSessionStore.java | 5 +-
.../server/auth/saml/SamlAssertionValidator.java | 12 +-
.../rest/server/auth/saml/SamlAuthFilter.java | 21 +-
.../server/auth/saml/SamlMetadataResolvers.java | 4 +-
.../management/logging/Log4j2LogBackend.java | 4 +-
.../management/logging/LogbackLogBackend.java | 12 +-
.../apache/juneau/rest/server/mcp/McpCursor.java | 3 +-
.../juneau/rest/server/mcp/McpDispatcher.java | 3 +
.../juneau/rest/server/mcp/McpTypedHandlers.java | 12 +-
.../reactive/reactor/ReactorReactiveAdapter.java | 4 +-
.../reactive/reactor/RxJavaReactiveAdapter.java | 16 +-
.../server/reactive/ReactiveResponseProcessor.java | 55 +++-
.../springboot/JuneauServletRegistrations.java | 6 +-
.../view/freemarker/FreemarkerViewRenderer.java | 52 +++-
.../freemarker/FreemarkerViewRenderer_Test.java | 24 ++
.../rest/server/view/jsp/JspViewRenderer.java | 10 +-
.../server/view/mustache/MustacheViewRenderer.java | 52 +++-
.../view/mustache/MustacheViewRenderer_Test.java | 24 ++
.../view/thymeleaf/ThymeleafViewRenderer.java | 54 +++-
.../view/thymeleaf/ThymeleafViewRenderer_Test.java | 24 ++
.../apache/juneau/rest/server/MixinAnnotation.java | 58 ++---
.../juneau/rest/server/OpSwaggerAnnotation.java | 20 +-
.../apache/juneau/rest/server/RestAnnotation.java | 52 ++--
.../org/apache/juneau/rest/server/RestContext.java | 24 +-
.../juneau/rest/server/RestDeleteAnnotation.java | 26 +-
.../juneau/rest/server/RestDestroyAnnotation.java | 4 +-
.../juneau/rest/server/RestEndCallAnnotation.java | 4 +-
.../juneau/rest/server/RestGetAnnotation.java | 32 +--
.../juneau/rest/server/RestInitAnnotation.java | 4 +-
.../juneau/rest/server/RestOpAnnotation.java | 38 +--
.../juneau/rest/server/RestOptionsAnnotation.java | 32 +--
.../juneau/rest/server/RestPatchAnnotation.java | 38 +--
.../juneau/rest/server/RestPostAnnotation.java | 38 +--
.../juneau/rest/server/RestPostCallAnnotation.java | 4 +-
.../juneau/rest/server/RestPostInitAnnotation.java | 4 +-
.../juneau/rest/server/RestPreCallAnnotation.java | 4 +-
.../juneau/rest/server/RestPutAnnotation.java | 38 +--
.../rest/server/RestStartCallAnnotation.java | 4 +-
.../juneau/rest/server/SwaggerAnnotation.java | 12 +-
.../juneau/rest/server/convention/SeoMixin.java | 6 +-
.../juneau/rest/server/debug/DebugEnablement.java | 2 +-
.../juneau/rest/server/guard/RateLimitGuard.java | 3 +-
.../rest/server/matcher/RestMatcherList.java | 5 +-
.../openapi/BasicOpenApiProviderSession.java | 5 +-
.../rest/server/openapi/OpenApiException.java | 36 ---
.../rest/server/openapi/OpenApiProvider.java | 2 +-
.../server/processor/AsyncResponseProcessor.java | 6 +-
.../juneau/rest/server/stats/ThrownStats.java | 18 +-
.../juneau/rest/server/stats/ThrownStore.java | 4 +-
.../rest/server/swagger/SwaggerProvider.java | 2 +-
.../server/util/CachingHttpServletRequest.java | 3 +-
.../apache/juneau/rest/server/util/UrlPath.java | 2 +-
.../server/validation/ValidationException.java | 4 +-
.../org/apache/juneau/mstat/ThrownStore_Test.java | 2 +-
.../juneau/rest/server/stats/ThrownStore_Test.java | 2 +-
.../server/config/repository/GetConfiguration.java | 22 +-
.../server/config/repository/GitControl.java | 74 +++++-
666 files changed, 4949 insertions(+), 3440 deletions(-)
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/AtomBuilder.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/AtomBuilder.java
index 31e2af2a83..a9fc7f9825 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/AtomBuilder.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/AtomBuilder.java
@@ -51,7 +51,7 @@ public class AtomBuilder {
/**
* Creates a {@link Category} element with the specified {@link Category#setTerm(String)} attribute.
*
- * @param term The {@link Category#setTerm(String)} attribute.
+ * @param term The {@link Category#setTerm(String)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Category category(String term) {
@@ -70,7 +70,7 @@ public class AtomBuilder {
/**
* Creates a {@link Content} element.
*
- * @param type The {@link Content#setType(String)} attribute.
+ * @param type The {@link Content#setType(String)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Content content(String type) {
@@ -81,9 +81,9 @@ public class AtomBuilder {
* Creates an {@link Entry} element with the specified {@link Entry#setId(Id)}, {@link Entry#setTitle(Text)}, and
* {@link Entry#setUpdated(Calendar)} attributes.
*
- * @param id The {@link Entry#setId(Id)} attribute.
- * @param title The {@link Entry#setTitle(Text)} attribute.
- * @param updated The {@link Entry#setUpdated(Calendar)} attribute.
+ * @param id The {@link Entry#setId(Id)} attribute. Can be <jk>null</jk>.
+ * @param title The {@link Entry#setTitle(Text)} attribute. Can be <jk>null</jk>.
+ * @param updated The {@link Entry#setUpdated(Calendar)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Entry entry(Id id, Text title, Calendar updated) {
@@ -94,9 +94,9 @@ public class AtomBuilder {
* Creates an {@link Entry} element with the specified {@link Entry#setId(Id)}, {@link Entry#setTitle(Text)}, and
* {@link Entry#setUpdated(Calendar)} attributes.
*
- * @param id The {@link Entry#setId(Id)} attribute.
- * @param title The {@link Entry#setTitle(Text)} attribute.
- * @param updated The {@link Entry#setUpdated(Calendar)} attribute.
+ * @param id The {@link Entry#setId(Id)} attribute. Can be <jk>null</jk>.
+ * @param title The {@link Entry#setTitle(Text)} attribute. Can be <jk>null</jk>.
+ * @param updated The {@link Entry#setUpdated(Calendar)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Entry entry(String id, String title, String updated) {
@@ -107,9 +107,9 @@ public class AtomBuilder {
* Creates a {@link Feed} element with the specified {@link Feed#setId(Id)}, {@link Entry#setTitle(Text)}, and
* {@link Feed#setUpdated(Calendar)} attributes.
*
- * @param id The {@link Feed#setId(Id)} attribute.
- * @param title The {@link Feed#setTitle(Text)} attribute.
- * @param updated The {@link Feed#setUpdated(Calendar)} attribute.
+ * @param id The {@link Feed#setId(Id)} attribute. Can be <jk>null</jk>.
+ * @param title The {@link Feed#setTitle(Text)} attribute. Can be <jk>null</jk>.
+ * @param updated The {@link Feed#setUpdated(Calendar)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Feed feed(Id id, Text title, Calendar updated) {
@@ -120,9 +120,9 @@ public class AtomBuilder {
* Creates a {@link Feed} element with the specified {@link Feed#setId(Id)}, {@link Entry#setTitle(Text)}, and
* {@link Feed#setUpdated(Calendar)} attributes.
*
- * @param id The {@link Feed#setId(Id)} attribute.
- * @param title The {@link Feed#setTitle(Text)} attribute.
- * @param updated The {@link Feed#setUpdated(Calendar)} attribute.
+ * @param id The {@link Feed#setId(Id)} attribute. Can be <jk>null</jk>.
+ * @param title The {@link Feed#setTitle(Text)} attribute. Can be <jk>null</jk>.
+ * @param updated The {@link Feed#setUpdated(Calendar)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Feed feed(String id, String title, String updated) {
@@ -132,7 +132,7 @@ public class AtomBuilder {
/**
* Creates a {@link Generator} element with the specified {@link Generator#setText(String)} child node.
*
- * @param text The {@link Generator#setText(String)} child node.
+ * @param text The {@link Generator#setText(String)} child node. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Generator generator(String text) {
@@ -149,7 +149,7 @@ public class AtomBuilder {
* <p>
* URIs defined by {@link UriResolver} can be used for values.
*
- * @param uri The {@link Icon#setUri(Object)} attribute.
+ * @param uri The {@link Icon#setUri(Object)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Icon icon(Object uri) {
@@ -159,7 +159,7 @@ public class AtomBuilder {
/**
* Creates an {@link Id} element with the specified {@link Id#setText(String)} child node.
*
- * @param text The {@link Id#setText(String)} child node.
+ * @param text The {@link Id#setText(String)} child node. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Id id(String text) {
@@ -170,9 +170,9 @@ public class AtomBuilder {
* Creates a {@link Link} element with the specified {@link Link#setRel(String)}, {@link Link#setType(String)}, and
* {@link Link#setHref(String)} attributes.
*
- * @param rel The {@link Link#setRel(String)} attribute.
- * @param type The {@link Link#setType(String)} attribute.
- * @param href The {@link Link#setHref(String)} attribute.
+ * @param rel The {@link Link#setRel(String)} attribute. Can be <jk>null</jk>.
+ * @param type The {@link Link#setType(String)} attribute. Can be <jk>null</jk>.
+ * @param href The {@link Link#setHref(String)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Link link(String rel, String type, String href) {
@@ -189,7 +189,7 @@ public class AtomBuilder {
* <p>
* URIs defined by {@link UriResolver} can be used for values.
*
- * @param uri The {@link Logo#setUri(Object)} attribute.
+ * @param uri The {@link Logo#setUri(Object)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Logo logo(Object uri) {
@@ -199,7 +199,7 @@ public class AtomBuilder {
/**
* Creates a {@link Person} element with the specified {@link Person#setName(String)} attribute.
*
- * @param name The {@link Person#setName(String)} attribute.
+ * @param name The {@link Person#setName(String)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Person person(String name) {
@@ -227,7 +227,7 @@ public class AtomBuilder {
/**
* Creates a {@link Text} element with the specified {@link Text#setType(String)} attribute.
*
- * @param type The {@link Text#setType(String)} attribute.
+ * @param type The {@link Text#setType(String)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Text text(String type) {
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Category.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Category.java
index 957363c44a..3782350a3d 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Category.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Category.java
@@ -90,7 +90,7 @@ public class Category extends Common {
/**
* Normal constructor.
*
- * @param term The category term.
+ * @param term The category term. Can be <jk>null</jk>.
*/
public Category(String term) {
setTerm(term);
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/CommonEntry.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/CommonEntry.java
index 4aa07242a3..184ae7f9b0 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/CommonEntry.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/CommonEntry.java
@@ -16,6 +16,7 @@
*/
package org.apache.juneau.bean.atom;
+import static org.apache.juneau.commons.utils.CopyUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.commons.utils.StringUtils.*;
import static org.apache.juneau.marshall.xml.XmlFormat.*;
@@ -71,9 +72,9 @@ public class CommonEntry extends Common {
/**
* Normal constructor.
*
- * @param id The ID of this object.
- * @param title The title of this object.
- * @param updated The updated timestamp of this object.
+ * @param id The ID of this object. Can be <jk>null</jk>.
+ * @param title The title of this object. Can be <jk>null</jk>.
+ * @param updated The updated timestamp of this object. Can be <jk>null</jk>.
*/
public CommonEntry(Id id, Text title, Calendar updated) {
setId(id).setTitle(title).setUpdated(updated);
@@ -82,9 +83,9 @@ public class CommonEntry extends Common {
/**
* Normal constructor.
*
- * @param id The ID of this object.
- * @param title The title of this object.
- * @param updated The updated timestamp of this object.
+ * @param id The ID of this object. Can be <jk>null</jk>.
+ * @param title The title of this object. Can be <jk>null</jk>.
+ * @param updated The updated timestamp of this object. Can be <jk>null</jk>.
*/
public CommonEntry(String id, String title, String updated) {
setId(id).setTitle(title).setUpdated(updated);
@@ -99,7 +100,7 @@ public class CommonEntry extends Common {
* @return The property value, or <jk>null</jk> if it is not set.
*/
@Xml(format = COLLAPSED, childName = "author")
- public Person[] getAuthors() { return authors; }
+ public Person[] getAuthors() { return cp(authors); }
/**
* Bean property getter: <property>categories</property>.
@@ -110,7 +111,7 @@ public class CommonEntry extends Common {
* @return The property value, or <jk>null</jk> if it is not set.
*/
@Xml(format = COLLAPSED, childName = "category")
- public Category[] getCategories() { return categories; }
+ public Category[] getCategories() { return cp(categories); }
/**
* Bean property getter: <property>contributors</property>.
@@ -121,7 +122,7 @@ public class CommonEntry extends Common {
* @return The property value, or <jk>null</jk> if it is not set.
*/
@Xml(format = COLLAPSED, childName = "contributor")
- public Person[] getContributors() { return contributors; }
+ public Person[] getContributors() { return cp(contributors); }
/**
* Bean property getter: <property>id</property>.
@@ -142,7 +143,7 @@ public class CommonEntry extends Common {
* @return The property value, or <jk>null</jk> if it is not set.
*/
@Xml(format = COLLAPSED)
- public Link[] getLinks() { return links; }
+ public Link[] getLinks() { return cp(links); }
/**
* Bean property getter: <property>rights</property>.
@@ -172,7 +173,7 @@ public class CommonEntry extends Common {
*
* @return The property value, or <jk>null</jk> if it is not set.
*/
- public Calendar getUpdated() { return updated; }
+ public Calendar getUpdated() { return cloneOf(updated); }
/**
* Bean property setter: <property>authors</property>.
@@ -186,7 +187,7 @@ public class CommonEntry extends Common {
* @return This object
*/
public CommonEntry setAuthors(Person...value) {
- authors = value;
+ authors = cp(value);
return this;
}
@@ -208,7 +209,7 @@ public class CommonEntry extends Common {
* @return This object
*/
public CommonEntry setCategories(Category...value) {
- categories = value;
+ categories = cp(value);
return this;
}
@@ -224,7 +225,7 @@ public class CommonEntry extends Common {
* @return This object
*/
public CommonEntry setContributors(Person...value) {
- contributors = value;
+ contributors = cp(value);
return this;
}
@@ -278,7 +279,7 @@ public class CommonEntry extends Common {
* @return This object
*/
public CommonEntry setLinks(Link...value) {
- links = value;
+ links = cp(value);
return this;
}
@@ -358,7 +359,7 @@ public class CommonEntry extends Common {
* @return This object
*/
public CommonEntry setUpdated(Calendar value) {
- updated = value;
+ updated = cloneOf(value);
return this;
}
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Content.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Content.java
index de98366b85..fa3fd23a53 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Content.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Content.java
@@ -125,7 +125,7 @@ public class Content extends Text {
/**
* Normal content.
*
- * @param type The content type of this content.
+ * @param type The content type of this content. Can be <jk>null</jk>.
*/
public Content(String type) {
super(type);
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Entry.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Entry.java
index 470a8518a2..bb1be8b09a 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Entry.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Entry.java
@@ -123,9 +123,9 @@ public class Entry extends CommonEntry {
/**
* Normal constructor.
*
- * @param id The ID of this entry.
- * @param title The title of this entry.
- * @param updated The updated timestamp of this entry.
+ * @param id The ID of this entry. Can be <jk>null</jk>.
+ * @param title The title of this entry. Can be <jk>null</jk>.
+ * @param updated The updated timestamp of this entry. Can be <jk>null</jk>.
*/
public Entry(Id id, Text title, Calendar updated) {
super(id, title, updated);
@@ -134,9 +134,9 @@ public class Entry extends CommonEntry {
/**
* Normal constructor.
*
- * @param id The ID of this entry.
- * @param title The title of this entry.
- * @param updated The updated timestamp of this entry.
+ * @param id The ID of this entry. Can be <jk>null</jk>.
+ * @param title The title of this entry. Can be <jk>null</jk>.
+ * @param updated The updated timestamp of this entry. Can be <jk>null</jk>.
*/
public Entry(String id, String title, String updated) {
super(id, title, updated);
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Feed.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Feed.java
index 0932f64e93..c8d739a166 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Feed.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Feed.java
@@ -16,6 +16,7 @@
*/
package org.apache.juneau.bean.atom;
+import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.xml.XmlFormat.*;
import java.util.*;
@@ -126,9 +127,9 @@ public class Feed extends CommonEntry {
/**
* Normal constructor.
*
- * @param id The feed identifier.
- * @param title The feed title.
- * @param updated The feed updated timestamp.
+ * @param id The feed identifier. Can be <jk>null</jk>.
+ * @param title The feed title. Can be <jk>null</jk>.
+ * @param updated The feed updated timestamp. Can be <jk>null</jk>.
*/
public Feed(Id id, Text title, Calendar updated) {
super(id, title, updated);
@@ -137,9 +138,9 @@ public class Feed extends CommonEntry {
/**
* Normal constructor.
*
- * @param id The feed identifier.
- * @param title The feed title.
- * @param updated The feed updated timestamp.
+ * @param id The feed identifier. Can be <jk>null</jk>.
+ * @param title The feed title. Can be <jk>null</jk>.
+ * @param updated The feed updated timestamp. Can be <jk>null</jk>.
*/
public Feed(String id, String title, String updated) {
super(id, title, updated);
@@ -159,7 +160,7 @@ public class Feed extends CommonEntry {
* @return The property value, or <jk>null</jk> if it is not set.
*/
@Xml(format = COLLAPSED)
- public Entry[] getEntries() { return entries; }
+ public Entry[] getEntries() { return cp(entries); }
/**
* Bean property getter: <property>generator</property>.
@@ -273,7 +274,7 @@ public class Feed extends CommonEntry {
* @return This object.
*/
public Feed setEntries(Entry...value) {
- entries = value;
+ entries = cp(value);
return this;
}
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Generator.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Generator.java
index d94c687555..1f9ad9a021 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Generator.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Generator.java
@@ -82,7 +82,7 @@ public class Generator extends Common {
/**
* Normal constructor.
*
- * @param text The generator statement content.
+ * @param text The generator statement content. Can be <jk>null</jk>.
*/
public Generator(String text) {
this.text = text;
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Icon.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Icon.java
index 91a85b4009..789f7a1085 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Icon.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Icon.java
@@ -84,7 +84,7 @@ public class Icon extends Common {
* <p>
* URIs defined by {@link UriResolver} can be used for values.
*
- * @param uri The URI of the icon.
+ * @param uri The URI of the icon. Can be <jk>null</jk>.
*/
public Icon(Object uri) {
setUri(uri);
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Id.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Id.java
index fecd311d14..e0b773387d 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Id.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Id.java
@@ -87,7 +87,7 @@ public class Id extends Common {
/**
* Normal constructor.
*
- * @param text The id element contents.
+ * @param text The id element contents. Can be <jk>null</jk>.
*/
public Id(String text) {
setText(text);
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Link.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Link.java
index b486dbdabf..b707e241de 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Link.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Link.java
@@ -96,9 +96,9 @@ public class Link extends Common {
/**
* Normal constructor.
*
- * @param rel The rel of the link.
- * @param type The type of the link.
- * @param href The URI of the link.
+ * @param rel The rel of the link. Can be <jk>null</jk>.
+ * @param type The type of the link. Can be <jk>null</jk>.
+ * @param href The URI of the link. Can be <jk>null</jk>.
*/
public Link(String rel, String type, String href) {
setRel(rel).setType(type).setHref(href);
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Logo.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Logo.java
index 50c03ed199..ae900c0a0f 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Logo.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Logo.java
@@ -84,7 +84,7 @@ public class Logo extends Common {
* <p>
* URIs defined by {@link UriResolver} can be used for values.
*
- * @param uri The URI of the logo.
+ * @param uri The URI of the logo. Can be <jk>null</jk>.
*/
public Logo(Object uri) {
setUri(uri);
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Person.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Person.java
index 808f5d47cc..9ea94af6d8 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Person.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Person.java
@@ -79,7 +79,7 @@ public class Person extends Common {
/**
* Normal constructor.
*
- * @param name The name of the person.
+ * @param name The name of the person. Can be <jk>null</jk>.
*/
public Person(String name) {
setName(name);
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Text.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Text.java
index 3954034f20..00c67df8e3 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Text.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Text.java
@@ -102,7 +102,7 @@ public class Text extends Common {
/**
* Normal content.
*
- * @param type The content type of this content.
+ * @param type The content type of this content. Can be <jk>null</jk>.
*/
public Text(String type) {
setType(type);
diff --git a/juneau-bean/juneau-bean-common/src/main/java/org/apache/juneau/bean/LinkString.java b/juneau-bean/juneau-bean-common/src/main/java/org/apache/juneau/bean/LinkString.java
index 7b6095d40b..8a39cf2cd5 100644
--- a/juneau-bean/juneau-bean-common/src/main/java/org/apache/juneau/bean/LinkString.java
+++ b/juneau-bean/juneau-bean-common/src/main/java/org/apache/juneau/bean/LinkString.java
@@ -51,8 +51,8 @@ public class LinkString implements Comparable<LinkString> {
/**
* Constructor.
*
- * @param name Corresponds to the text inside of the <xt><A></xt> element.
- * @param uri Corresponds to the value of the <xa>href</xa> attribute of the <xt><A></xt> element.
+ * @param name Corresponds to the text inside of the <xt><A></xt> element. Can be <jk>null</jk>.
+ * @param uri Corresponds to the value of the <xa>href</xa> attribute of the <xt><A></xt> element. Must not be <jk>null</jk>.
* @param uriArgs Optional printf-style ({@link String#format(String, Object...)}) arguments in the href.
*/
public LinkString(String name, String uri, Object...uriArgs) {
diff --git a/juneau-bean/juneau-bean-hal/src/main/java/org/apache/juneau/bean/hal/HalLink.java b/juneau-bean/juneau-bean-hal/src/main/java/org/apache/juneau/bean/hal/HalLink.java
index f1cf74980e..afb3e57a08 100644
--- a/juneau-bean/juneau-bean-hal/src/main/java/org/apache/juneau/bean/hal/HalLink.java
+++ b/juneau-bean/juneau-bean-hal/src/main/java/org/apache/juneau/bean/hal/HalLink.java
@@ -55,7 +55,7 @@ public class HalLink {
/**
* Convenience constructor with the required {@code href} field.
*
- * @param href The link URI or URI template.
+ * @param href The link URI or URI template. Can be <jk>null</jk>.
*/
public HalLink(String href) {
this.href = href;
@@ -74,7 +74,7 @@ public class HalLink {
/**
* Bean property setter: <property>href</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public HalLink setHref(String value) {
@@ -95,7 +95,7 @@ public class HalLink {
/**
* Bean property setter: <property>templated</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public HalLink setTemplated(Boolean value) {
@@ -116,7 +116,7 @@ public class HalLink {
/**
* Bean property setter: <property>type</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public HalLink setType(String value) {
@@ -137,7 +137,7 @@ public class HalLink {
/**
* Bean property setter: <property>deprecation</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public HalLink setDeprecation(String value) {
@@ -158,7 +158,7 @@ public class HalLink {
/**
* Bean property setter: <property>name</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public HalLink setName(String value) {
@@ -179,7 +179,7 @@ public class HalLink {
/**
* Bean property setter: <property>profile</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public HalLink setProfile(String value) {
@@ -200,7 +200,7 @@ public class HalLink {
/**
* Bean property setter: <property>title</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public HalLink setTitle(String value) {
@@ -221,7 +221,7 @@ public class HalLink {
/**
* Bean property setter: <property>hreflang</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public HalLink setHreflang(String value) {
diff --git a/juneau-bean/juneau-bean-hal/src/main/java/org/apache/juneau/bean/hal/HalResource.java b/juneau-bean/juneau-bean-hal/src/main/java/org/apache/juneau/bean/hal/HalResource.java
index 8bb4fb1eee..2d1bde592f 100644
--- a/juneau-bean/juneau-bean-hal/src/main/java/org/apache/juneau/bean/hal/HalResource.java
+++ b/juneau-bean/juneau-bean-hal/src/main/java/org/apache/juneau/bean/hal/HalResource.java
@@ -93,7 +93,7 @@ public class HalResource {
@BeanProp("_links")
@Swap(HalLinkOrArraySwap.class)
public Map<String,Object> getLinks() {
- return _links;
+ return u(_links);
}
/**
@@ -116,8 +116,8 @@ public class HalResource {
* If a value already exists for {@code relation}, it is replaced with the supplied single link. To accumulate
* multiple links under the same relation use {@link #addLinks(String, HalLink...)} instead.
*
- * @param relation The link relation (e.g. {@code "self"}, {@code "next"}, {@code "curies"}).
- * @param value The link to set.
+ * @param relation The link relation (e.g. {@code "self"}, {@code "next"}, {@code "curies"}). Must not be <jk>null</jk>.
+ * @param value The link to set. Can be <jk>null</jk>.
* @return This object.
*/
public HalResource addLink(String relation, HalLink value) {
@@ -135,7 +135,7 @@ public class HalResource {
* If the current value at {@code relation} is a single {@link HalLink}, it is promoted to a {@link HalLinkArray}
* containing the original link and the appended ones.
*
- * @param relation The link relation.
+ * @param relation The link relation. Must not be <jk>null</jk>.
* @param values The links to append.
* @return This object.
*/
@@ -145,10 +145,10 @@ public class HalResource {
_links = map();
var existing = _links.get(relation);
HalLinkArray arr;
- if (existing instanceof HalLinkArray a) {
- arr = a;
- } else if (existing instanceof HalLink l) {
- arr = new HalLinkArray(l);
+ if (existing instanceof HalLinkArray existing2) {
+ arr = existing2;
+ } else if (existing instanceof HalLink existing2) {
+ arr = new HalLinkArray(existing2);
_links.put(relation, arr);
} else {
arr = new HalLinkArray();
@@ -170,7 +170,7 @@ public class HalResource {
@BeanProp("_embedded")
@Swap(HalResourceOrArraySwap.class)
public Map<String,Object> getEmbedded() {
- return _embedded;
+ return u(_embedded);
}
/**
@@ -193,8 +193,8 @@ public class HalResource {
/**
* Convenience method that embeds a single sub-resource under the given relation.
*
- * @param relation The relation name.
- * @param value The sub-resource.
+ * @param relation The relation name. Must not be <jk>null</jk>.
+ * @param value The sub-resource. Can be <jk>null</jk>.
* @return This object.
*/
public HalResource addEmbedded(String relation, HalResource value) {
@@ -209,7 +209,7 @@ public class HalResource {
* Convenience method that appends one or more sub-resources to a {@link HalResourceArray} stored under
* {@code relation}.
*
- * @param relation The relation name.
+ * @param relation The relation name. Must not be <jk>null</jk>.
* @param values The sub-resources to append.
* @return This object.
*/
@@ -219,10 +219,10 @@ public class HalResource {
_embedded = map();
var existing = _embedded.get(relation);
HalResourceArray arr;
- if (existing instanceof HalResourceArray a) {
- arr = a;
- } else if (existing instanceof HalResource r) {
- arr = new HalResourceArray(r);
+ if (existing instanceof HalResourceArray existing2) {
+ arr = existing2;
+ } else if (existing instanceof HalResource existing2) {
+ arr = new HalResourceArray(existing2);
_embedded.put(relation, arr);
} else {
arr = new HalResourceArray();
@@ -239,7 +239,7 @@ public class HalResource {
*/
@BeanProp("*")
public Set<String> extraKeys() {
- return properties == null ? Collections.emptySet() : properties.keySet();
+ return properties == null ? Collections.emptySet() : u(properties.keySet());
}
/**
@@ -261,7 +261,7 @@ public class HalResource {
* Use this to set arbitrary payload fields alongside {@code _links} and {@code _embedded}.
*
* @param property The property name. Must not be <jk>null</jk>.
- * @param value The new value for the property.
+ * @param value The new value for the property. Can be <jk>null</jk>.
* @return This object.
*/
@BeanProp("*")
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/A.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/A.java
index f8cd4d7af1..1c5c4bbd69 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/A.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/A.java
@@ -70,8 +70,8 @@ public class A extends HtmlElementMixed {
* Creates an {@link A} element with the specified {@link A#href(Object)} attribute and {@link A#children(Object[])}
* nodes.
*
- * @param href The {@link A#href(Object)} attribute.
- * @param children The {@link A#children(Object[])} nodes.
+ * @param href The {@link A#href(Object)} attribute. Can be <jk>null</jk>.
+ * @param children The {@link A#children(Object[])} nodes. Must not be <jk>null</jk>.
*/
public A(Object href, Object[] children) {
href(href).children(children);
@@ -134,6 +134,7 @@ public class A extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public A download(Object value) {
@@ -163,6 +164,7 @@ public class A extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link URL} or {@link String}.
+ * Can be <jk>null</jk>.
* @return This object.
*/
public A href(Object value) {
@@ -187,7 +189,7 @@ public class A extends HtmlElementMixed {
* <li><js>"ja"</js> - Japanese</li>
* </ul>
*
- * @param value The language code of the linked resource.
+ * @param value The language code of the linked resource. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public A hreflang(String value) {
@@ -530,7 +532,7 @@ public class A extends HtmlElementMixed {
* <li><js>"tag"</js> - Tag for the current page</li>
* </ul>
*
- * @param value The relationship between the document and linked resource.
+ * @param value The relationship between the document and linked resource. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public A rel(String value) {
@@ -572,7 +574,7 @@ public class A extends HtmlElementMixed {
* <li><js>"framename"</js> - Open in a named frame</li>
* </ul>
*
- * @param value Where to open the linked resource.
+ * @param value Where to open the linked resource. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public A target(String value) {
@@ -608,7 +610,7 @@ public class A extends HtmlElementMixed {
* <li><js>"application/zip"</js> - ZIP archive</li>
* </ul>
*
- * @param value The MIME type of the linked resource.
+ * @param value The MIME type of the linked resource. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public A type(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Area.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Area.java
index 1519b359ec..83c3265ebb 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Area.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Area.java
@@ -69,9 +69,9 @@ public class Area extends HtmlElementVoid {
* Creates an {@link Area} element with the specified {@link Area#shape(String)}, {@link Area#coords(String)},
* and {@link Area#href(Object)} attributes.
*
- * @param shape The {@link Area#shape(String)} attribute.
- * @param coords The {@link Area#coords(String)} attribute.
- * @param href The {@link Area#href(Object)} attribute.
+ * @param shape The {@link Area#shape(String)} attribute. Can be <jk>null</jk>.
+ * @param coords The {@link Area#coords(String)} attribute. Can be <jk>null</jk>.
+ * @param href The {@link Area#href(Object)} attribute. Can be <jk>null</jk>.
*/
public Area(String shape, String coords, Object href) {
shape(shape).coords(coords).href(href);
@@ -99,7 +99,7 @@ public class Area extends HtmlElementVoid {
* <p>
* The alt text should be descriptive and convey the same information as the clickable area.
*
- * @param value Alternative text for the area.
+ * @param value Alternative text for the area. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Area alt(String value) {
@@ -141,7 +141,7 @@ public class Area extends HtmlElementVoid {
* <li><js>"default"</js> - No coordinates needed</li>
* </ul>
*
- * @param value The coordinates defining the clickable area.
+ * @param value The coordinates defining the clickable area. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Area coords(String value) {
@@ -164,6 +164,7 @@ public class Area extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Area download(Object value) {
@@ -193,6 +194,7 @@ public class Area extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link URL} or {@link String}.
+ * Can be <jk>null</jk>.
* @return This object.
*/
public Area href(Object value) {
@@ -217,7 +219,7 @@ public class Area extends HtmlElementVoid {
* <li><js>"ja"</js> - Japanese</li>
* </ul>
*
- * @param value The language code of the linked resource.
+ * @param value The language code of the linked resource. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Area hreflang(String value) {
@@ -560,7 +562,7 @@ public class Area extends HtmlElementVoid {
* <li><js>"tag"</js> - Tag for the current page</li>
* </ul>
*
- * @param value The relationship between the document and linked resource.
+ * @param value The relationship between the document and linked resource. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Area rel(String value) {
@@ -583,7 +585,7 @@ public class Area extends HtmlElementVoid {
* <li><js>"default"</js> - Entire image area</li>
* </ul>
*
- * @param value The shape of the clickable area.
+ * @param value The shape of the clickable area. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Area shape(String value) {
@@ -625,7 +627,7 @@ public class Area extends HtmlElementVoid {
* <li><js>"framename"</js> - Open in a named frame</li>
* </ul>
*
- * @param value Where to open the linked resource.
+ * @param value Where to open the linked resource. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Area target(String value) {
@@ -661,7 +663,7 @@ public class Area extends HtmlElementVoid {
* <li><js>"application/zip"</js> - ZIP archive</li>
* </ul>
*
- * @param value The MIME type of the linked resource.
+ * @param value The MIME type of the linked resource. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Area type(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Article.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Article.java
index 3eced64fa7..0fd2bacd2b 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Article.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Article.java
@@ -131,7 +131,7 @@ public class Article extends HtmlElementMixed {
/**
* Creates an {@link Article} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Article(Object...children) {
children(children);
@@ -188,7 +188,7 @@ public class Article extends HtmlElementMixed {
/**
* Adds a footer node to this element.
*
- * @param children The children inside the footer node.
+ * @param children The children inside the footer node. Must not be <jk>null</jk>.
* @return This object.
*/
public Article footer(Object...children) {
@@ -199,7 +199,7 @@ public class Article extends HtmlElementMixed {
/**
* Adds a header node to this element.
*
- * @param children The children inside the header node.
+ * @param children The children inside the header node. Must not be <jk>null</jk>.
* @return This object.
*/
public Article header(Object...children) {
@@ -228,7 +228,7 @@ public class Article extends HtmlElementMixed {
/**
* Adds a link node to this element.
*
- * @param value The link node to add to this article.
+ * @param value The link node to add to this article. Can be <jk>null</jk>.
* @return This object.
*/
public Article link(Link value) {
@@ -539,7 +539,7 @@ public class Article extends HtmlElementMixed {
/**
* Adds a section node to this element.
*
- * @param value The section node to add to this article.
+ * @param value The section node to add to this article. Can be <jk>null</jk>.
* @return This object.
*/
public Article section(Section value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Audio.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Audio.java
index c80e5f45e9..889a2db831 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Audio.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Audio.java
@@ -71,7 +71,7 @@ public class Audio extends HtmlElementMixed {
/**
* Creates an {@link Audio} element with the specified {@link Audio#src(Object)} attribute.
*
- * @param src The {@link Audio#src(Object)} attribute.
+ * @param src The {@link Audio#src(Object)} attribute. Can be <jk>null</jk>.
*/
public Audio(String src) {
src(src);
@@ -119,6 +119,7 @@ public class Audio extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Audio autoplay(Object value) {
@@ -162,6 +163,7 @@ public class Audio extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Audio controls(Object value) {
@@ -183,7 +185,7 @@ public class Audio extends HtmlElementMixed {
* <li><js>"use-credentials"</js> - Cross-origin requests include credentials</li>
* </ul>
*
- * @param value How to handle cross-origin requests.
+ * @param value How to handle cross-origin requests. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Audio crossorigin(String value) {
@@ -221,7 +223,7 @@ public class Audio extends HtmlElementMixed {
* <p>
* Causes the media to automatically restart from the beginning when it reaches the end.
*
- * @param value If <jk>true</jk>, the media will loop continuously.
+ * @param value If <jk>true</jk>, the media will loop continuously. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Audio loop(Object value) {
@@ -240,7 +242,7 @@ public class Audio extends HtmlElementMixed {
* <p>
* This is useful for creating synchronized audio/video presentations or multiple audio tracks.
*
- * @param value The name of the media group to join.
+ * @param value The name of the media group to join. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Audio mediagroup(String value) {
@@ -255,7 +257,7 @@ public class Audio extends HtmlElementMixed {
* <p>
* Mutes the audio output by default. Useful for autoplay videos where audio should be disabled initially.
*
- * @param value If <jk>true</jk>, the media will be muted by default.
+ * @param value If <jk>true</jk>, the media will be muted by default. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Audio muted(Object value) {
@@ -578,7 +580,7 @@ public class Audio extends HtmlElementMixed {
* <li><js>"auto"</js> - Preload the entire media file (default)</li>
* </ul>
*
- * @param value How much of the media to preload.
+ * @param value How much of the media to preload. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Audio preload(Object value) {
@@ -608,6 +610,7 @@ public class Audio extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link URL} or {@link String}.
+ * Can be <jk>null</jk>.
* @return This object.
*/
public Audio src(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Base.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Base.java
index bb0c53c75f..8de0cb692b 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Base.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Base.java
@@ -66,7 +66,7 @@ public class Base extends HtmlElementVoid {
/**
* Creates a {@link Base} element with the specified {@link Base#href(Object)} attribute.
*
- * @param value The {@link Base#href(Object)} attribute.
+ * @param value The {@link Base#href(Object)} attribute. Can be <jk>null</jk>.
*/
public Base(Object value) {
href(value);
@@ -130,6 +130,7 @@ public class Base extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link URL} or {@link String}.
+ * Can be <jk>null</jk>.
* @return This object.
*/
public Base href(Object value) {
@@ -484,7 +485,7 @@ public class Base extends HtmlElementVoid {
* <li><js>"framename"</js> - Open in a named frame</li>
* </ul>
*
- * @param value The default target for links and forms.
+ * @param value The default target for links and forms. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Base target(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Blockquote.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Blockquote.java
index 40dfa7c923..82b7b6514d 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Blockquote.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Blockquote.java
@@ -72,7 +72,7 @@ public class Blockquote extends HtmlElementMixed {
/**
* Creates a {@link Blockquote} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Blockquote(Object...children) {
children(children);
@@ -125,7 +125,7 @@ public class Blockquote extends HtmlElementMixed {
* <p>
* The URL should point to the original source of the quoted material.
*
- * @param value The URL of the source document for the quotation.
+ * @param value The URL of the source document for the quotation. Can be <jk>null</jk>.
* @return This object.
*/
public Blockquote cite(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Body.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Body.java
index a6abcf231c..c2d36f515d 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Body.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Body.java
@@ -77,7 +77,7 @@ public class Body extends HtmlElementMixed {
/**
* Creates a {@link Body} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Body(Object...children) {
children(children);
@@ -162,7 +162,7 @@ public class Body extends HtmlElementMixed {
* <p>
* Event handler for when the document has finished printing.
*
- * @param value JavaScript code to execute when the afterprint event occurs.
+ * @param value JavaScript code to execute when the afterprint event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Body onafterprint(String value) {
@@ -177,7 +177,7 @@ public class Body extends HtmlElementMixed {
* <p>
* Event handler for when the document is about to be unloaded (page refresh, navigation, etc.).
*
- * @param value JavaScript code to execute when the beforeunload event occurs.
+ * @param value JavaScript code to execute when the beforeunload event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Body onbeforeunload(String value) {
@@ -324,7 +324,7 @@ public class Body extends HtmlElementMixed {
* <p>
* Event handler for when a message is received from another window or worker.
*
- * @param value JavaScript code to execute when the message event occurs.
+ * @param value JavaScript code to execute when the message event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Body onmessage(String value) {
@@ -387,7 +387,7 @@ public class Body extends HtmlElementMixed {
* <p>
* Event handler for when the browser has gone online.
*
- * @param value JavaScript code to execute when the online event occurs.
+ * @param value JavaScript code to execute when the online event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Body ononline(String value) {
@@ -402,7 +402,7 @@ public class Body extends HtmlElementMixed {
* <p>
* Event handler for when the page is displayed (including when returning from back/forward cache).
*
- * @param value JavaScript code to execute when the pageshow event occurs.
+ * @param value JavaScript code to execute when the pageshow event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Body onpageshow(String value) {
@@ -495,7 +495,7 @@ public class Body extends HtmlElementMixed {
* <p>
* Event handler for when the storage area (localStorage or sessionStorage) is modified.
*
- * @param value JavaScript code to execute when the storage event occurs.
+ * @param value JavaScript code to execute when the storage event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Body onstorage(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Button.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Button.java
index 932215384a..f100f5440c 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Button.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Button.java
@@ -84,7 +84,7 @@ public class Button extends HtmlElementMixed {
/**
* Creates a {@link Button} element with the specified {@link Button#type(String)} attribute.
*
- * @param type The {@link Button#type(String)} attribute.
+ * @param type The {@link Button#type(String)} attribute. Can be <jk>null</jk>.
*/
public Button(String type) {
type(type);
@@ -94,8 +94,8 @@ public class Button extends HtmlElementMixed {
* Creates a {@link Button} element with the specified {@link Button#type(String)} attribute and
* {@link Button#children(Object[])} nodes.
*
- * @param type The {@link Button#type(String)} attribute.
- * @param children The {@link Button#children(Object[])} nodes.
+ * @param type The {@link Button#type(String)} attribute. Can be <jk>null</jk>.
+ * @param children The {@link Button#children(Object[])} nodes. Must not be <jk>null</jk>.
*/
public Button(String type, Object...children) {
type(type).children(children);
@@ -134,6 +134,7 @@ public class Button extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Button autofocus(Object value) {
@@ -182,6 +183,7 @@ public class Button extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Button disabled(Object value) {
@@ -199,7 +201,7 @@ public class Button extends HtmlElementMixed {
* <p>
* The value should match the ID of a form element in the same document.
*
- * @param value The ID of the form element to associate with this button.
+ * @param value The ID of the form element to associate with this button. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Button form(String value) {
@@ -221,7 +223,7 @@ public class Button extends HtmlElementMixed {
* <p>
* URIs defined by {@link UriResolver} can be used for values.
*
- * @param value The URL where the form data will be submitted.
+ * @param value The URL where the form data will be submitted. Can be <jk>null</jk>.
* @return This object.
*/
public Button formaction(String value) {
@@ -243,7 +245,7 @@ public class Button extends HtmlElementMixed {
* <li><js>"text/plain"</js> - Plain text encoding</li>
* </ul>
*
- * @param value The encoding type for form submission.
+ * @param value The encoding type for form submission. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Button formenctype(String value) {
@@ -265,7 +267,7 @@ public class Button extends HtmlElementMixed {
* <li><js>"dialog"</js> - Used for forms within dialog elements</li>
* </ul>
*
- * @param value The HTTP method for form submission.
+ * @param value The HTTP method for form submission. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Button formmethod(String value) {
@@ -289,7 +291,7 @@ public class Button extends HtmlElementMixed {
* <li>Other values - Passed through as-is</li>
* </ul>
*
- * @param value Whether to bypass form validation.
+ * @param value Whether to bypass form validation. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Button formnovalidate(String value) {
@@ -313,7 +315,7 @@ public class Button extends HtmlElementMixed {
* <li><js>"framename"</js> - Open in a named frame</li>
* </ul>
*
- * @param value Where to display the form response.
+ * @param value Where to display the form response. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Button formtarget(String value) {
@@ -349,7 +351,7 @@ public class Button extends HtmlElementMixed {
* <p>
* The value should match the ID of a menu element in the same document.
*
- * @param value The ID of the menu element to display as a pop-up.
+ * @param value The ID of the menu element to display as a pop-up. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Button menu(String value) {
@@ -367,7 +369,7 @@ public class Button extends HtmlElementMixed {
* <p>
* The name should be unique within the form and should not contain spaces or special characters.
*
- * @param value The name of the button for submission and API access.
+ * @param value The name of the button for submission and API access. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Button name(String value) {
@@ -719,7 +721,7 @@ public class Button extends HtmlElementMixed {
* <li><js>"button"</js> - Generic button with no default behavior</li>
* </ul>
*
- * @param value The type of button and its behavior.
+ * @param value The type of button and its behavior. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Button type(String value) {
@@ -736,6 +738,7 @@ public class Button extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Button value(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Canvas.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Canvas.java
index dde4386980..32d3aa9001 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Canvas.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Canvas.java
@@ -96,8 +96,8 @@ public class Canvas extends HtmlElementMixed {
* Creates a {@link Canvas} element with the specified {@link Canvas#width(Object)} and
* {@link Canvas#height(Object)} attributes.
*
- * @param width The {@link Canvas#width(Object)} attribute.
- * @param height The {@link Canvas#height(Object)} attribute.
+ * @param width The {@link Canvas#width(Object)} attribute. Can be <jk>null</jk>.
+ * @param height The {@link Canvas#height(Object)} attribute. Can be <jk>null</jk>.
*/
public Canvas(Number width, Number height) {
width(width).height(height);
@@ -160,6 +160,7 @@ public class Canvas extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Canvas height(Object value) {
@@ -524,6 +525,7 @@ public class Canvas extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Canvas width(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Col.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Col.java
index 0bdd19a6ea..9e5072bc5c 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Col.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Col.java
@@ -90,7 +90,7 @@ public class Col extends HtmlElementVoid {
/**
* Creates a {@link Col} element with the specified {@link Col#span(Object)} attribute.
*
- * @param span The {@link Col#span(Object)} attribute.
+ * @param span The {@link Col#span(Object)} attribute. Can be <jk>null</jk>.
*/
public Col(Number span) {
span(span);
@@ -459,6 +459,7 @@ public class Col extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Col span(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Colgroup.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Colgroup.java
index 40b013cfa0..cb5dcafb79 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Colgroup.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Colgroup.java
@@ -98,7 +98,7 @@ public class Colgroup extends HtmlElementContainer {
/**
* Creates a {@link Colgroup} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Colgroup(Object...children) {
children(children);
@@ -485,6 +485,7 @@ public class Colgroup extends HtmlElementContainer {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Colgroup span(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Data.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Data.java
index e5d265b0ca..14981dd651 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Data.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Data.java
@@ -94,8 +94,8 @@ public class Data extends HtmlElementMixed {
/**
* Creates a {@link Data} element with the specified {@link Data#value(Object)} attribute and child node.
*
- * @param value The {@link Data#value(Object)} attribute.
- * @param child The child node.
+ * @param value The {@link Data#value(Object)} attribute. Can be <jk>null</jk>.
+ * @param child The child node. Can be <jk>null</jk>.
*/
public Data(String value, Object child) {
value(value).child(child);
@@ -507,6 +507,7 @@ public class Data extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Data value(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Del.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Del.java
index 998b81656d..83262e44b5 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Del.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Del.java
@@ -74,7 +74,7 @@ public class Del extends HtmlElementMixed {
/**
* Creates a {@link Del} element with the specified {@link Del#children(Object[])} node.
*
- * @param children The {@link Del#children(Object[])} node.
+ * @param children The {@link Del#children(Object[])} node. Must not be <jk>null</jk>.
*/
public Del(Object...children) {
children(children);
@@ -126,7 +126,7 @@ public class Del extends HtmlElementMixed {
* <p>
* The URL should point to a document that explains why the content was deleted.
*
- * @param value The URL explaining the reason for the deletion.
+ * @param value The URL explaining the reason for the deletion. Can be <jk>null</jk>.
* @return This object.
*/
public Del cite(String value) {
@@ -150,7 +150,7 @@ public class Del extends HtmlElementMixed {
* <p>
* The value should be a valid date-time string in ISO 8601 format.
*
- * @param value The date and time when the content was deleted.
+ * @param value The date and time when the content was deleted. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Del datetime(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Embed.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Embed.java
index 3bb0003438..a9598fa1e5 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Embed.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Embed.java
@@ -81,7 +81,7 @@ public class Embed extends HtmlElementVoid {
/**
* Creates an {@link Embed} element with the specified {@link Embed#src(Object)} attribute.
*
- * @param src The {@link Embed#src(Object)} attribute.
+ * @param src The {@link Embed#src(Object)} attribute. Can be <jk>null</jk>.
*/
public Embed(Object src) {
src(src);
@@ -133,6 +133,7 @@ public class Embed extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Embed height(Object value) {
@@ -480,6 +481,7 @@ public class Embed extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link URL} or {@link String}.
+ * Can be <jk>null</jk>.
* @return This object.
*/
public Embed src(Object value) {
@@ -527,7 +529,7 @@ public class Embed extends HtmlElementVoid {
* <li><js>"audio/mp3"</js> - MP3 audio</li>
* </ul>
*
- * @param value The MIME type of the embedded resource.
+ * @param value The MIME type of the embedded resource. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Embed type(String value) {
@@ -544,6 +546,7 @@ public class Embed extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Embed width(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Fieldset.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Fieldset.java
index bb1439045b..b272d7d822 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Fieldset.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Fieldset.java
@@ -78,7 +78,7 @@ public class Fieldset extends HtmlElementMixed {
/**
* Creates a {@link Fieldset} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Fieldset(Object...children) {
children(children);
@@ -149,6 +149,7 @@ public class Fieldset extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Fieldset disabled(Object value) {
@@ -166,7 +167,7 @@ public class Fieldset extends HtmlElementMixed {
* <p>
* The value should match the ID of a form element in the same document.
*
- * @param value The ID of the form element to associate with this fieldset.
+ * @param value The ID of the form element to associate with this fieldset. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Fieldset form(String value) {
@@ -202,7 +203,7 @@ public class Fieldset extends HtmlElementMixed {
* <p>
* The name should be unique within the form and should not contain spaces or special characters.
*
- * @param value The name of the fieldset for API access and submission.
+ * @param value The name of the fieldset for API access and submission. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Fieldset name(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Form.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Form.java
index ff25776e0f..7166b6524d 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Form.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Form.java
@@ -90,7 +90,7 @@ public class Form extends HtmlElementMixed {
/**
* Creates a {@link Form} element with the specified {@link Form#action(String)} attribute.
*
- * @param action The {@link Form#action(String)} attribute.
+ * @param action The {@link Form#action(String)} attribute. Can be <jk>null</jk>.
*/
public Form(String action) {
action(action);
@@ -99,8 +99,8 @@ public class Form extends HtmlElementMixed {
/**
* Creates an {@link Form} element with the specified {@link Form#action(String)} attribute and child nodes.
*
- * @param action The {@link Form#action(String)} attribute.
- * @param children The child nodes.
+ * @param action The {@link Form#action(String)} attribute. Can be <jk>null</jk>.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Form(String action, Object...children) {
action(action).children(children);
@@ -128,7 +128,7 @@ public class Form extends HtmlElementMixed {
* <li><js>"UTF-8 ISO-8859-1"</js> - Multiple encodings</li>
* </ul>
*
- * @param value The character encodings accepted for form submission.
+ * @param value The character encodings accepted for form submission. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Form acceptcharset(String value) {
@@ -155,7 +155,7 @@ public class Form extends HtmlElementMixed {
* <p>
* URIs defined by {@link UriResolver} can be used for values.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* @return This object.
*/
public Form action(String value) {
@@ -190,7 +190,7 @@ public class Form extends HtmlElementMixed {
* <li><js>"off"</js> - Disable autocomplete</li>
* </ul>
*
- * @param value The default autocomplete behavior for form controls.
+ * @param value The default autocomplete behavior for form controls. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Form autocomplete(String value) {
@@ -236,7 +236,7 @@ public class Form extends HtmlElementMixed {
* <li><js>"text/plain"</js> - Plain text encoding</li>
* </ul>
*
- * @param value The encoding type for form data submission.
+ * @param value The encoding type for form data submission. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Form enctype(String value) {
@@ -276,7 +276,7 @@ public class Form extends HtmlElementMixed {
* <li><js>"dialog"</js> - Used for forms within dialog elements</li>
* </ul>
*
- * @param value The HTTP method for form submission.
+ * @param value The HTTP method for form submission. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Form method(String value) {
@@ -294,7 +294,7 @@ public class Form extends HtmlElementMixed {
* <p>
* The name should be unique within the document and should not contain spaces or special characters.
*
- * @param value The name of the form for API access and submission.
+ * @param value The name of the form for API access and submission. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Form name(String value) {
@@ -308,7 +308,7 @@ public class Form extends HtmlElementMixed {
* <p>
* Disables form validation, allowing the form to be submitted even if validation fails.
*
- * @param value If <jk>true</jk>, disables form validation.
+ * @param value If <jk>true</jk>, disables form validation. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Form novalidate(Boolean value) {
@@ -650,7 +650,7 @@ public class Form extends HtmlElementMixed {
* <li>Frame name - Load in the named frame</li>
* </ul>
*
- * @param value Where to display the form submission response.
+ * @param value Where to display the form submission response. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Form target(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Html.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Html.java
index 8e334dae55..3a51659610 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Html.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Html.java
@@ -83,7 +83,7 @@ public class Html extends HtmlElementContainer {
/**
* Creates an {@link Html} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Html(Object...children) {
children(children);
@@ -165,7 +165,7 @@ public class Html extends HtmlElementContainer {
* <p>
* The manifest file should be a text file that lists resources to be cached.
*
- * @param value The URL of the application cache manifest file.
+ * @param value The URL of the application cache manifest file. Can be <jk>null</jk>.
* @return This object.
*/
public Html manifest(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlBuilder.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlBuilder.java
index 927604ce24..247ac472bf 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlBuilder.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlBuilder.java
@@ -141,8 +141,8 @@ public class HtmlBuilder {
* Creates an {@link A} element with the specified {@link A#href(Object)} attribute and {@link A#children(Object[])}
* nodes.
*
- * @param href The {@link A#href(Object)} attribute.
- * @param children The {@link A#children(Object[])} nodes.
+ * @param href The {@link A#href(Object)} attribute. Can be <jk>null</jk>.
+ * @param children The {@link A#children(Object[])} nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final A a(Object href, Object...children) {
@@ -162,8 +162,8 @@ public class HtmlBuilder {
* Creates an {@link Abbr} element with the specified {@link Abbr#title(String)} attribute and
* {@link Abbr#children(Object[])} nodes.
*
- * @param title The {@link Abbr#title(String)} attribute.
- * @param children The {@link Abbr#children(Object[])} nodes.
+ * @param title The {@link Abbr#title(String)} attribute. Can be <jk>null</jk>.
+ * @param children The {@link Abbr#children(Object[])} nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Abbr abbr(String title, Object...children) {
@@ -182,7 +182,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Address} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Address address(Object...children) {
@@ -202,9 +202,9 @@ public class HtmlBuilder {
* Creates an {@link Area} element with the specified {@link Area#shape(String)}, {@link Area#coords(String)},
* and {@link Area#href(Object)} attributes.
*
- * @param shape The {@link Area#shape(String)} attribute.
- * @param coords The {@link Area#coords(String)} attribute.
- * @param href The {@link Area#href(Object)} attribute.
+ * @param shape The {@link Area#shape(String)} attribute. Can be <jk>null</jk>.
+ * @param coords The {@link Area#coords(String)} attribute. Can be <jk>null</jk>.
+ * @param href The {@link Area#href(Object)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Area area(String shape, String coords, Object href) {
@@ -223,7 +223,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Article} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Article article(Object...children) {
@@ -242,7 +242,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Aside} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Aside aside(Object...children) {
@@ -261,7 +261,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Audio} element with the specified {@link Audio#src(Object)} attribute.
*
- * @param src The {@link Audio#src(Object)} attribute.
+ * @param src The {@link Audio#src(Object)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Audio audio(String src) {
@@ -280,7 +280,7 @@ public class HtmlBuilder {
/**
* Creates a {@link B} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final B b(Object...children) {
@@ -299,7 +299,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Base} element with the specified {@link Base#href(Object)} attribute.
*
- * @param href The {@link Base#href(Object)} attribute.
+ * @param href The {@link Base#href(Object)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Base base(Object href) {
@@ -318,7 +318,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Bdi} element with the specified {@link Bdi#text(Object)} node.
*
- * @param text The {@link Bdi#text(Object)} node.
+ * @param text The {@link Bdi#text(Object)} node. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Bdi bdi(Object text) {
@@ -337,8 +337,8 @@ public class HtmlBuilder {
/**
* Creates a {@link Bdo} element with the specified {@link Bdo#dir(String)} attribute and child nodes.
*
- * @param dir The {@link Bdo#dir(String)} attribute.
- * @param children The child nodes.
+ * @param dir The {@link Bdo#dir(String)} attribute. Can be <jk>null</jk>.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Bdo bdo(String dir, Object...children) {
@@ -357,7 +357,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Blockquote} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Blockquote blockquote(Object...children) {
@@ -376,7 +376,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Body} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Body body(Object...children) {
@@ -404,7 +404,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Button} element with the specified {@link Button#type(String)} attribute.
*
- * @param type The {@link Button#type(String)} attribute.
+ * @param type The {@link Button#type(String)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Button button(String type) {
@@ -415,8 +415,8 @@ public class HtmlBuilder {
* Creates a {@link Button} element with the specified {@link Button#type(String)} attribute and
* {@link Button#children(Object[])} nodes.
*
- * @param type The {@link Button#type(String)} attribute.
- * @param children The {@link Button#children(Object[])} nodes.
+ * @param type The {@link Button#type(String)} attribute. Can be <jk>null</jk>.
+ * @param children The {@link Button#children(Object[])} nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Button button(String type, Object...children) {
@@ -435,8 +435,8 @@ public class HtmlBuilder {
* Creates a {@link Canvas} element with the specified {@link Canvas#width(Object)} and
* {@link Canvas#height(Object)} attributes.
*
- * @param width The {@link Canvas#width(Object)} attribute.
- * @param height The {@link Canvas#height(Object)} attribute.
+ * @param width The {@link Canvas#width(Object)} attribute. Can be <jk>null</jk>.
+ * @param height The {@link Canvas#height(Object)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Canvas canvas(Number width, Number height) {
@@ -455,7 +455,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Caption} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Caption caption(Object...children) {
@@ -474,7 +474,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Cite} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Cite cite(Object...children) {
@@ -493,7 +493,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Code} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Code code(Object...children) {
@@ -513,7 +513,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Col} element with the specified {@link Col#span(Object)} attribute.
*
- * @param span The {@link Col#span(Object)} attribute.
+ * @param span The {@link Col#span(Object)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Col col(Number span) {
@@ -532,7 +532,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Colgroup} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Colgroup colgroup(Object...children) {
@@ -551,8 +551,8 @@ public class HtmlBuilder {
/**
* Creates a {@link Data} element with the specified {@link Data#value(Object)} attribute and child node.
*
- * @param value The {@link Data#value(Object)} attribute.
- * @param child The child node.
+ * @param value The {@link Data#value(Object)} attribute. Can be <jk>null</jk>.
+ * @param child The child node. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Data data(String value, Object child) {
@@ -571,8 +571,8 @@ public class HtmlBuilder {
/**
* Creates a {@link Datalist} element with the specified {@link Datalist#id(String)} attribute and child nodes.
*
- * @param id The {@link Datalist#id(String)} attribute.
- * @param children The child nodes.
+ * @param id The {@link Datalist#id(String)} attribute. Can be <jk>null</jk>.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Datalist datalist(String id, Option...children) {
@@ -591,7 +591,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Dd} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Dd dd(Object...children) {
@@ -610,7 +610,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Del} element with the specified {@link Del#children(Object[])} node.
*
- * @param children The {@link Del#children(Object[])} node.
+ * @param children The {@link Del#children(Object[])} node. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Del del(Object...children) {
@@ -629,7 +629,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Dfn} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Dfn dfn(Object...children) {
@@ -648,7 +648,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Div} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Div div(Object...children) {
@@ -667,7 +667,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Dl} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Dl dl(Object...children) {
@@ -686,7 +686,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Dt} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Dt dt(Object...children) {
@@ -705,7 +705,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Em} element with the specified {@link Em#children(Object[])} nodes.
*
- * @param children The {@link Em#children(Object[])} nodes.
+ * @param children The {@link Em#children(Object[])} nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Em em(Object...children) {
@@ -724,7 +724,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Embed} element with the specified {@link Embed#src(Object)} attribute.
*
- * @param src The {@link Embed#src(Object)} attribute.
+ * @param src The {@link Embed#src(Object)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Embed embed(Object src) {
@@ -743,7 +743,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Fieldset} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Fieldset fieldset(Object...children) {
@@ -762,7 +762,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Figcaption} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Figcaption figcaption(Object...children) {
@@ -781,7 +781,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Figure} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Figure figure(Object...children) {
@@ -800,7 +800,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Footer} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Footer footer(Object...children) {
@@ -819,7 +819,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Form} element with the specified {@link Form#action(String)} attribute.
*
- * @param action The {@link Form#action(String)} attribute.
+ * @param action The {@link Form#action(String)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Form form(String action) {
@@ -829,8 +829,8 @@ public class HtmlBuilder {
/**
* Creates an {@link Form} element with the specified {@link Form#action(String)} attribute and child nodes.
*
- * @param action The {@link Form#action(String)} attribute.
- * @param children The child nodes.
+ * @param action The {@link Form#action(String)} attribute. Can be <jk>null</jk>.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Form form(String action, Object...children) {
@@ -849,7 +849,7 @@ public class HtmlBuilder {
/**
* Creates an {@link H1} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final H1 h1(Object...children) {
@@ -868,7 +868,7 @@ public class HtmlBuilder {
/**
* Creates an {@link H2} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final H2 h2(Object...children) {
@@ -887,7 +887,7 @@ public class HtmlBuilder {
/**
* Creates an {@link H3} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final H3 h3(Object...children) {
@@ -906,7 +906,7 @@ public class HtmlBuilder {
/**
* Creates an {@link H4} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final H4 h4(Object...children) {
@@ -925,7 +925,7 @@ public class HtmlBuilder {
/**
* Creates an {@link H5} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final H5 h5(Object...children) {
@@ -943,7 +943,7 @@ public class HtmlBuilder {
/**
* Creates an {@link H6} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final H6 h6(Object...children) {
@@ -962,7 +962,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Head} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Head head(Object...children) {
@@ -981,7 +981,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Header} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Header header(Object...children) {
@@ -1009,7 +1009,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Html} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Html html(Object...children) {
@@ -1028,7 +1028,7 @@ public class HtmlBuilder {
/**
* Creates an {@link I} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final I i(Object...children) {
@@ -1047,7 +1047,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Iframe} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Iframe iframe(Object...children) {
@@ -1066,7 +1066,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Img} element with the specified {@link Img#src(Object)} attribute.
*
- * @param src The {@link Img#src(Object)} attribute.
+ * @param src The {@link Img#src(Object)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Img img(Object src) {
@@ -1085,7 +1085,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Input} element with the specified {@link Input#type(String)} attribute.
*
- * @param type The {@link Input#type(String)} attribute.
+ * @param type The {@link Input#type(String)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Input input(String type) {
@@ -1104,7 +1104,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Ins} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Ins ins(Object...children) {
@@ -1123,7 +1123,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Kbd} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Kbd kbd(Object...children) {
@@ -1151,7 +1151,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Label} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Label label(Object...children) {
@@ -1170,7 +1170,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Legend} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Legend legend(Object...children) {
@@ -1189,7 +1189,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Li} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Li li(Object...children) {
@@ -1208,7 +1208,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Link} element with the specified {@link Link#href(Object)} attribute.
*
- * @param href The {@link Link#href(Object)} attribute.
+ * @param href The {@link Link#href(Object)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Link link(Object href) {
@@ -1230,7 +1230,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Main} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
@SuppressWarnings({
@@ -1252,7 +1252,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Map} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Map map(Object...children) {
@@ -1271,7 +1271,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Mark} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Mark mark(Object...children) {
@@ -1299,7 +1299,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Meter} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Meter meter(Object...children) {
@@ -1318,7 +1318,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Nav} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Nav nav(Object...children) {
@@ -1337,7 +1337,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Noscript} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Noscript noscript(Object...children) {
@@ -1356,7 +1356,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Object_} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Object_ object(Object...children) {
@@ -1375,7 +1375,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Ol} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Ol ol(Object...children) {
@@ -1394,7 +1394,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Optgroup} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Optgroup optgroup(Object...children) {
@@ -1413,7 +1413,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Option} element with the specified {@link Option#text(Object)} attribute.
*
- * @param text The {@link Option#text(Object)} attribute.
+ * @param text The {@link Option#text(Object)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Option option(Object text) {
@@ -1424,8 +1424,8 @@ public class HtmlBuilder {
* Creates an {@link Option} element with the specified {@link Option#value(Object)} attribute and
* {@link Option#text(Object)} node.
*
- * @param value The {@link Option#value(Object)} attribute.
- * @param text The {@link Option#text(Object)} node.
+ * @param value The {@link Option#value(Object)} attribute. Can be <jk>null</jk>.
+ * @param text The {@link Option#text(Object)} node. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Option option(Object value, Object text) {
@@ -1444,7 +1444,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Output} element with the specified {@link Output#name(String)} attribute.
*
- * @param name The {@link Output#name(String)} attribute.
+ * @param name The {@link Output#name(String)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Output output(String name) {
@@ -1463,7 +1463,7 @@ public class HtmlBuilder {
/**
* Creates a {@link P} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final P p(Object...children) {
@@ -1483,8 +1483,8 @@ public class HtmlBuilder {
* Creates a {@link Param} element with the specified {@link Param#name(String)} and {@link Param#value(Object)}
* attributes.
*
- * @param name The {@link Param#name(String)} attribute.
- * @param value The {@link Param#value(Object)} attribute.
+ * @param name The {@link Param#name(String)} attribute. Can be <jk>null</jk>.
+ * @param value The {@link Param#value(Object)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Param param(String name, Object value) {
@@ -1503,7 +1503,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Pre} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Pre pre(Object...children) {
@@ -1522,7 +1522,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Progress} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Progress progress(Object...children) {
@@ -1541,7 +1541,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Q} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Q q(Object...children) {
@@ -1560,7 +1560,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Rb} element with the specified {@link Rb#children(Object[])} nodes.
*
- * @param children The {@link Rb#children(Object[])} nodes.
+ * @param children The {@link Rb#children(Object[])} nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Rb rb(Object...children) {
@@ -1579,7 +1579,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Rp} element with the specified {@link Rp#children(Object[])} nodes.
*
- * @param children The {@link Rp#children(Object[])} nodes.
+ * @param children The {@link Rp#children(Object[])} nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Rp rp(Object...children) {
@@ -1598,7 +1598,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Rt} element with the specified {@link Rt#children(Object[])} nodes.
*
- * @param children The {@link Rt#children(Object[])} nodes.
+ * @param children The {@link Rt#children(Object[])} nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Rt rt(Object...children) {
@@ -1617,7 +1617,7 @@ public class HtmlBuilder {
/**
* Creates an {@link Rtc} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Rtc rtc(Object...children) {
@@ -1636,7 +1636,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Ruby} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Ruby ruby(Object...children) {
@@ -1655,7 +1655,7 @@ public class HtmlBuilder {
/**
* Creates an {@link S} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final S s(Object...children) {
@@ -1674,7 +1674,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Samp} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Samp samp(Object...children) {
@@ -1694,8 +1694,8 @@ public class HtmlBuilder {
* Creates a {@link Script} element with the specified {@link Script#type(String)} attribute and
* {@link Script#text(Object)} node.
*
- * @param type The {@link Script#type(String)} attribute.
- * @param text The child text node.
+ * @param type The {@link Script#type(String)} attribute. Can be <jk>null</jk>.
+ * @param text The child text node. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Script script(String type, String...text) {
@@ -1714,7 +1714,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Section} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Section section(Object...children) {
@@ -1733,8 +1733,8 @@ public class HtmlBuilder {
/**
* Creates a {@link Select} element with the specified {@link Select#name(String)} attribute and child nodes.
*
- * @param name The {@link Select#name(String)} attribute.
- * @param children The child nodes.
+ * @param name The {@link Select#name(String)} attribute. Can be <jk>null</jk>.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Select select(String name, Object...children) {
@@ -1753,7 +1753,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Small} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Small small(Object...children) {
@@ -1773,8 +1773,8 @@ public class HtmlBuilder {
* Creates a {@link Source} element with the specified {@link Source#src(Object)} and {@link Source#type(String)}
* attributes.
*
- * @param src The {@link Source#src(Object)} attribute.
- * @param type The {@link Source#type(String)} attribute.
+ * @param src The {@link Source#src(Object)} attribute. Can be <jk>null</jk>.
+ * @param type The {@link Source#type(String)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Source source(Object src, String type) {
@@ -1793,7 +1793,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Span} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Span span(Object...children) {
@@ -1812,7 +1812,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Strong} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Strong strong(Object...children) {
@@ -1831,7 +1831,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Style} element with the specified {@link Style#text(Object)} node.
*
- * @param text The {@link Style#text(Object)} node.
+ * @param text The {@link Style#text(Object)} node. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Style style(Object text) {
@@ -1844,6 +1844,7 @@ public class HtmlBuilder {
* @param text
* The contents of the style element.
* <br>Values will be concatenated with newlines.
+ * <br>Can be <jk>null</jk>.
* @return The new element.
*/
public static final Style style(String...text) {
@@ -1862,7 +1863,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Sub} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Sub sub(Object...children) {
@@ -1881,7 +1882,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Sup} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Sup sup(Object...children) {
@@ -1900,7 +1901,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Table} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Table table(Object...children) {
@@ -1919,7 +1920,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Tbody} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Tbody tbody(Object...children) {
@@ -1938,7 +1939,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Td} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Td td(Object...children) {
@@ -1957,8 +1958,8 @@ public class HtmlBuilder {
/**
* Creates a {@link Template} element with the specified {@link Template#id(String)} attribute and child nodes.
*
- * @param id The {@link Template#id(String)} attribute.
- * @param children The child nodes.
+ * @param id The {@link Template#id(String)} attribute. Can be <jk>null</jk>.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Template template(String id, Object...children) {
@@ -1978,8 +1979,8 @@ public class HtmlBuilder {
* Creates a {@link Textarea} element with the specified {@link Textarea#name(String)} attribute and
* {@link Textarea#text(Object)} node.
*
- * @param name The {@link Textarea#name(String)} attribute.
- * @param text The {@link Textarea#text(Object)} node.
+ * @param name The {@link Textarea#name(String)} attribute. Can be <jk>null</jk>.
+ * @param text The {@link Textarea#text(Object)} node. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Textarea textarea(String name, String text) {
@@ -1998,7 +1999,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Tfoot} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Tfoot tfoot(Object...children) {
@@ -2017,7 +2018,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Th} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Th th(Object...children) {
@@ -2036,7 +2037,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Thead} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Thead thead(Object...children) {
@@ -2055,7 +2056,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Time} element with the specified {@link Time#children(Object[])} nodes.
*
- * @param children The {@link Time#children(Object[])} nodes.
+ * @param children The {@link Time#children(Object[])} nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Time time(Object...children) {
@@ -2074,7 +2075,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Title} element with the specified {@link Title#text(Object)} node.
*
- * @param text The {@link Title#text(Object)} node.
+ * @param text The {@link Title#text(Object)} node. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Title title(String text) {
@@ -2093,7 +2094,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Tr} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Tr tr(Object...children) {
@@ -2113,8 +2114,8 @@ public class HtmlBuilder {
* Creates a {@link Track} element with the specified {@link Track#src(Object)} and {@link Track#kind(String)}
* attributes.
*
- * @param src The {@link Track#src(Object)} attribute.
- * @param kind The {@link Track#kind(String)} attribute.
+ * @param src The {@link Track#src(Object)} attribute. Can be <jk>null</jk>.
+ * @param kind The {@link Track#kind(String)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Track track(Object src, String kind) {
@@ -2133,7 +2134,7 @@ public class HtmlBuilder {
/**
* Creates a {@link U} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final U u(Object...children) {
@@ -2152,7 +2153,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Ul} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
public static final Ul ul(Object...children) {
@@ -2174,7 +2175,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Var} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
* @return The new element.
*/
@SuppressWarnings({
@@ -2196,7 +2197,7 @@ public class HtmlBuilder {
/**
* Creates a {@link Video} element with the specified {@link Video#src(Object)} attribute.
*
- * @param src The {@link Video#src(Object)} attribute.
+ * @param src The {@link Video#src(Object)} attribute. Can be <jk>null</jk>.
* @return The new element.
*/
public static final Video video(Object src) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElement.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElement.java
index 0685e626e2..260c9b29da 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElement.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElement.java
@@ -17,6 +17,7 @@
package org.apache.juneau.bean.html5;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.commons.utils.ObjectUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.commons.utils.StringUtils.*;
import static org.apache.juneau.marshall.html.HtmlFormat.*;
@@ -53,7 +54,7 @@ public abstract class HtmlElement {
* Specifies one or more CSS class names for the element, separated by spaces.
* These classes can be used for styling and JavaScript selection.
*
- * @param value Space-separated CSS class names (e.g., <js>"btn btn-primary"</js>).
+ * @param value Space-separated CSS class names (e.g., <js>"btn btn-primary"</js>). Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
@SuppressWarnings({
@@ -73,7 +74,7 @@ public abstract class HtmlElement {
* The value should be a single character that, when pressed with a modifier key (usually Alt),
* activates the element.
*
- * @param value The keyboard shortcut character (e.g., <js>"a"</js>, <js>"1"</js>).
+ * @param value The keyboard shortcut character (e.g., <js>"a"</js>, <js>"1"</js>). Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement accesskey(String value) {
@@ -85,7 +86,7 @@ public abstract class HtmlElement {
* Adds an arbitrary attribute to this element.
*
* @param key The attribute name.
- * @param val The attribute value.
+ * @param val The attribute value. Can be <jk>null</jk> to remove the attribute.
* @return This object.
*/
public HtmlElement attr(String key, Object val) {
@@ -116,7 +117,7 @@ public abstract class HtmlElement {
* URIs defined by {@link UriResolver} can be used for values.
*
* @param key The attribute name.
- * @param val The attribute value.
+ * @param val The attribute value. Can be <jk>null</jk>.
* @return This object.
*/
public HtmlElement attrUri(String key, Object val) {
@@ -141,7 +142,7 @@ public abstract class HtmlElement {
* <li><js>"plaintext-only"</js> - Element content is editable, but rich text formatting is disabled</li>
* </ul>
*
- * @param value The editability state of the element.
+ * @param value The editability state of the element. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement contenteditable(Object value) {
@@ -163,7 +164,7 @@ public abstract class HtmlElement {
* <li><js>"auto"</js> - Browser determines direction based on content</li>
* </ul>
*
- * @param value The text direction for the element.
+ * @param value The text direction for the element. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement dir(String value) {
@@ -199,7 +200,7 @@ public abstract class HtmlElement {
/**
* The attributes of this element.
*
- * @return The attributes of this element.
+ * @return The attributes of this element, or <jk>null</jk> if no attributes are set.
*/
@Xml(format = ATTRS)
@BeanProp("a")
@@ -219,6 +220,7 @@ public abstract class HtmlElement {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement hidden(Object value) {
@@ -233,7 +235,7 @@ public abstract class HtmlElement {
* Specifies a unique identifier for the element. The ID must be unique within the document
* and can be used for CSS styling, JavaScript selection, and anchor links.
*
- * @param value A unique identifier for the element (e.g., <js>"header"</js>, <js>"main-content"</js>).
+ * @param value A unique identifier for the element (e.g., <js>"header"</js>, <js>"main-content"</js>). Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement id(String value) {
@@ -248,7 +250,7 @@ public abstract class HtmlElement {
* Specifies the primary language of the element's content using a language tag.
* This helps with accessibility, search engines, and browser features like spell checking.
*
- * @param value A language tag (e.g., <js>"en"</js>, <js>"en-US"</js>, <js>"es"</js>, <js>"fr-CA"</js>).
+ * @param value A language tag (e.g., <js>"en"</js>, <js>"en-US"</js>, <js>"es"</js>, <js>"fr-CA"</js>). Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement lang(String value) {
@@ -262,7 +264,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when an operation is aborted (e.g., image loading is cancelled).
*
- * @param value JavaScript code to execute when the abort event occurs.
+ * @param value JavaScript code to execute when the abort event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onabort(String value) {
@@ -286,7 +288,7 @@ public abstract class HtmlElement {
* <li>If using double quotes for attributes: <c>onblur(<js>"validate('email')"</js>)</c>
* </ul>
*
- * @param value JavaScript code to execute when the element loses focus.
+ * @param value JavaScript code to execute when the element loses focus. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onblur(String value) {
@@ -300,7 +302,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when a dialog is cancelled.
*
- * @param value JavaScript code to execute when the cancel event occurs.
+ * @param value JavaScript code to execute when the cancel event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement oncancel(String value) {
@@ -314,7 +316,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the media can start playing (enough data has been buffered).
*
- * @param value JavaScript code to execute when the canplay event occurs.
+ * @param value JavaScript code to execute when the canplay event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement oncanplay(String value) {
@@ -329,7 +331,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the media can play through to the end without buffering.
*
- * @param value JavaScript code to execute when the canplaythrough event occurs.
+ * @param value JavaScript code to execute when the canplaythrough event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement oncanplaythrough(String value) {
@@ -353,7 +355,7 @@ public abstract class HtmlElement {
* <li>If using double quotes for attributes: <c>onchange(<js>"validate('field')"</js>)</c>
* </ul>
*
- * @param value JavaScript code to execute when the change event occurs.
+ * @param value JavaScript code to execute when the change event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onchange(String value) {
@@ -377,7 +379,7 @@ public abstract class HtmlElement {
* <li>If using double quotes for attributes: <c>onclick(<js>"alert('Hello')"</js>)</c>
* </ul>
*
- * @param value JavaScript code to execute when the click event occurs.
+ * @param value JavaScript code to execute when the click event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onclick(String value) {
@@ -392,7 +394,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when a text track cue changes.
*
- * @param value JavaScript code to execute when the cuechange event occurs.
+ * @param value JavaScript code to execute when the cuechange event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement oncuechange(String value) {
@@ -406,7 +408,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the element is double-clicked.
*
- * @param value JavaScript code to execute when the dblclick event occurs.
+ * @param value JavaScript code to execute when the dblclick event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement ondblclick(String value) {
@@ -421,7 +423,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the duration of the media changes.
*
- * @param value JavaScript code to execute when the durationchange event occurs.
+ * @param value JavaScript code to execute when the durationchange event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement ondurationchange(String value) {
@@ -435,7 +437,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the media element becomes empty (e.g., network error).
*
- * @param value JavaScript code to execute when the emptied event occurs.
+ * @param value JavaScript code to execute when the emptied event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onemptied(String value) {
@@ -449,7 +451,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the media playback reaches the end.
*
- * @param value JavaScript code to execute when the ended event occurs.
+ * @param value JavaScript code to execute when the ended event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onended(String value) {
@@ -463,7 +465,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when an error occurs (e.g., failed resource loading).
*
- * @param value JavaScript code to execute when the error event occurs.
+ * @param value JavaScript code to execute when the error event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onerror(String value) {
@@ -487,7 +489,7 @@ public abstract class HtmlElement {
* <li>If using double quotes for attributes: <c>onfocus(<js>"highlight('field')"</js>)</c>
* </ul>
*
- * @param value JavaScript code to execute when the focus event occurs.
+ * @param value JavaScript code to execute when the focus event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onfocus(String value) {
@@ -501,7 +503,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the value of an input element changes (fires on every keystroke).
*
- * @param value JavaScript code to execute when the input event occurs.
+ * @param value JavaScript code to execute when the input event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement oninput(String value) {
@@ -515,7 +517,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when form validation fails.
*
- * @param value JavaScript code to execute when the invalid event occurs.
+ * @param value JavaScript code to execute when the invalid event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement oninvalid(String value) {
@@ -529,7 +531,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when a key is pressed down.
*
- * @param value JavaScript code to execute when the keydown event occurs.
+ * @param value JavaScript code to execute when the keydown event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onkeydown(String value) {
@@ -543,7 +545,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when a key is pressed (deprecated, use onkeydown instead).
*
- * @param value JavaScript code to execute when the keypress event occurs.
+ * @param value JavaScript code to execute when the keypress event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onkeypress(String value) {
@@ -557,7 +559,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when a key is released.
*
- * @param value JavaScript code to execute when the keyup event occurs.
+ * @param value JavaScript code to execute when the keyup event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onkeyup(String value) {
@@ -581,7 +583,7 @@ public abstract class HtmlElement {
* <li>If using double quotes for attributes: <c>onload(<js>"init('config')"</js>)</c>
* </ul>
*
- * @param value JavaScript code to execute when the load event occurs.
+ * @param value JavaScript code to execute when the load event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onload(String value) {
@@ -596,7 +598,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the first frame of media has finished loading.
*
- * @param value JavaScript code to execute when the loadeddata event occurs.
+ * @param value JavaScript code to execute when the loadeddata event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onloadeddata(String value) {
@@ -611,7 +613,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when metadata (duration, dimensions, etc.) has been loaded.
*
- * @param value JavaScript code to execute when the loadedmetadata event occurs.
+ * @param value JavaScript code to execute when the loadedmetadata event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onloadedmetadata(String value) {
@@ -626,7 +628,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the browser starts loading the media.
*
- * @param value JavaScript code to execute when the loadstart event occurs.
+ * @param value JavaScript code to execute when the loadstart event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onloadstart(String value) {
@@ -641,7 +643,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when a mouse button is pressed down on the element.
*
- * @param value JavaScript code to execute when the mousedown event occurs.
+ * @param value JavaScript code to execute when the mousedown event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onmousedown(String value) {
@@ -655,7 +657,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the mouse pointer enters the element (does not bubble).
*
- * @param value JavaScript code to execute when the mouseenter event occurs.
+ * @param value JavaScript code to execute when the mouseenter event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onmouseenter(String value) {
@@ -670,7 +672,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the mouse pointer leaves the element (does not bubble).
*
- * @param value JavaScript code to execute when the mouseleave event occurs.
+ * @param value JavaScript code to execute when the mouseleave event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onmouseleave(String value) {
@@ -685,7 +687,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the mouse pointer moves over the element.
*
- * @param value JavaScript code to execute when the mousemove event occurs.
+ * @param value JavaScript code to execute when the mousemove event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onmousemove(String value) {
@@ -699,7 +701,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the mouse pointer moves out of the element (bubbles).
*
- * @param value JavaScript code to execute when the mouseout event occurs.
+ * @param value JavaScript code to execute when the mouseout event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onmouseout(String value) {
@@ -724,7 +726,7 @@ public abstract class HtmlElement {
* <li>If using double quotes for attributes: <c>onmouseover(<js>"showTooltip('info')"</js>)</c>
* </ul>
*
- * @param value JavaScript code to execute when the mouseover event occurs.
+ * @param value JavaScript code to execute when the mouseover event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onmouseover(String value) {
@@ -738,7 +740,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when a mouse button is released over the element.
*
- * @param value JavaScript code to execute when the mouseup event occurs.
+ * @param value JavaScript code to execute when the mouseup event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onmouseup(String value) {
@@ -753,7 +755,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the mouse wheel is rotated over the element (deprecated, use onwheel).
*
- * @param value JavaScript code to execute when the mousewheel event occurs.
+ * @param value JavaScript code to execute when the mousewheel event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onmousewheel(String value) {
@@ -767,7 +769,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when media playback is paused.
*
- * @param value JavaScript code to execute when the pause event occurs.
+ * @param value JavaScript code to execute when the pause event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onpause(String value) {
@@ -781,7 +783,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when media playback starts.
*
- * @param value JavaScript code to execute when the play event occurs.
+ * @param value JavaScript code to execute when the play event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onplay(String value) {
@@ -795,7 +797,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when media playback starts after being paused or delayed.
*
- * @param value JavaScript code to execute when the playing event occurs.
+ * @param value JavaScript code to execute when the playing event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onplaying(String value) {
@@ -809,7 +811,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the browser is downloading media data.
*
- * @param value JavaScript code to execute when the progress event occurs.
+ * @param value JavaScript code to execute when the progress event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onprogress(String value) {
@@ -824,7 +826,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the playback rate of media changes.
*
- * @param value JavaScript code to execute when the ratechange event occurs.
+ * @param value JavaScript code to execute when the ratechange event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onratechange(String value) {
@@ -838,7 +840,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when a form is reset.
*
- * @param value JavaScript code to execute when the reset event occurs.
+ * @param value JavaScript code to execute when the reset event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onreset(String value) {
@@ -852,7 +854,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the element is resized.
*
- * @param value JavaScript code to execute when the resize event occurs.
+ * @param value JavaScript code to execute when the resize event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onresize(String value) {
@@ -866,7 +868,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the element's scrollbar is scrolled.
*
- * @param value JavaScript code to execute when the scroll event occurs.
+ * @param value JavaScript code to execute when the scroll event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onscroll(String value) {
@@ -880,7 +882,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when a seek operation completes.
*
- * @param value JavaScript code to execute when the seeked event occurs.
+ * @param value JavaScript code to execute when the seeked event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onseeked(String value) {
@@ -894,7 +896,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when a seek operation begins.
*
- * @param value JavaScript code to execute when the seeking event occurs.
+ * @param value JavaScript code to execute when the seeking event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onseeking(String value) {
@@ -908,7 +910,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when text is selected in the element.
*
- * @param value JavaScript code to execute when the select event occurs.
+ * @param value JavaScript code to execute when the select event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onselect(String value) {
@@ -922,7 +924,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when a context menu is shown.
*
- * @param value JavaScript code to execute when the show event occurs.
+ * @param value JavaScript code to execute when the show event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onshow(String value) {
@@ -936,7 +938,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when media loading is stalled.
*
- * @param value JavaScript code to execute when the stalled event occurs.
+ * @param value JavaScript code to execute when the stalled event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onstalled(String value) {
@@ -960,7 +962,7 @@ public abstract class HtmlElement {
* <li>If using double quotes for attributes: <c>onsubmit(<js>"return validate('form')"</js>)</c>
* </ul>
*
- * @param value JavaScript code to execute when the submit event occurs.
+ * @param value JavaScript code to execute when the submit event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onsubmit(String value) {
@@ -974,7 +976,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when media loading is suspended.
*
- * @param value JavaScript code to execute when the suspend event occurs.
+ * @param value JavaScript code to execute when the suspend event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onsuspend(String value) {
@@ -989,7 +991,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the current playback position changes.
*
- * @param value JavaScript code to execute when the timeupdate event occurs.
+ * @param value JavaScript code to execute when the timeupdate event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement ontimeupdate(String value) {
@@ -1003,7 +1005,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when a details element is opened or closed.
*
- * @param value JavaScript code to execute when the toggle event occurs.
+ * @param value JavaScript code to execute when the toggle event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement ontoggle(String value) {
@@ -1018,7 +1020,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when the volume of media changes.
*
- * @param value JavaScript code to execute when the volumechange event occurs.
+ * @param value JavaScript code to execute when the volumechange event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onvolumechange(String value) {
@@ -1032,7 +1034,7 @@ public abstract class HtmlElement {
* <p>
* Event handler for when media playback stops to buffer more data.
*
- * @param value JavaScript code to execute when the waiting event occurs.
+ * @param value JavaScript code to execute when the waiting event occurs. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement onwaiting(String value) {
@@ -1043,7 +1045,7 @@ public abstract class HtmlElement {
/**
* Sets the attributes for this element.
*
- * @param value The new attributes for this element.
+ * @param value The new attributes for this element. Can be <jk>null</jk>.
* @return This object.
*/
@BeanProp("a")
@@ -1072,7 +1074,7 @@ public abstract class HtmlElement {
* <li><js>"false"</js> - Disable spell checking for this element</li>
* </ul>
*
- * @param value Whether spell checking should be enabled.
+ * @param value Whether spell checking should be enabled. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement spellcheck(Object value) {
@@ -1087,7 +1089,7 @@ public abstract class HtmlElement {
* Specifies inline CSS styles for the element. The value should be valid CSS
* property-value pairs separated by semicolons.
*
- * @param value Inline CSS styles (e.g., <js>"color: red; font-size: 14px;"</js>).
+ * @param value Inline CSS styles (e.g., <js>"color: red; font-size: 14px;"</js>). Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement style(String value) {
@@ -1109,7 +1111,7 @@ public abstract class HtmlElement {
* <li>Negative integer - Element is not focusable</li>
* </ul>
*
- * @param value The tab order value for keyboard navigation.
+ * @param value The tab order value for keyboard navigation. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement tabindex(Object value) {
@@ -1124,7 +1126,7 @@ public abstract class HtmlElement {
* Specifies additional information about the element, typically displayed as a tooltip
* when the user hovers over the element.
*
- * @param value Tooltip text to display on hover (e.g., <js>"Click to submit form"</js>).
+ * @param value Tooltip text to display on hover (e.g., <js>"Click to submit form"</js>). Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement title(String value) {
@@ -1150,7 +1152,7 @@ public abstract class HtmlElement {
* <li><js>"no"</js> - Content should not be translated</li>
* </ul>
*
- * @param value Whether the element content should be translated.
+ * @param value Whether the element content should be translated. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public HtmlElement translate(Object value) {
@@ -1161,13 +1163,13 @@ public abstract class HtmlElement {
/**
* If the specified attribute is a boolean, it gets converted to the attribute name if <jk>true</jk> or <jk>null</jk> if <jk>false</jk>.
*
- * @param value The attribute value.
+ * @param value The attribute value. Can be <jk>null</jk>.
* @param attr The attribute name.
- * @return The deminimized value, or the same value if the value wasn't a boolean.
+ * @return The deminimized value, or the same value if the value wasn't a boolean, or <jk>null</jk> if the value was a boolean <jk>false</jk>.
*/
protected Object deminimize(Object value, String attr) {
if (value instanceof Boolean value2) {
- if (Boolean.TRUE.equals(value2))
+ if (isTrue(value2))
return attr;
return null;
}
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementContainer.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementContainer.java
index 2faf00067b..264697f4c9 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementContainer.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementContainer.java
@@ -17,6 +17,7 @@
package org.apache.juneau.bean.html5;
import static org.apache.juneau.marshall.xml.XmlFormat.*;
+import static org.apache.juneau.commons.utils.Shorts.*;
import java.util.*;
@@ -63,7 +64,7 @@ public class HtmlElementContainer extends HtmlElement {
/**
* Adds a child element to this element.
*
- * @param value The child to add as a child element.
+ * @param value The child to add as a child element. Can be <jk>null</jk>.
* @return This object.
*/
public HtmlElement child(Object value) {
@@ -76,7 +77,7 @@ public class HtmlElementContainer extends HtmlElement {
/**
* Adds one or more child elements to this element.
*
- * @param value The children to add as child elements.
+ * @param value The children to add as child elements. Must not be <jk>null</jk>.
* @return This object.
*/
public HtmlElement children(Object...value) {
@@ -156,11 +157,11 @@ public class HtmlElementContainer extends HtmlElement {
/**
* The children of this element.
*
- * @return The children of this element.
+ * @return The children of this element, or <jk>null</jk> if no children are set.
*/
@Xml(format = ELEMENTS)
@BeanProp(name="c") @MarshalledProp(dictionary=HtmlBeanDictionary.class)
- public List<Object> getChildren() { return children; }
+ public List<Object> getChildren() { return u(children); }
@Override /* Overridden from HtmlElement */
public HtmlElementContainer hidden(Object value) {
@@ -483,7 +484,7 @@ public class HtmlElementContainer extends HtmlElement {
/**
* Sets the children for this container.
*
- * @param children The new children for this container.
+ * @param children The new children for this container. Can be <jk>null</jk>.
* @return This object.
*/
@BeanProp("c")
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementMixed.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementMixed.java
index 9f0d17d8ee..6ffd9e308d 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementMixed.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementMixed.java
@@ -17,6 +17,7 @@
package org.apache.juneau.bean.html5;
import static org.apache.juneau.marshall.xml.XmlFormat.*;
+import static org.apache.juneau.commons.utils.Shorts.*;
import java.util.*;
@@ -67,6 +68,7 @@ public class HtmlElementMixed extends HtmlElement {
* The child to add as a child element.
* Can be a string or {@link HtmlElement}.
* Can also be a container of strings and elements.
+ * Can be <jk>null</jk>.
* @return This object.
*/
public HtmlElement child(Object value) {
@@ -86,6 +88,7 @@ public class HtmlElementMixed extends HtmlElement {
* The children to add as child elements.
* Can be a mixture of strings and {@link HtmlElement} objects.
* Can also be containers of strings and elements.
+ * Must not be <jk>null</jk>.
* @return This object.
*/
public HtmlElement children(Object...value) {
@@ -162,11 +165,11 @@ public class HtmlElementMixed extends HtmlElement {
/**
* The children of this element.
*
- * @return The children of this element.
+ * @return The children of this element, or <jk>null</jk> if no children are set.
*/
@Xml(format = MIXED)
@BeanProp(name="c") @MarshalledProp(dictionary=HtmlBeanDictionary.class)
- public List<Object> getChildren() { return children; }
+ public List<Object> getChildren() { return u(children); }
@Override /* Overridden from HtmlElement */
public HtmlElementMixed hidden(Object value) {
@@ -489,7 +492,7 @@ public class HtmlElementMixed extends HtmlElement {
/**
* Sets the children of this element.
*
- * @param children The new children of this element.
+ * @param children The new children of this element. Can be <jk>null</jk>.
* @return This object.
*/
@BeanProp("c")
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementRawText.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementRawText.java
index faf66850cc..ea26acce7a 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementRawText.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementRawText.java
@@ -427,7 +427,7 @@ public class HtmlElementRawText extends HtmlElement {
/**
* Sets the text node on this element.
*
- * @param value The text node to add to this element.
+ * @param value The text node to add to this element. Can be <jk>null</jk>.
* @return This object.
*/
public HtmlElement text(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementText.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementText.java
index 0aebff55ad..2da625c840 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementText.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementText.java
@@ -426,7 +426,7 @@ public class HtmlElementText extends HtmlElement {
/**
* Sets the text node on this element.
*
- * @param value The text node to add to this element.
+ * @param value The text node to add to this element. Can be <jk>null</jk>.
* @return This object.
*/
public HtmlElement text(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Iframe.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Iframe.java
index e31740f1c3..9dcd7716e9 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Iframe.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Iframe.java
@@ -87,7 +87,7 @@ public class Iframe extends HtmlElementMixed {
/**
* Creates an {@link Iframe} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Iframe(Object...children) {
children(children);
@@ -151,6 +151,7 @@ public class Iframe extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Iframe height(Object value) {
@@ -186,7 +187,7 @@ public class Iframe extends HtmlElementMixed {
* <p>
* The name should be unique within the document.
*
- * @param value The name of the iframe for targeting.
+ * @param value The name of the iframe for targeting. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Iframe name(String value) {
@@ -512,7 +513,7 @@ public class Iframe extends HtmlElementMixed {
* <li><js>"allow-top-navigation"</js> - Allow navigation of top-level browsing context</li>
* </ul>
*
- * @param value Security restrictions for the iframe content.
+ * @param value Security restrictions for the iframe content. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Iframe sandbox(String value) {
@@ -542,6 +543,7 @@ public class Iframe extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link URL} or {@link String}.
+ * Can be <jk>null</jk>.
* @return This object.
*/
public Iframe src(Object value) {
@@ -560,7 +562,7 @@ public class Iframe extends HtmlElementMixed {
* <p>
* The content should be valid HTML that will be displayed in the iframe.
*
- * @param value The HTML content to display in the iframe.
+ * @param value The HTML content to display in the iframe. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Iframe srcdoc(String value) {
@@ -601,6 +603,7 @@ public class Iframe extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Iframe width(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Img.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Img.java
index a2b569a677..3524a0a7e5 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Img.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Img.java
@@ -86,7 +86,7 @@ public class Img extends HtmlElementVoid {
/**
* Creates an {@link Img} element with the specified {@link Img#src(Object)} attribute.
*
- * @param src The {@link Img#src(Object)} attribute.
+ * @param src The {@link Img#src(Object)} attribute. Can be <jk>null</jk>.
*/
public Img(Object src) {
src(src);
@@ -114,7 +114,7 @@ public class Img extends HtmlElementVoid {
* <p>
* The alt text should be descriptive and convey the same information as the image.
*
- * @param value Alternative text for the image.
+ * @param value Alternative text for the image. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Img alt(String value) {
@@ -154,7 +154,7 @@ public class Img extends HtmlElementVoid {
* <li><js>"use-credentials"</js> - Cross-origin requests include credentials</li>
* </ul>
*
- * @param value How to handle cross-origin requests.
+ * @param value How to handle cross-origin requests. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Img crossorigin(String value) {
@@ -178,6 +178,7 @@ public class Img extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Img height(Object value) {
@@ -214,6 +215,7 @@ public class Img extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Img ismap(Object value) {
@@ -549,6 +551,7 @@ public class Img extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link URL} or {@link String}.
+ * Can be <jk>null</jk>.
* @return This object.
*/
public Img src(Object value) {
@@ -591,7 +594,7 @@ public class Img extends HtmlElementVoid {
* <p>
* The value should start with "#" followed by the name of the map element.
*
- * @param value The name of the image map to use (e.g., "#mymap").
+ * @param value The name of the image map to use (e.g., "#mymap"). Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Img usemap(String value) {
@@ -608,6 +611,7 @@ public class Img extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Img width(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Input.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Input.java
index f96043bdc1..701e9bcf75 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Input.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Input.java
@@ -91,7 +91,7 @@ public class Input extends HtmlElementVoid {
/**
* Creates an {@link Input} element with the specified {@link Input#type(String)} attribute.
*
- * @param type The {@link Input#type(String)} attribute.
+ * @param type The {@link Input#type(String)} attribute. Can be <jk>null</jk>.
*/
public Input(String type) {
type(type);
@@ -117,7 +117,7 @@ public class Input extends HtmlElementVoid {
* <li><js>"image/png,image/jpeg"</js> - Accept specific MIME types</li>
* </ul>
*
- * @param value File type restrictions for file uploads.
+ * @param value File type restrictions for file uploads. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input accept(String value) {
@@ -138,7 +138,7 @@ public class Input extends HtmlElementVoid {
* Alternative text for image submit buttons. Used with <c>type="image"</c> to provide
* accessible text when the image cannot be displayed.
*
- * @param value Alternative text for image submit buttons.
+ * @param value Alternative text for image submit buttons. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input alt(String value) {
@@ -181,7 +181,7 @@ public class Input extends HtmlElementVoid {
* <li><js>"postal-code"</js> - Postal code</li>
* </ul>
*
- * @param value Autocomplete hint for the input field.
+ * @param value Autocomplete hint for the input field. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input autocomplete(String value) {
@@ -199,6 +199,7 @@ public class Input extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input autofocus(Object value) {
@@ -223,6 +224,7 @@ public class Input extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input checked(Object value) {
@@ -253,7 +255,7 @@ public class Input extends HtmlElementVoid {
* This is useful for forms that need to preserve text direction information when submitted.
* The hidden field will contain either "ltr" or "rtl" based on the input's direction.
*
- * @param value The name of the hidden field for directionality information.
+ * @param value The name of the hidden field for directionality information. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input dirname(String value) {
@@ -278,6 +280,7 @@ public class Input extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input disabled(Object value) {
@@ -295,7 +298,7 @@ public class Input extends HtmlElementVoid {
* <p>
* The value should match the ID of a form element in the same document.
*
- * @param value The ID of the form element to associate with this input.
+ * @param value The ID of the form element to associate with this input. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input form(String value) {
@@ -309,7 +312,7 @@ public class Input extends HtmlElementVoid {
* <p>
* URL to use for form submission.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* @return This object.
*/
public Input formaction(String value) {
@@ -323,7 +326,7 @@ public class Input extends HtmlElementVoid {
* <p>
* Form data set encoding type to use for form submission.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* @return This object.
*/
public Input formenctype(String value) {
@@ -337,7 +340,7 @@ public class Input extends HtmlElementVoid {
* <p>
* HTTP method to use for form submission.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* @return This object.
*/
public Input formmethod(String value) {
@@ -352,7 +355,7 @@ public class Input extends HtmlElementVoid {
* <p>
* Bypass form control validation for form submission.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* @return This object.
*/
public Input formnovalidate(String value) {
@@ -366,7 +369,7 @@ public class Input extends HtmlElementVoid {
* <p>
* Browsing context for form submission.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* @return This object.
*/
public Input formtarget(String value) {
@@ -384,6 +387,7 @@ public class Input extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input height(Object value) {
@@ -423,7 +427,7 @@ public class Input extends HtmlElementVoid {
* <li><js>"search"</js> - Keyboard optimized for search</li>
* </ul>
*
- * @param value The input modality hint for mobile keyboards.
+ * @param value The input modality hint for mobile keyboards. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input inputmode(String value) {
@@ -444,7 +448,7 @@ public class Input extends HtmlElementVoid {
* References a <c><datalist></c> element that provides predefined options
* for the input field. Creates a dropdown with autocomplete suggestions.
*
- * @param value The ID of a datalist element (without the # prefix).
+ * @param value The ID of a datalist element (without the # prefix). Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input list(String value) {
@@ -461,6 +465,7 @@ public class Input extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input max(Object value) {
@@ -472,7 +477,7 @@ public class Input extends HtmlElementVoid {
* <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-maxlength">maxlength</a> attribute.
* Maximum length of value.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* Typically a {@link Number} or {@link String}.
* @return This object.
*/
@@ -490,6 +495,7 @@ public class Input extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input min(Object value) {
@@ -506,6 +512,7 @@ public class Input extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input minlength(Object value) {
@@ -530,6 +537,7 @@ public class Input extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input multiple(Object value) {
@@ -543,7 +551,7 @@ public class Input extends HtmlElementVoid {
* <p>
* Name of form control to use for form submission and in the form.elements API.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* @return This object.
*/
public Input name(String value) {
@@ -858,7 +866,7 @@ public class Input extends HtmlElementVoid {
* Specifies a regular expression that the input's value must match for the form to be valid.
* Works with the <c>title</c> attribute to provide user feedback.
*
- * @param value A regular expression pattern (e.g., <js>"[0-9]{3}-[0-9]{3}-[0-9]{4}"</js> for phone numbers).
+ * @param value A regular expression pattern (e.g., <js>"[0-9]{3}-[0-9]{3}-[0-9]{4}"</js> for phone numbers). Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input pattern(String value) {
@@ -873,7 +881,7 @@ public class Input extends HtmlElementVoid {
* Provides a hint to the user about what to enter in the input field.
* The placeholder text appears when the field is empty and disappears when the user starts typing.
*
- * @param value Hint text to display in the empty input field.
+ * @param value Hint text to display in the empty input field. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input placeholder(String value) {
@@ -887,7 +895,7 @@ public class Input extends HtmlElementVoid {
* <p>
* Whether to allow the value to be edited by the user.
*
- * @param value If <jk>true</jk>, adds <c>readonly="readonly"</c>.
+ * @param value If <jk>true</jk>, adds <c>readonly="readonly"</c>. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input readonly(boolean value) {
@@ -903,7 +911,7 @@ public class Input extends HtmlElementVoid {
* Makes the input field read-only, preventing user modification while still allowing
* the value to be submitted with the form.
*
- * @param value If <jk>true</jk>, makes the input read-only.
+ * @param value If <jk>true</jk>, makes the input read-only. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input readonly(Object value) {
@@ -918,7 +926,7 @@ public class Input extends HtmlElementVoid {
* Indicates that the input field must be filled out before the form can be submitted.
* Browsers will show validation messages for empty required fields.
*
- * @param value If <jk>true</jk>, makes the input required for form submission.
+ * @param value If <jk>true</jk>, makes the input required for form submission. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input required(Object value) {
@@ -935,6 +943,7 @@ public class Input extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input size(Object value) {
@@ -957,6 +966,7 @@ public class Input extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link URL} or {@link String}.
+ * Can be <jk>null</jk>.
* @return This object.
*/
public Input src(Object value) {
@@ -970,7 +980,7 @@ public class Input extends HtmlElementVoid {
* <p>
* Granularity to be matched by the form control's value.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* @return This object.
*/
public Input step(String value) {
@@ -1030,7 +1040,7 @@ public class Input extends HtmlElementVoid {
* <li><js>"hidden"</js> - Hidden input field</li>
* </ul>
*
- * @param value The input type for the form control.
+ * @param value The input type for the form control. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input type(String value) {
@@ -1047,6 +1057,7 @@ public class Input extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input value(Object value) {
@@ -1063,6 +1074,7 @@ public class Input extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Input width(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ins.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ins.java
index e514504faa..26331879a2 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ins.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ins.java
@@ -98,7 +98,7 @@ public class Ins extends HtmlElementMixed {
/**
* Creates an {@link Ins} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Ins(Object...children) {
children(children);
@@ -146,7 +146,7 @@ public class Ins extends HtmlElementMixed {
* <p>
* Link to the source of the quotation or more information about the edit.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* @return This object.
*/
public Ins cite(String value) {
@@ -166,7 +166,7 @@ public class Ins extends HtmlElementMixed {
* <p>
* Date and (optionally) time of the change.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* @return This object.
*/
public Ins datetime(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Keygen.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Keygen.java
index 8534571f1f..7b1d043d0f 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Keygen.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Keygen.java
@@ -110,6 +110,7 @@ public class Keygen extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Keygen autofocus(Object value) {
@@ -127,7 +128,7 @@ public class Keygen extends HtmlElementVoid {
* <p>
* The challenge string is typically provided by the server and used to verify the key generation.
*
- * @param value The challenge string to package with the generated key.
+ * @param value The challenge string to package with the generated key. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Keygen challenge(String value) {
@@ -164,6 +165,7 @@ public class Keygen extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Keygen disabled(Object value) {
@@ -181,7 +183,7 @@ public class Keygen extends HtmlElementVoid {
* <p>
* The value should match the ID of a form element in the same document.
*
- * @param value The ID of the form element to associate with this keygen.
+ * @param value The ID of the form element to associate with this keygen. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Keygen form(String value) {
@@ -215,7 +217,7 @@ public class Keygen extends HtmlElementVoid {
* <li><js>"EC"</js> - Elliptic curve key pair</li>
* </ul>
*
- * @param value The type of cryptographic key to generate.
+ * @param value The type of cryptographic key to generate. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Keygen keytype(String value) {
@@ -239,7 +241,7 @@ public class Keygen extends HtmlElementVoid {
* <p>
* The name should be unique within the form and should not contain spaces or special characters.
*
- * @param value The name of the keygen element for submission and API access.
+ * @param value The name of the keygen element for submission and API access. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Keygen name(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Label.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Label.java
index fdb641cb8d..63cb9327fb 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Label.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Label.java
@@ -67,7 +67,7 @@ public class Label extends HtmlElementMixed {
/**
* Creates a {@link Label} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Label(Object...children) {
children(children);
@@ -89,7 +89,7 @@ public class Label extends HtmlElementMixed {
* <p>
* The value should match the ID of a form control element in the same document.
*
- * @param value The ID of the form control to associate with this label.
+ * @param value The ID of the form control to associate with this label. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
@SuppressWarnings({
@@ -152,7 +152,7 @@ public class Label extends HtmlElementMixed {
* <p>
* The value should match the ID of a form element in the same document.
*
- * @param value The ID of the form element to associate with this label.
+ * @param value The ID of the form element to associate with this label. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Label form(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Legend.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Legend.java
index b5aff12fd7..e46f56cc9c 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Legend.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Legend.java
@@ -97,7 +97,7 @@ public class Legend extends HtmlElementMixed {
/**
* Creates a {@link Legend} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Legend(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Li.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Li.java
index 969f8defe9..2f79135a52 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Li.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Li.java
@@ -98,7 +98,7 @@ public class Li extends HtmlElementMixed {
/**
* Creates an {@link Li} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Li(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Link.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Link.java
index ac2b4e221f..b7af5a4996 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Link.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Link.java
@@ -99,7 +99,7 @@ public class Link extends HtmlElementVoid {
/**
* Creates a {@link Link} element with the specified {@link Link#href(Object)} attribute.
*
- * @param href The {@link Link#href(Object)} attribute.
+ * @param href The {@link Link#href(Object)} attribute. Can be <jk>null</jk>.
*/
public Link(Object href) {
href(href);
@@ -132,7 +132,7 @@ public class Link extends HtmlElementVoid {
* <li><js>"worker"</js> - Web worker script</li>
* </ul>
*
- * @param value The type of content being loaded.
+ * @param value The type of content being loaded. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
@SuppressWarnings({
@@ -181,7 +181,7 @@ public class Link extends HtmlElementVoid {
* <li><js>"use-credentials"</js> - Cross-origin requests include credentials</li>
* </ul>
*
- * @param value How to handle cross-origin requests.
+ * @param value How to handle cross-origin requests. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Link crossorigin(String value) {
@@ -217,6 +217,7 @@ public class Link extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link URL} or {@link String}.
+ * Can be <jk>null</jk>.
* @return This object.
*/
public Link href(Object value) {
@@ -242,7 +243,7 @@ public class Link extends HtmlElementVoid {
* <li><js>"ja"</js> - Japanese</li>
* </ul>
*
- * @param value The language code of the linked resource.
+ * @param value The language code of the linked resource. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Link hreflang(String value) {
@@ -279,7 +280,7 @@ public class Link extends HtmlElementVoid {
* <li><js>"(max-width: 768px)"</js> - Media queries</li>
* </ul>
*
- * @param value The media types the linked resource applies to.
+ * @param value The media types the linked resource applies to. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Link media(String value) {
@@ -607,7 +608,7 @@ public class Link extends HtmlElementVoid {
* <li><js>"prev"</js> - Previous page in a sequence</li>
* </ul>
*
- * @param value The relationship between the document and linked resource.
+ * @param value The relationship between the document and linked resource. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Link rel(String value) {
@@ -632,7 +633,7 @@ public class Link extends HtmlElementVoid {
* <li><js>"any"</js> - Any size</li>
* </ul>
*
- * @param value The sizes of the linked icon resource.
+ * @param value The sizes of the linked icon resource. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Link sizes(String value) {
@@ -688,7 +689,7 @@ public class Link extends HtmlElementVoid {
* <li><js>"font/woff2"</js> - Web font</li>
* </ul>
*
- * @param value The MIME type of the linked resource.
+ * @param value The MIME type of the linked resource. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Link type(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Map.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Map.java
index 646f720596..6569008ee9 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Map.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Map.java
@@ -71,7 +71,7 @@ public class Map extends HtmlElementContainer {
/**
* Creates a {@link Map} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Map(Object...children) {
children(children);
@@ -153,7 +153,7 @@ public class Map extends HtmlElementContainer {
* <p>
* The name should be unique within the document and should not contain spaces or special characters.
*
- * @param value The name of the image map for referencing from img elements.
+ * @param value The name of the image map for referencing from img elements. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Map name(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Mark.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Mark.java
index cbfa8c44ff..1316b2e62d 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Mark.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Mark.java
@@ -87,7 +87,7 @@ public class Mark extends HtmlElementMixed {
/**
* Creates a {@link Mark} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Mark(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Meta.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Meta.java
index c3e70626b9..e2c536032d 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Meta.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Meta.java
@@ -114,7 +114,7 @@ public class Meta extends HtmlElementVoid {
* <li><js>"windows-1252"</js> - Windows-1252 encoding</li>
* </ul>
*
- * @param value The character encoding for the document.
+ * @param value The character encoding for the document. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Meta charset(String value) {
@@ -130,7 +130,7 @@ public class Meta extends HtmlElementVoid {
* Specifies the value associated with the name or http-equiv attribute.
* The content varies depending on the type of metadata being defined.
*
- * @param value The metadata value (e.g., description text, viewport settings, etc.).
+ * @param value The metadata value (e.g., description text, viewport settings, etc.). Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Meta content(String value) {
@@ -175,7 +175,7 @@ public class Meta extends HtmlElementVoid {
* <li><js>"x-ua-compatible"</js> - Browser compatibility mode</li>
* </ul>
*
- * @param value The HTTP header name to simulate.
+ * @param value The HTTP header name to simulate. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Meta httpequiv(String value) {
@@ -211,7 +211,7 @@ public class Meta extends HtmlElementVoid {
* <li><js>"robots"</js> - Instructions for search engine crawlers</li>
* </ul>
*
- * @param value The name of the metadata property.
+ * @param value The name of the metadata property. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Meta name(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Meter.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Meter.java
index 387c9e9a45..3b9fa67733 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Meter.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Meter.java
@@ -102,7 +102,7 @@ public class Meter extends HtmlElementMixed {
/**
* Creates a {@link Meter} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Meter(Object...children) {
children(children);
@@ -171,6 +171,7 @@ public class Meter extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Meter high(Object value) {
@@ -199,6 +200,7 @@ public class Meter extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Meter low(Object value) {
@@ -215,6 +217,7 @@ public class Meter extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Meter max(Object value) {
@@ -231,6 +234,7 @@ public class Meter extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Meter min(Object value) {
@@ -547,6 +551,7 @@ public class Meter extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Meter optimum(Object value) {
@@ -593,6 +598,7 @@ public class Meter extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Meter value(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Noscript.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Noscript.java
index 5e19dbea65..ed8d35fc23 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Noscript.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Noscript.java
@@ -88,7 +88,7 @@ public class Noscript extends HtmlElementMixed {
/**
* Creates a {@link Noscript} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Noscript(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Object_.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Object_.java
index 0082775775..2924ab9327 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Object_.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Object_.java
@@ -111,7 +111,7 @@ public class Object_ extends HtmlElementMixed {
/**
* Creates an {@link Object_} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Object_(Object...children) {
children(children);
@@ -173,7 +173,7 @@ public class Object_ extends HtmlElementMixed {
* <p>
* URIs defined by {@link UriResolver} can be used for values.
*
- * @param value The URL of the resource to be embedded.
+ * @param value The URL of the resource to be embedded. Can be <jk>null</jk>.
* @return This object.
*/
public Object_ data(String value) {
@@ -193,7 +193,7 @@ public class Object_ extends HtmlElementMixed {
* <p>
* Associates the control with a form element.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* @return This object.
*/
public Object_ form(String value) {
@@ -211,6 +211,7 @@ public class Object_ extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Object_ height(Object value) {
@@ -242,7 +243,7 @@ public class Object_ extends HtmlElementMixed {
* <p>
* Name of nested browsing context.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* @return This object.
*/
public Object_ name(String value) {
@@ -586,7 +587,7 @@ public class Object_ extends HtmlElementMixed {
* <p>
* Type of embedded resource.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* @return This object.
*/
public Object_ type(String value) {
@@ -604,6 +605,7 @@ public class Object_ extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Object_ typemustmatch(Object value) {
@@ -618,7 +620,7 @@ public class Object_ extends HtmlElementMixed {
* <p>
* Name of image map to use.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* @return This object.
*/
public Object_ usemap(String value) {
@@ -635,6 +637,7 @@ public class Object_ extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Object_ width(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ol.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ol.java
index 928e66d363..d7d26dc953 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ol.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ol.java
@@ -93,7 +93,7 @@ public class Ol extends HtmlElementContainer {
/**
* Creates an {@link Ol} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Ol(Object...children) {
children(children);
@@ -483,6 +483,7 @@ public class Ol extends HtmlElementContainer {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Ol reversed(Object value) {
@@ -511,6 +512,7 @@ public class Ol extends HtmlElementContainer {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Ol start(Object value) {
@@ -558,7 +560,7 @@ public class Ol extends HtmlElementContainer {
* <li><js>"I"</js> - Uppercase Roman numerals (I, II, III, ...)</li>
* </ul>
*
- * @param value The type of numbering for the ordered list.
+ * @param value The type of numbering for the ordered list. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Ol type(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Optgroup.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Optgroup.java
index 7a17d24419..4ae727a21d 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Optgroup.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Optgroup.java
@@ -85,7 +85,7 @@ public class Optgroup extends HtmlElementContainer {
/**
* Creates an {@link Optgroup} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Optgroup(Object...children) {
children(children);
@@ -156,6 +156,7 @@ public class Optgroup extends HtmlElementContainer {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Optgroup disabled(Object value) {
@@ -185,7 +186,7 @@ public class Optgroup extends HtmlElementContainer {
* <p>
* The label should be descriptive and help users understand the grouping of options.
*
- * @param value The user-visible label for the option group.
+ * @param value The user-visible label for the option group. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Optgroup label(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Option.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Option.java
index 776a2fdf04..0c6c305873 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Option.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Option.java
@@ -80,7 +80,7 @@ public class Option extends HtmlElementText {
/**
* Creates an {@link Option} element with the specified {@link Option#text(Object)} attribute.
*
- * @param text The {@link Option#text(Object)} attribute.
+ * @param text The {@link Option#text(Object)} attribute. Can be <jk>null</jk>.
*/
public Option(Object text) {
text(text);
@@ -90,8 +90,8 @@ public class Option extends HtmlElementText {
* Creates an {@link Option} element with the specified {@link Option#value(Object)} attribute and
* {@link Option#text(Object)} node.
*
- * @param value The {@link Option#value(Object)} attribute.
- * @param text The {@link Option#text(Object)} node.
+ * @param value The {@link Option#value(Object)} attribute. Can be <jk>null</jk>.
+ * @param text The {@link Option#text(Object)} node. Can be <jk>null</jk>.
*/
public Option(Object value, Object text) {
value(value).text(text);
@@ -150,6 +150,7 @@ public class Option extends HtmlElementText {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Option disabled(Object value) {
@@ -179,7 +180,7 @@ public class Option extends HtmlElementText {
* <p>
* The label should be user-friendly and descriptive of what the option represents.
*
- * @param value The user-visible label for the option.
+ * @param value The user-visible label for the option. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Option label(String value) {
@@ -510,6 +511,7 @@ public class Option extends HtmlElementText {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Option selected(Object value) {
@@ -562,6 +564,7 @@ public class Option extends HtmlElementText {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Option value(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Output.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Output.java
index de6badbd1e..21c311ec07 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Output.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Output.java
@@ -82,7 +82,7 @@ public class Output extends HtmlElementMixed {
/**
* Creates an {@link Output} element with the specified {@link Output#name(String)} attribute.
*
- * @param name The {@link Output#name(String)} attribute.
+ * @param name The {@link Output#name(String)} attribute. Can be <jk>null</jk>.
*/
public Output(String name) {
name(name);
@@ -104,7 +104,7 @@ public class Output extends HtmlElementMixed {
* <p>
* Multiple IDs can be specified as a space-separated list.
*
- * @param value The IDs of the form controls that contribute to this output.
+ * @param value The IDs of the form controls that contribute to this output. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
@SuppressWarnings({
@@ -167,7 +167,7 @@ public class Output extends HtmlElementMixed {
* <p>
* The value should match the ID of a form element in the same document.
*
- * @param value The ID of the form element to associate with this output.
+ * @param value The ID of the form element to associate with this output. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Output form(String value) {
@@ -203,7 +203,7 @@ public class Output extends HtmlElementMixed {
* <p>
* The name should be unique within the form and should not contain spaces or special characters.
*
- * @param value The name of the output element for submission and API access.
+ * @param value The name of the output element for submission and API access. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Output name(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Param.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Param.java
index 7ac585abaa..9952b4542d 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Param.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Param.java
@@ -81,8 +81,8 @@ public class Param extends HtmlElementVoid {
* Creates a {@link Param} element with the specified {@link Param#name(String)} and {@link Param#value(Object)}
* attributes.
*
- * @param name The {@link Param#name(String)} attribute.
- * @param value The {@link Param#value(Object)} attribute.
+ * @param name The {@link Param#name(String)} attribute. Can be <jk>null</jk>.
+ * @param value The {@link Param#value(Object)} attribute. Can be <jk>null</jk>.
*/
public Param(String name, Object value) {
name(name).value(value);
@@ -153,7 +153,7 @@ public class Param extends HtmlElementVoid {
* The name should be meaningful and correspond to the expected parameter name
* for the embedded content.
*
- * @param value The name of the parameter.
+ * @param value The name of the parameter. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Param name(String value) {
@@ -501,6 +501,7 @@ public class Param extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Param value(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Pre.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Pre.java
index 449be235d4..84435ed44b 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Pre.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Pre.java
@@ -112,7 +112,7 @@ public class Pre extends HtmlElementMixed {
/**
* Creates a {@link Pre} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Pre(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Progress.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Progress.java
index b7f48e4d47..0df899a3cb 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Progress.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Progress.java
@@ -94,7 +94,7 @@ public class Progress extends HtmlElementMixed {
/**
* Creates a {@link Progress} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Progress(Object...children) {
children(children);
@@ -175,6 +175,7 @@ public class Progress extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Progress max(Object value) {
@@ -521,6 +522,7 @@ public class Progress extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Progress value(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Q.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Q.java
index f37a9fa7d4..3f575545d4 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Q.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Q.java
@@ -77,7 +77,7 @@ public class Q extends HtmlElementMixed {
/**
* Creates a {@link Q} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Q(Object...children) {
children(children);
@@ -129,7 +129,7 @@ public class Q extends HtmlElementMixed {
* <p>
* The URL should point to the original source of the quoted material.
*
- * @param value The URL of the source document for the quotation.
+ * @param value The URL of the source document for the quotation. Can be <jk>null</jk>.
* @return This object.
*/
public Q cite(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rb.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rb.java
index c4208dc108..905aaaeb83 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rb.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rb.java
@@ -87,7 +87,7 @@ public class Rb extends HtmlElementMixed {
/**
* Creates a {@link Rb} element with the specified {@link Rb#children(Object[])} nodes.
*
- * @param children The {@link Rb#children(Object[])} nodes.
+ * @param children The {@link Rb#children(Object[])} nodes. Must not be <jk>null</jk>.
*/
public Rb(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rp.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rp.java
index 213fd924c2..c293483c18 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rp.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rp.java
@@ -86,7 +86,7 @@ public class Rp extends HtmlElementMixed {
/**
* Creates a {@link Rp} element with the specified {@link Rp#children(Object[])} nodes.
*
- * @param children The {@link Rp#children(Object[])} nodes.
+ * @param children The {@link Rp#children(Object[])} nodes. Must not be <jk>null</jk>.
*/
public Rp(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rt.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rt.java
index 57c5bed536..b3559eb442 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rt.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rt.java
@@ -87,7 +87,7 @@ public class Rt extends HtmlElementMixed {
/**
* Creates a {@link Rt} element with the specified {@link Rt#children(Object[])} nodes.
*
- * @param children The {@link Rt#children(Object[])} nodes.
+ * @param children The {@link Rt#children(Object[])} nodes. Must not be <jk>null</jk>.
*/
public Rt(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rtc.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rtc.java
index 0affa2a02b..6b81f37568 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rtc.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rtc.java
@@ -102,7 +102,7 @@ public class Rtc extends HtmlElementMixed {
/**
* Creates an {@link Rtc} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Rtc(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ruby.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ruby.java
index 426f51d3d5..a6080858f8 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ruby.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ruby.java
@@ -102,7 +102,7 @@ public class Ruby extends HtmlElementMixed {
/**
* Creates a {@link Ruby} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Ruby(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/S.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/S.java
index 115890bfa5..66418d1cb7 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/S.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/S.java
@@ -88,7 +88,7 @@ public class S extends HtmlElementMixed {
/**
* Creates an {@link S} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public S(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Samp.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Samp.java
index f218a8a3b7..0f1fc3f7fa 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Samp.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Samp.java
@@ -89,7 +89,7 @@ public class Samp extends HtmlElementMixed {
/**
* Creates a {@link Samp} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Samp(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Script.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Script.java
index 0ca37289f8..102b48bcf6 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Script.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Script.java
@@ -89,8 +89,8 @@ public class Script extends HtmlElementRawText {
* Creates a {@link Script} element with the specified {@link Script#type(String)} attribute and
* {@link Script#text(Object)} node.
*
- * @param type The {@link Script#type(String)} attribute.
- * @param text The child text node.
+ * @param type The {@link Script#type(String)} attribute. Can be <jk>null</jk>.
+ * @param text The child text node. Can be <jk>null</jk>.
*/
public Script(String type, String...text) {
type(type).text(joinnl(text));
@@ -125,6 +125,7 @@ public class Script extends HtmlElementRawText {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Script async(Object value) {
@@ -159,7 +160,7 @@ public class Script extends HtmlElementRawText {
* <li><js>"windows-1252"</js> - Windows-1252 encoding</li>
* </ul>
*
- * @param value The character encoding of the external script resource.
+ * @param value The character encoding of the external script resource. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Script charset(String value) {
@@ -180,7 +181,7 @@ public class Script extends HtmlElementRawText {
* <p>
* How the element handles cross-origin requests.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* @return This object.
*/
public Script crossorigin(String value) {
@@ -205,6 +206,7 @@ public class Script extends HtmlElementRawText {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Script defer(Object value) {
@@ -558,6 +560,7 @@ public class Script extends HtmlElementRawText {
* @param value
* The new value for this attribute.
* Typically a {@link URL} or {@link String}.
+ * Can be <jk>null</jk>.
* @return This object.
*/
public Script src(Object value) {
@@ -601,7 +604,7 @@ public class Script extends HtmlElementRawText {
* <p>
* Type of embedded resource.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* @return This object.
*/
public Script type(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Select.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Select.java
index 11320919ed..bf49edb07f 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Select.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Select.java
@@ -96,8 +96,8 @@ public class Select extends HtmlElementContainer {
/**
* Creates a {@link Select} element with the specified {@link Select#name(String)} attribute and child nodes.
*
- * @param name The {@link Select#name(String)} attribute.
- * @param children The child nodes.
+ * @param name The {@link Select#name(String)} attribute. Can be <jk>null</jk>.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Select(String name, Object...children) {
name(name).children(children);
@@ -136,6 +136,7 @@ public class Select extends HtmlElementContainer {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Select autofocus(Object value) {
@@ -158,7 +159,7 @@ public class Select extends HtmlElementContainer {
/**
* Convenience method for selecting a child {@link Option} after the options have already been populated.
*
- * @param optionValue The option value.
+ * @param optionValue The option value. Can be <jk>null</jk>.
* @return This object.
*/
public Select choose(Object optionValue) {
@@ -200,6 +201,7 @@ public class Select extends HtmlElementContainer {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Select disabled(Object value) {
@@ -217,7 +219,7 @@ public class Select extends HtmlElementContainer {
* <p>
* The value should match the ID of a form element in the same document.
*
- * @param value The ID of the form element to associate with this select.
+ * @param value The ID of the form element to associate with this select. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Select form(String value) {
@@ -260,6 +262,7 @@ public class Select extends HtmlElementContainer {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Select multiple(Object value) {
@@ -277,7 +280,7 @@ public class Select extends HtmlElementContainer {
* <p>
* The name should be unique within the form and should not contain spaces or special characters.
*
- * @param value The name of the select element for submission and API access.
+ * @param value The name of the select element for submission and API access. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Select name(String value) {
@@ -594,6 +597,7 @@ public class Select extends HtmlElementContainer {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Select required(Object value) {
@@ -614,7 +618,7 @@ public class Select extends HtmlElementContainer {
* Specifies the number of visible options in a select element. If greater than 1,
* the select becomes a scrollable list instead of a dropdown.
*
- * @param value The number of visible options (1 for dropdown, >1 for list).
+ * @param value The number of visible options (1 for dropdown, >1 for list). Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Select size(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Small.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Small.java
index deef4f2aa8..36bced748c 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Small.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Small.java
@@ -65,7 +65,7 @@ public class Small extends HtmlElementMixed {
/**
* Creates a {@link Small} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Small(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Source.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Source.java
index 01299564e6..f5962e851e 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Source.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Source.java
@@ -91,8 +91,8 @@ public class Source extends HtmlElementVoid {
* Creates a {@link Source} element with the specified {@link Source#src(Object)} and {@link Source#type(String)}
* attributes.
*
- * @param src The {@link Source#src(Object)} attribute.
- * @param type The {@link Source#type(String)} attribute.
+ * @param src The {@link Source#src(Object)} attribute. Can be <jk>null</jk>.
+ * @param type The {@link Source#type(String)} attribute. Can be <jk>null</jk>.
*/
public Source(Object src, String type) {
src(src).type(type);
@@ -474,6 +474,7 @@ public class Source extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link URL} or {@link String}.
+ * Can be <jk>null</jk>.
* @return This object.
*/
public Source src(Object value) {
@@ -522,7 +523,7 @@ public class Source extends HtmlElementVoid {
* <li><js>"audio/wav"</js> - WAV audio</li>
* </ul>
*
- * @param value The MIME type of the media resource.
+ * @param value The MIME type of the media resource. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Source type(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Span.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Span.java
index 041e949e56..14f71ab9b2 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Span.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Span.java
@@ -75,7 +75,7 @@ public class Span extends HtmlElementMixed {
/**
* Creates a {@link Span} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Span(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Strong.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Strong.java
index 7452124b69..4ba292a383 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Strong.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Strong.java
@@ -64,7 +64,7 @@ public class Strong extends HtmlElementMixed {
/**
* Creates a {@link Strong} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Strong(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Style.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Style.java
index 32c8b5daf4..e8f93e30bc 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Style.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Style.java
@@ -88,7 +88,7 @@ public class Style extends HtmlElementRawText {
/**
* Creates a {@link Style} element with the specified {@link Style#text(Object)} node.
*
- * @param text The {@link Style#text(Object)} node.
+ * @param text The {@link Style#text(Object)} node. Can be <jk>null</jk>.
*/
public Style(Object text) {
text(text);
@@ -177,7 +177,7 @@ public class Style extends HtmlElementRawText {
* <li><js>"tv"</js> - Television</li>
* </ul>
*
- * @param value The media types for which the stylesheet applies.
+ * @param value The media types for which the stylesheet applies. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Style media(String value) {
@@ -527,7 +527,7 @@ public class Style extends HtmlElementRawText {
* <p>
* Type of embedded resource.
*
- * @param value The new value for this attribute.
+ * @param value The new value for this attribute. Can be <jk>null</jk>.
* @return This object.
*/
public Style type(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Sub.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Sub.java
index e48461605c..e3ec8ceffa 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Sub.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Sub.java
@@ -71,7 +71,7 @@ public class Sub extends HtmlElementMixed {
/**
* Creates a {@link Sub} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Sub(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Sup.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Sup.java
index 42dad161b9..afd49717e8 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Sup.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Sup.java
@@ -71,7 +71,7 @@ public class Sup extends HtmlElementMixed {
/**
* Creates a {@link Sup} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Sup(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Table.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Table.java
index dd5756f23a..4938f653f6 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Table.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Table.java
@@ -113,7 +113,7 @@ public class Table extends HtmlElementContainer {
/**
* Creates a {@link Table} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Table(Object...children) {
children(children);
@@ -149,6 +149,7 @@ public class Table extends HtmlElementContainer {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Table border(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tbody.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tbody.java
index 3ca46a236f..8aa0c4cb29 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tbody.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tbody.java
@@ -98,7 +98,7 @@ public class Tbody extends HtmlElementContainer {
/**
* Creates a {@link Tbody} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Tbody(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Td.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Td.java
index a8c8e38054..31512c82f6 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Td.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Td.java
@@ -74,7 +74,7 @@ public class Td extends HtmlElementMixed {
/**
* Creates a {@link Td} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Td(Object...children) {
children(children);
@@ -125,6 +125,7 @@ public class Td extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Td colspan(Object value) {
@@ -154,7 +155,7 @@ public class Td extends HtmlElementMixed {
* <p>
* Multiple IDs can be specified as a space-separated list.
*
- * @param value The IDs of header cells that apply to this cell.
+ * @param value The IDs of header cells that apply to this cell. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Td headers(String value) {
@@ -489,6 +490,7 @@ public class Td extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Td rowspan(Object value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Template.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Template.java
index 8e03b3c099..661c1acac6 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Template.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Template.java
@@ -132,8 +132,8 @@ public class Template extends HtmlElementMixed {
/**
* Creates a {@link Template} element with the specified {@link Template#id(String)} attribute and child nodes.
*
- * @param id The {@link Template#id(String)} attribute.
- * @param children The child nodes.
+ * @param id The {@link Template#id(String)} attribute. Can be <jk>null</jk>.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Template(String id, Object...children) {
id(id).children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Textarea.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Textarea.java
index ccc08107a4..1f93a40f7a 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Textarea.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Textarea.java
@@ -95,8 +95,8 @@ public class Textarea extends HtmlElementRawText {
* Creates a {@link Textarea} element with the specified {@link Textarea#name(String)} attribute and
* {@link Textarea#text(Object)} node.
*
- * @param name The {@link Textarea#name(String)} attribute.
- * @param text The {@link Textarea#text(Object)} node.
+ * @param name The {@link Textarea#name(String)} attribute. Can be <jk>null</jk>.
+ * @param text The {@link Textarea#text(Object)} node. Can be <jk>null</jk>.
*/
public Textarea(String name, String text) {
name(name).text(text);
@@ -144,7 +144,7 @@ public class Textarea extends HtmlElementRawText {
* <li><js>"new-password"</js> - Autocomplete for new password</li>
* </ul>
*
- * @param value Autocomplete behavior for the form field.
+ * @param value Autocomplete behavior for the form field. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Textarea autocomplete(String value) {
@@ -161,6 +161,7 @@ public class Textarea extends HtmlElementRawText {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Textarea autofocus(Object value) {
@@ -175,7 +176,7 @@ public class Textarea extends HtmlElementRawText {
* Specifies the visible width of the textarea in characters. This is a hint for the browser
* and may not be exactly followed depending on the font and styling.
*
- * @param value The visible width of the textarea in characters.
+ * @param value The visible width of the textarea in characters. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Textarea cols(Object value) {
@@ -206,7 +207,7 @@ public class Textarea extends HtmlElementRawText {
* This is useful for forms that need to preserve text direction information when submitted.
* The hidden field will contain either "ltr" or "rtl" based on the textarea's direction.
*
- * @param value The name of the hidden field for directionality information.
+ * @param value The name of the hidden field for directionality information. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Textarea dirname(String value) {
@@ -231,6 +232,7 @@ public class Textarea extends HtmlElementRawText {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Textarea disabled(Object value) {
@@ -248,7 +250,7 @@ public class Textarea extends HtmlElementRawText {
* <p>
* The value should match the ID of a form element in the same document.
*
- * @param value The ID of the form element to associate with this textarea.
+ * @param value The ID of the form element to associate with this textarea. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Textarea form(String value) {
@@ -287,7 +289,7 @@ public class Textarea extends HtmlElementRawText {
* <li><js>"search"</js> - Search keyboard</li>
* </ul>
*
- * @param value The type of virtual keyboard to display.
+ * @param value The type of virtual keyboard to display. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Textarea inputmode(String value) {
@@ -310,6 +312,7 @@ public class Textarea extends HtmlElementRawText {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Textarea maxlength(Object value) {
@@ -326,6 +329,7 @@ public class Textarea extends HtmlElementRawText {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Textarea minlength(Object value) {
@@ -343,7 +347,7 @@ public class Textarea extends HtmlElementRawText {
* <p>
* The name should be unique within the form and should not contain spaces or special characters.
*
- * @param value The name of the form control for submission and API access.
+ * @param value The name of the form control for submission and API access. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Textarea name(String value) {
@@ -662,7 +666,7 @@ public class Textarea extends HtmlElementRawText {
* <p>
* The placeholder should be a brief, helpful description of the expected input.
*
- * @param value The placeholder text to display when the textarea is empty.
+ * @param value The placeholder text to display when the textarea is empty. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Textarea placeholder(String value) {
@@ -679,6 +683,7 @@ public class Textarea extends HtmlElementRawText {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Textarea readonly(Object value) {
@@ -695,6 +700,7 @@ public class Textarea extends HtmlElementRawText {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Textarea required(Object value) {
@@ -709,7 +715,7 @@ public class Textarea extends HtmlElementRawText {
* Specifies the visible height of the textarea in lines. This is a hint for the browser
* and may not be exactly followed depending on the font and styling.
*
- * @param value The visible height of the textarea in lines.
+ * @param value The visible height of the textarea in lines. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Textarea rows(Number value) {
@@ -767,7 +773,7 @@ public class Textarea extends HtmlElementRawText {
* <li><js>"off"</js> - Text is not wrapped</li>
* </ul>
*
- * @param value How the text should be wrapped for form submission.
+ * @param value How the text should be wrapped for form submission. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Textarea wrap(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tfoot.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tfoot.java
index bbdb53a24a..d4b279f56d 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tfoot.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tfoot.java
@@ -94,7 +94,7 @@ public class Tfoot extends HtmlElementContainer {
/**
* Creates a {@link Tfoot} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Tfoot(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Th.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Th.java
index 041b18ca2a..cb984f5372 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Th.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Th.java
@@ -79,7 +79,7 @@ public class Th extends HtmlElementMixed {
/**
* Creates a {@link Th} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Th(Object...children) {
children(children);
@@ -101,7 +101,7 @@ public class Th extends HtmlElementMixed {
* <p>
* The abbreviation should be shorter than the full header text but still meaningful.
*
- * @param value The abbreviated label for the header cell.
+ * @param value The abbreviated label for the header cell. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Th abbr(String value) {
@@ -148,6 +148,7 @@ public class Th extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Th colspan(Object value) {
@@ -177,7 +178,7 @@ public class Th extends HtmlElementMixed {
* <p>
* Multiple IDs can be specified as a space-separated list.
*
- * @param value The IDs of header cells that apply to this cell.
+ * @param value The IDs of header cells that apply to this cell. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Th headers(String value) {
@@ -512,6 +513,7 @@ public class Th extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Th rowspan(Object value) {
@@ -535,7 +537,7 @@ public class Th extends HtmlElementMixed {
* <li><js>"colgroup"</js> - Header applies to all cells in the same column group</li>
* </ul>
*
- * @param value Which cells the header cell applies to.
+ * @param value Which cells the header cell applies to. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Th scope(String value) {
@@ -559,7 +561,7 @@ public class Th extends HtmlElementMixed {
* <li><js>"desc 1"</js> - Column is the primary sort key in descending order</li>
* </ul>
*
- * @param value The sort direction and ordinality of the column.
+ * @param value The sort direction and ordinality of the column. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Th sorted(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Thead.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Thead.java
index 0e9f5f4cf8..e62dd1efb8 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Thead.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Thead.java
@@ -105,7 +105,7 @@ public class Thead extends HtmlElementContainer {
/**
* Creates a {@link Thead} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Thead(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Time.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Time.java
index f24e1d2f96..e5b6f018d1 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Time.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Time.java
@@ -84,7 +84,7 @@ public class Time extends HtmlElementMixed {
/**
* Creates a {@link Time} element with the specified {@link Time#children(Object[])} nodes.
*
- * @param children The {@link Time#children(Object[])} nodes.
+ * @param children The {@link Time#children(Object[])} nodes. Must not be <jk>null</jk>.
*/
public Time(Object...children) {
children(children);
@@ -143,7 +143,7 @@ public class Time extends HtmlElementMixed {
* <p>
* The value should be a valid date-time string in ISO 8601 format.
*
- * @param value The machine-readable date and time value.
+ * @param value The machine-readable date and time value. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Time datetime(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Title.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Title.java
index f0f79a8681..3d6d21b4a3 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Title.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Title.java
@@ -67,7 +67,7 @@ public class Title extends HtmlElementRawText {
/**
* Creates a {@link Title} element with the specified {@link Title#text(Object)} node.
*
- * @param text The {@link Title#text(Object)} node.
+ * @param text The {@link Title#text(Object)} node. Can be <jk>null</jk>.
*/
public Title(String text) {
text(text);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tr.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tr.java
index b5c5507706..6b49be21a5 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tr.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tr.java
@@ -102,7 +102,7 @@ public class Tr extends HtmlElementContainer {
/**
* Creates a {@link Tr} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Tr(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Track.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Track.java
index 2747b1ecd7..239e312ce8 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Track.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Track.java
@@ -97,8 +97,8 @@ public class Track extends HtmlElementVoid {
* Creates a {@link Track} element with the specified {@link Track#src(Object)} and {@link Track#kind(String)}
* attributes.
*
- * @param src The {@link Track#src(Object)} attribute.
- * @param kind The {@link Track#kind(String)} attribute.
+ * @param src The {@link Track#src(Object)} attribute. Can be <jk>null</jk>.
+ * @param kind The {@link Track#kind(String)} attribute. Can be <jk>null</jk>.
*/
public Track(Object src, String kind) {
src(src).kind(kind);
@@ -126,7 +126,7 @@ public class Track extends HtmlElementVoid {
* <li>Other values - Passed through as-is</li>
* </ul>
*
- * @param value Whether this track should be enabled by default.
+ * @param value Whether this track should be enabled by default. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
@SuppressWarnings({
@@ -195,7 +195,7 @@ public class Track extends HtmlElementVoid {
* <li><js>"metadata"</js> - Metadata for the media</li>
* </ul>
*
- * @param value The type of text track.
+ * @param value The type of text track. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Track kind(String value) {
@@ -214,7 +214,7 @@ public class Track extends HtmlElementVoid {
* The label should be descriptive and help users identify the track (e.g., "English Subtitles",
* "Spanish Captions").
*
- * @param value The user-visible label for the text track.
+ * @param value The user-visible label for the text track. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Track label(String value) {
@@ -550,6 +550,7 @@ public class Track extends HtmlElementVoid {
* @param value
* The new value for this attribute.
* Typically a {@link URL} or {@link String}.
+ * Can be <jk>null</jk>.
* @return This object.
*/
public Track src(Object value) {
@@ -568,7 +569,7 @@ public class Track extends HtmlElementVoid {
* <p>
* The value should be a valid language code (e.g., "en", "es", "fr", "de").
*
- * @param value The language code of the text track.
+ * @param value The language code of the text track. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Track srclang(String value) {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/U.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/U.java
index 0e1004aabc..86c0c56c2c 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/U.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/U.java
@@ -101,7 +101,7 @@ public class U extends HtmlElementMixed {
/**
* Creates a {@link U} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public U(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ul.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ul.java
index 83852e1af4..ac80fa3536 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ul.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ul.java
@@ -110,7 +110,7 @@ public class Ul extends HtmlElementContainer {
/**
* Creates a {@link Ul} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Ul(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Var.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Var.java
index bcd2172173..f91819cade 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Var.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Var.java
@@ -101,7 +101,7 @@ public class Var extends HtmlElementMixed {
/**
* Creates a {@link Var} element with the specified child nodes.
*
- * @param children The child nodes.
+ * @param children The child nodes. Must not be <jk>null</jk>.
*/
public Var(Object...children) {
children(children);
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Video.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Video.java
index 3449afa041..ef1a120178 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Video.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Video.java
@@ -104,7 +104,7 @@ public class Video extends HtmlElementMixed {
/**
* Creates a {@link Video} element with the specified {@link Video#src(Object)} attribute.
*
- * @param src The {@link Video#src(Object)} attribute.
+ * @param src The {@link Video#src(Object)} attribute. Can be <jk>null</jk>.
*/
public Video(Object src) {
src(src);
@@ -152,6 +152,7 @@ public class Video extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Video autoplay(Object value) {
@@ -195,6 +196,7 @@ public class Video extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Video controls(Object value) {
@@ -216,7 +218,7 @@ public class Video extends HtmlElementMixed {
* <li><js>"use-credentials"</js> - Cross-origin requests include credentials</li>
* </ul>
*
- * @param value How to handle cross-origin requests.
+ * @param value How to handle cross-origin requests. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Video crossorigin(String value) {
@@ -240,6 +242,7 @@ public class Video extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Video height(Object value) {
@@ -271,7 +274,7 @@ public class Video extends HtmlElementMixed {
* <p>
* Causes the media to automatically restart from the beginning when it reaches the end.
*
- * @param value If <jk>true</jk>, the media will loop continuously.
+ * @param value If <jk>true</jk>, the media will loop continuously. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Video loop(Object value) {
@@ -290,7 +293,7 @@ public class Video extends HtmlElementMixed {
* <p>
* This is useful for creating synchronized audio/video presentations or multiple camera angles.
*
- * @param value The name of the media group to join.
+ * @param value The name of the media group to join. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Video mediagroup(String value) {
@@ -305,7 +308,7 @@ public class Video extends HtmlElementMixed {
* <p>
* Mutes the audio output by default. Useful for autoplay videos where audio should be disabled initially.
*
- * @param value If <jk>true</jk>, the media will be muted by default.
+ * @param value If <jk>true</jk>, the media will be muted by default. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Video muted(Object value) {
@@ -624,7 +627,7 @@ public class Video extends HtmlElementMixed {
* <p>
* The poster image should be representative of the video content and help users understand what the video contains.
*
- * @param value The URL of the poster image to display before video playback.
+ * @param value The URL of the poster image to display before video playback. Can be <jk>null</jk>.
* @return This object.
*/
public Video poster(String value) {
@@ -647,7 +650,7 @@ public class Video extends HtmlElementMixed {
* <li><js>"auto"</js> - Preload the entire media file (default)</li>
* </ul>
*
- * @param value How much of the media to preload.
+ * @param value How much of the media to preload. Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Video preload(String value) {
@@ -677,6 +680,7 @@ public class Video extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link URL} or {@link String}.
+ * Can be <jk>null</jk>.
* @return This object.
*/
public Video src(Object value) {
@@ -717,6 +721,7 @@ public class Video extends HtmlElementMixed {
* @param value
* The new value for this attribute.
* Typically a {@link Number} or {@link String}.
+ * Can be <jk>null</jk> to unset the attribute.
* @return This object.
*/
public Video width(Object value) {
diff --git a/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiDocument.java b/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiDocument.java
index 0278693d84..029efbd7f2 100644
--- a/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiDocument.java
+++ b/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiDocument.java
@@ -92,7 +92,7 @@ public class JsonApiDocument {
/**
* Typed setter for single-resource primary data.
*
- * @param value The resource.
+ * @param value The resource. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiDocument setData(JsonApiResource value) {
@@ -103,7 +103,7 @@ public class JsonApiDocument {
/**
* Typed setter for to-many primary data.
*
- * @param value The list of resources.
+ * @param value The list of resources. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiDocument setData(List<JsonApiResource> value) {
@@ -116,12 +116,12 @@ public class JsonApiDocument {
*
* @return The value of the <property>errors</property> property, or <jk>null</jk> if it is not set.
*/
- public List<JsonApiError> getErrors() { return errors; }
+ public List<JsonApiError> getErrors() { return u(errors); }
/**
* Bean property setter: <property>errors</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiDocument setErrors(List<JsonApiError> value) {
@@ -147,12 +147,12 @@ public class JsonApiDocument {
*
* @return The value of the <property>meta</property> property, or <jk>null</jk> if it is not set.
*/
- public Map<String,Object> getMeta() { return meta; }
+ public Map<String,Object> getMeta() { return u(meta); }
/**
* Bean property setter: <property>meta</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiDocument setMeta(Map<String,Object> value) {
@@ -170,7 +170,7 @@ public class JsonApiDocument {
/**
* Bean property setter: <property>jsonapi</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiDocument setJsonapi(JsonApiVersion value) {
@@ -188,12 +188,12 @@ public class JsonApiDocument {
*/
@BeanProp(value="links")
@Swap(JsonApiLinkOrStringSwap.class)
- public Map<String,Object> getLinks() { return links; }
+ public Map<String,Object> getLinks() { return u(links); }
/**
* Bean property setter: <property>links</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
@BeanProp(value="links")
@@ -208,12 +208,12 @@ public class JsonApiDocument {
*
* @return The value of the <property>included</property> property, or <jk>null</jk> if it is not set.
*/
- public List<JsonApiResource> getIncluded() { return included; }
+ public List<JsonApiResource> getIncluded() { return u(included); }
/**
* Bean property setter: <property>included</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiDocument setIncluded(List<JsonApiResource> value) {
diff --git a/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiError.java b/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiError.java
index 5c9f150e6e..9ad8666c60 100644
--- a/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiError.java
+++ b/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiError.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.jsonapi;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.util.*;
import org.apache.juneau.commons.bean.*;
@@ -57,7 +59,7 @@ public class JsonApiError {
/**
* Bean property setter: <property>id</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiError setId(String value) {
@@ -75,12 +77,12 @@ public class JsonApiError {
*/
@BeanProp(value="links")
@Swap(JsonApiLinkOrStringSwap.class)
- public Map<String,Object> getLinks() { return links; }
+ public Map<String,Object> getLinks() { return u(links); }
/**
* Bean property setter: <property>links</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
@BeanProp(value="links")
@@ -103,7 +105,7 @@ public class JsonApiError {
/**
* Bean property setter: <property>status</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiError setStatus(String value) {
@@ -124,7 +126,7 @@ public class JsonApiError {
/**
* Bean property setter: <property>code</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiError setCode(String value) {
@@ -142,7 +144,7 @@ public class JsonApiError {
/**
* Bean property setter: <property>title</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiError setTitle(String value) {
@@ -160,7 +162,7 @@ public class JsonApiError {
/**
* Bean property setter: <property>detail</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiError setDetail(String value) {
@@ -178,7 +180,7 @@ public class JsonApiError {
/**
* Bean property setter: <property>source</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiError setSource(JsonApiErrorSource value) {
@@ -191,12 +193,12 @@ public class JsonApiError {
*
* @return The value of the <property>meta</property> property, or <jk>null</jk> if it is not set.
*/
- public Map<String,Object> getMeta() { return meta; }
+ public Map<String,Object> getMeta() { return u(meta); }
/**
* Bean property setter: <property>meta</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiError setMeta(Map<String,Object> value) {
diff --git a/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiErrorSource.java b/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiErrorSource.java
index e6be8f8794..327f909d80 100644
--- a/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiErrorSource.java
+++ b/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiErrorSource.java
@@ -49,7 +49,7 @@ public class JsonApiErrorSource {
/**
* Bean property setter: <property>pointer</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiErrorSource setPointer(String value) {
@@ -67,7 +67,7 @@ public class JsonApiErrorSource {
/**
* Bean property setter: <property>parameter</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiErrorSource setParameter(String value) {
@@ -85,7 +85,7 @@ public class JsonApiErrorSource {
/**
* Bean property setter: <property>header</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiErrorSource setHeader(String value) {
diff --git a/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiLink.java b/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiLink.java
index d598054159..2d484bd047 100644
--- a/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiLink.java
+++ b/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiLink.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.jsonapi;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.util.*;
import org.apache.juneau.marshall.*;
@@ -56,7 +58,7 @@ public class JsonApiLink {
/**
* Convenience constructor with the required {@code href} field.
*
- * @param href The link target URI.
+ * @param href The link target URI. Can be <jk>null</jk>.
*/
public JsonApiLink(String href) {
this.href = href;
@@ -72,7 +74,7 @@ public class JsonApiLink {
/**
* Bean property setter: <property>href</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiLink setHref(String value) {
@@ -90,7 +92,7 @@ public class JsonApiLink {
/**
* Bean property setter: <property>rel</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiLink setRel(String value) {
@@ -108,7 +110,7 @@ public class JsonApiLink {
/**
* Bean property setter: <property>describedby</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiLink setDescribedby(String value) {
@@ -126,7 +128,7 @@ public class JsonApiLink {
/**
* Bean property setter: <property>title</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiLink setTitle(String value) {
@@ -147,7 +149,7 @@ public class JsonApiLink {
/**
* Bean property setter: <property>type</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiLink setType(String value) {
@@ -165,7 +167,7 @@ public class JsonApiLink {
/**
* Bean property setter: <property>hreflang</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiLink setHreflang(String value) {
@@ -178,12 +180,12 @@ public class JsonApiLink {
*
* @return The value of the <property>meta</property> property, or <jk>null</jk> if it is not set.
*/
- public Map<String,Object> getMeta() { return meta; }
+ public Map<String,Object> getMeta() { return u(meta); }
/**
* Bean property setter: <property>meta</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiLink setMeta(Map<String,Object> value) {
diff --git a/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiRelationship.java b/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiRelationship.java
index b841a88fc0..e1e0bad022 100644
--- a/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiRelationship.java
+++ b/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiRelationship.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.jsonapi;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.util.*;
import org.apache.juneau.commons.bean.*;
@@ -77,7 +79,7 @@ public class JsonApiRelationship {
/**
* Typed setter for single-identifier linkage.
*
- * @param value The identifier.
+ * @param value The identifier. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiRelationship setData(JsonApiResourceIdentifier value) {
@@ -88,7 +90,7 @@ public class JsonApiRelationship {
/**
* Typed setter for to-many linkage.
*
- * @param value The list of identifiers.
+ * @param value The list of identifiers. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiRelationship setData(List<JsonApiResourceIdentifier> value) {
@@ -106,12 +108,12 @@ public class JsonApiRelationship {
*/
@BeanProp(value="links")
@Swap(JsonApiLinkOrStringSwap.class)
- public Map<String,Object> getLinks() { return links; }
+ public Map<String,Object> getLinks() { return u(links); }
/**
* Bean property setter: <property>links</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
@BeanProp(value="links")
@@ -126,12 +128,12 @@ public class JsonApiRelationship {
*
* @return The value of the <property>meta</property> property, or <jk>null</jk> if it is not set.
*/
- public Map<String,Object> getMeta() { return meta; }
+ public Map<String,Object> getMeta() { return u(meta); }
/**
* Bean property setter: <property>meta</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiRelationship setMeta(Map<String,Object> value) {
diff --git a/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiResource.java b/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiResource.java
index 12b3126746..6f47d5b6ab 100644
--- a/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiResource.java
+++ b/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiResource.java
@@ -17,6 +17,7 @@
package org.apache.juneau.bean.jsonapi;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.commons.utils.Shorts.*;
import java.util.*;
@@ -65,8 +66,8 @@ public class JsonApiResource {
/**
* Convenience constructor.
*
- * @param type The entity-type name.
- * @param id The identifier value.
+ * @param type The entity-type name. Can be <jk>null</jk>.
+ * @param id The identifier value. Can be <jk>null</jk>.
*/
public JsonApiResource(String type, String id) {
this.type = type;
@@ -87,7 +88,7 @@ public class JsonApiResource {
/**
* Bean property setter: <property>type</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiResource setType(String value) {
@@ -105,7 +106,7 @@ public class JsonApiResource {
/**
* Bean property setter: <property>id</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiResource setId(String value) {
@@ -122,12 +123,12 @@ public class JsonApiResource {
*
* @return The value of the <property>attributes</property> property, or <jk>null</jk> if it is not set.
*/
- public Map<String,Object> getAttributes() { return attributes; }
+ public Map<String,Object> getAttributes() { return u(attributes); }
/**
* Bean property setter: <property>attributes</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiResource setAttributes(Map<String,Object> value) {
@@ -138,8 +139,8 @@ public class JsonApiResource {
/**
* Convenience method to add a single attribute.
*
- * @param name The attribute name.
- * @param value The attribute value.
+ * @param name The attribute name. Can be <jk>null</jk>.
+ * @param value The attribute value. Can be <jk>null</jk>.
* @return This object.
*/
public JsonApiResource putAttribute(String name, Object value) {
@@ -154,12 +155,12 @@ public class JsonApiResource {
*
* @return The value of the <property>relationships</property> property, or <jk>null</jk> if it is not set.
*/
- public Map<String,JsonApiRelationship> getRelationships() { return relationships; }
+ public Map<String,JsonApiRelationship> getRelationships() { return u(relationships); }
/**
* Bean property setter: <property>relationships</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiResource setRelationships(Map<String,JsonApiRelationship> value) {
@@ -170,8 +171,8 @@ public class JsonApiResource {
/**
* Convenience method to add a single named relationship.
*
- * @param name The relationship name.
- * @param value The relationship object.
+ * @param name The relationship name. Can be <jk>null</jk>.
+ * @param value The relationship object. Can be <jk>null</jk>.
* @return This object.
*/
public JsonApiResource putRelationship(String name, JsonApiRelationship value) {
@@ -191,12 +192,12 @@ public class JsonApiResource {
*/
@BeanProp(value="links")
@Swap(JsonApiLinkOrStringSwap.class)
- public Map<String,Object> getLinks() { return links; }
+ public Map<String,Object> getLinks() { return u(links); }
/**
* Bean property setter: <property>links</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
@BeanProp(value="links")
@@ -211,12 +212,12 @@ public class JsonApiResource {
*
* @return The value of the <property>meta</property> property, or <jk>null</jk> if it is not set.
*/
- public Map<String,Object> getMeta() { return meta; }
+ public Map<String,Object> getMeta() { return u(meta); }
/**
* Bean property setter: <property>meta</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiResource setMeta(Map<String,Object> value) {
diff --git a/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiResourceIdentifier.java b/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiResourceIdentifier.java
index e863b0b25d..61c75a164a 100644
--- a/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiResourceIdentifier.java
+++ b/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiResourceIdentifier.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.jsonapi;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.util.*;
import org.apache.juneau.marshall.*;
@@ -49,8 +51,8 @@ public class JsonApiResourceIdentifier {
/**
* Convenience constructor.
*
- * @param type The entity-type name.
- * @param id The identifier value.
+ * @param type The entity-type name. Can be <jk>null</jk>.
+ * @param id The identifier value. Can be <jk>null</jk>.
*/
public JsonApiResourceIdentifier(String type, String id) {
this.type = type;
@@ -67,7 +69,7 @@ public class JsonApiResourceIdentifier {
/**
* Bean property setter: <property>type</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiResourceIdentifier setType(String value) {
@@ -85,7 +87,7 @@ public class JsonApiResourceIdentifier {
/**
* Bean property setter: <property>id</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiResourceIdentifier setId(String value) {
@@ -98,12 +100,12 @@ public class JsonApiResourceIdentifier {
*
* @return The value of the <property>meta</property> property, or <jk>null</jk> if it is not set.
*/
- public Map<String,Object> getMeta() { return meta; }
+ public Map<String,Object> getMeta() { return u(meta); }
/**
* Bean property setter: <property>meta</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiResourceIdentifier setMeta(Map<String,Object> value) {
diff --git a/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiVersion.java b/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiVersion.java
index ed4976e01e..7120bd54ab 100644
--- a/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiVersion.java
+++ b/juneau-bean/juneau-bean-jsonapi/src/main/java/org/apache/juneau/bean/jsonapi/JsonApiVersion.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.jsonapi;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.util.*;
import org.apache.juneau.marshall.*;
@@ -47,7 +49,7 @@ public class JsonApiVersion {
/**
* Convenience constructor.
*
- * @param version The JSON:API protocol version (e.g. {@code "1.1"}).
+ * @param version The JSON:API protocol version (e.g. {@code "1.1"}). Can be <jk>null</jk>.
*/
public JsonApiVersion(String version) {
this.version = version;
@@ -63,7 +65,7 @@ public class JsonApiVersion {
/**
* Bean property setter: <property>version</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiVersion setVersion(String value) {
@@ -76,12 +78,12 @@ public class JsonApiVersion {
*
* @return The value of the <property>meta</property> property, or <jk>null</jk> if it is not set.
*/
- public Map<String,Object> getMeta() { return meta; }
+ public Map<String,Object> getMeta() { return u(meta); }
/**
* Bean property setter: <property>meta</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonApiVersion setMeta(Map<String,Object> value) {
diff --git a/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/AddOp.java b/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/AddOp.java
index da3cdbe652..064463c5f2 100644
--- a/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/AddOp.java
+++ b/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/AddOp.java
@@ -38,8 +38,8 @@ public class AddOp extends JsonPatchOperation {
/**
* Convenience constructor.
*
- * @param path The JSON Pointer target.
- * @param value The value to add.
+ * @param path The JSON Pointer target. Can be <jk>null</jk>.
+ * @param value The value to add. Can be <jk>null</jk>.
*/
public AddOp(String path, Object value) {
super(path);
@@ -56,7 +56,7 @@ public class AddOp extends JsonPatchOperation {
/**
* Bean property setter: <property>value</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public AddOp setValue(Object value) {
diff --git a/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/CopyOp.java b/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/CopyOp.java
index edc8d18169..a491553546 100644
--- a/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/CopyOp.java
+++ b/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/CopyOp.java
@@ -38,8 +38,8 @@ public class CopyOp extends JsonPatchOperation {
/**
* Convenience constructor.
*
- * @param path The JSON Pointer destination.
- * @param from The JSON Pointer source.
+ * @param path The JSON Pointer destination. Can be <jk>null</jk>.
+ * @param from The JSON Pointer source. Can be <jk>null</jk>.
*/
public CopyOp(String path, String from) {
super(path);
@@ -56,7 +56,7 @@ public class CopyOp extends JsonPatchOperation {
/**
* Bean property setter: <property>from</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public CopyOp setFrom(String value) {
diff --git a/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/JsonPatchOperation.java b/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/JsonPatchOperation.java
index 854ab1bf6f..4e74fdc7f8 100644
--- a/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/JsonPatchOperation.java
+++ b/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/JsonPatchOperation.java
@@ -54,7 +54,7 @@ public abstract class JsonPatchOperation {
/**
* Convenience constructor.
*
- * @param path The JSON Pointer target of the operation.
+ * @param path The JSON Pointer target of the operation. Can be <jk>null</jk>.
*/
protected JsonPatchOperation(String path) {
this.path = path;
@@ -73,7 +73,7 @@ public abstract class JsonPatchOperation {
/**
* Bean property setter: <property>path</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public JsonPatchOperation setPath(String value) {
diff --git a/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/MoveOp.java b/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/MoveOp.java
index 56afd58759..df4e5108df 100644
--- a/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/MoveOp.java
+++ b/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/MoveOp.java
@@ -38,8 +38,8 @@ public class MoveOp extends JsonPatchOperation {
/**
* Convenience constructor.
*
- * @param path The JSON Pointer destination.
- * @param from The JSON Pointer source.
+ * @param path The JSON Pointer destination. Can be <jk>null</jk>.
+ * @param from The JSON Pointer source. Can be <jk>null</jk>.
*/
public MoveOp(String path, String from) {
super(path);
@@ -56,7 +56,7 @@ public class MoveOp extends JsonPatchOperation {
/**
* Bean property setter: <property>from</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public MoveOp setFrom(String value) {
diff --git a/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/RemoveOp.java b/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/RemoveOp.java
index 1d3926552a..054c4a2f3e 100644
--- a/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/RemoveOp.java
+++ b/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/RemoveOp.java
@@ -36,7 +36,7 @@ public class RemoveOp extends JsonPatchOperation {
/**
* Convenience constructor.
*
- * @param path The JSON Pointer target.
+ * @param path The JSON Pointer target. Can be <jk>null</jk>.
*/
public RemoveOp(String path) {
super(path);
diff --git a/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/ReplaceOp.java b/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/ReplaceOp.java
index 0ea542ce9d..fbdeab4826 100644
--- a/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/ReplaceOp.java
+++ b/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/ReplaceOp.java
@@ -38,8 +38,8 @@ public class ReplaceOp extends JsonPatchOperation {
/**
* Convenience constructor.
*
- * @param path The JSON Pointer target.
- * @param value The replacement value.
+ * @param path The JSON Pointer target. Can be <jk>null</jk>.
+ * @param value The replacement value. Can be <jk>null</jk>.
*/
public ReplaceOp(String path, Object value) {
super(path);
@@ -56,7 +56,7 @@ public class ReplaceOp extends JsonPatchOperation {
/**
* Bean property setter: <property>value</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public ReplaceOp setValue(Object value) {
diff --git a/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/TestOp.java b/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/TestOp.java
index 9a9111b3bd..dc97fb8e3a 100644
--- a/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/TestOp.java
+++ b/juneau-bean/juneau-bean-jsonpatch/src/main/java/org/apache/juneau/bean/jsonpatch/TestOp.java
@@ -38,8 +38,8 @@ public class TestOp extends JsonPatchOperation {
/**
* Convenience constructor.
*
- * @param path The JSON Pointer target.
- * @param value The value to test for.
+ * @param path The JSON Pointer target. Can be <jk>null</jk>.
+ * @param value The value to test for. Can be <jk>null</jk>.
*/
public TestOp(String path, Object value) {
super(path);
@@ -56,7 +56,7 @@ public class TestOp extends JsonPatchOperation {
/**
* Bean property setter: <property>value</property>.
*
- * @param value The new value for this property.
+ * @param value The new value for this property. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
public TestOp setValue(Object value) {
diff --git a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchema.java b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchema.java
index 4ef2aef362..e2dc8f1bdf 100644
--- a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchema.java
+++ b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchema.java
@@ -447,8 +447,8 @@ public class JsonSchema {
/**
* Bean property appender: <property>$defs</property>.
*
- * @param name The key in the defs map entry.
- * @param value The value in the defs map entry.
+ * @param name The key in the defs map entry. Can be <jk>null</jk>.
+ * @param value The value in the defs map entry. Can be <jk>null</jk>.
* @return This object.
*/
public JsonSchema addDef(String name, JsonSchema value) {
@@ -462,8 +462,8 @@ public class JsonSchema {
/**
* Bean property appender: <property>definitions</property>.
*
- * @param name The key in the definitions map entry.
- * @param value The value in the definitions map entry.
+ * @param name The key in the definitions map entry. Can be <jk>null</jk>.
+ * @param value The value in the definitions map entry. Can be <jk>null</jk>.
* @return This object.
*/
public JsonSchema addDefinition(String name, JsonSchema value) {
@@ -477,8 +477,8 @@ public class JsonSchema {
/**
* Bean property appender: <property>dependencies</property>.
*
- * @param name The key of the entry in the dependencies map.
- * @param value The value of the entry in the dependencies map.
+ * @param name The key of the entry in the dependencies map. Can be <jk>null</jk>.
+ * @param value The value of the entry in the dependencies map. Can be <jk>null</jk>.
* @return This object.
*/
public JsonSchema addDependency(String name, JsonSchema value) {
@@ -492,8 +492,8 @@ public class JsonSchema {
/**
* Bean property appender: <property>dependentRequired</property>.
*
- * @param name The key of the entry in the dependentRequired map.
- * @param value The value of the entry in the dependentRequired map.
+ * @param name The key of the entry in the dependentRequired map. Can be <jk>null</jk>.
+ * @param value The value of the entry in the dependentRequired map. Can be <jk>null</jk>.
* @return This object.
*/
public JsonSchema addDependentRequired(String name, List<String> value) {
@@ -506,8 +506,8 @@ public class JsonSchema {
/**
* Bean property appender: <property>dependentSchemas</property>.
*
- * @param name The key of the entry in the dependentSchemas map.
- * @param value The value of the entry in the dependentSchemas map.
+ * @param name The key of the entry in the dependentSchemas map. Can be <jk>null</jk>.
+ * @param value The value of the entry in the dependentSchemas map. Can be <jk>null</jk>.
* @return This object.
*/
public JsonSchema addDependentSchema(String name, JsonSchema value) {
@@ -724,7 +724,7 @@ public class JsonSchema {
* @return The currently set value, or <jk>null</jk> if the property is not set, or is set as a {@link Boolean}.
*/
@BeanIgnore
- public List<JsonSchema> getAdditionalItemsAsSchemaArray() { return additionalItemsSchemaArray; }
+ public List<JsonSchema> getAdditionalItemsAsSchemaArray() { return u(additionalItemsSchemaArray); }
/**
* Bean property getter: <property>additionalProperties</property>.
@@ -732,7 +732,7 @@ public class JsonSchema {
* @return
* The value of the <property>additionalProperties</property> property on this bean, or <jk>null</jk> if it
* is not set.
- * Can be either a {@link Boolean} or {@link JsonSchemaArray} depending on what value was used to set it.
+ * Can be either a {@link Boolean} or {@link JsonSchema} depending on what value was used to set it.
*/
@Swap(BooleanOrSchemaSwap.class)
public Object getAdditionalProperties() {
@@ -770,14 +770,14 @@ public class JsonSchema {
*
* @return The value of the <property>allOf</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- public List<JsonSchema> getAllOf() { return allOf; }
+ public List<JsonSchema> getAllOf() { return u(allOf); }
/**
* Bean property getter: <property>anyOf</property>.
*
* @return The value of the <property>anyOf</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- public List<JsonSchema> getAnyOf() { return anyOf; }
+ public List<JsonSchema> getAnyOf() { return u(anyOf); }
/**
* Bean property getter: <property>const</property>.
@@ -864,7 +864,7 @@ public class JsonSchema {
* @return
* The value of the <property>dependencies</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- public Map<String,JsonSchema> getDependencies() { return dependencies; }
+ public Map<String,JsonSchema> getDependencies() { return u(dependencies); }
/**
* Bean property getter: <property>format</property>.
@@ -881,7 +881,7 @@ public class JsonSchema {
*
* @return The value of the <property>dependentRequired</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- public Map<String,List<String>> getDependentRequired() { return dependentRequired; }
+ public Map<String,List<String>> getDependentRequired() { return u(dependentRequired); }
/**
* Bean property getter: <property>dependentSchemas</property>.
@@ -891,7 +891,7 @@ public class JsonSchema {
*
* @return The value of the <property>dependentSchemas</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- public Map<String,JsonSchema> getDependentSchemas() { return dependentSchemas; }
+ public Map<String,JsonSchema> getDependentSchemas() { return u(dependentSchemas); }
/**
* Bean property getter: <property>description</property>.
@@ -916,7 +916,7 @@ public class JsonSchema {
*
* @return The value of the <property>enum</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- public List<Object> getEnum() { return enum_; }
+ public List<Object> getEnum() { return u(enum_); }
/**
* Bean property getter: <property>examples</property>.
@@ -926,7 +926,7 @@ public class JsonSchema {
*
* @return The value of the <property>examples</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- public List<Object> getExamples() { return examples; }
+ public List<Object> getExamples() { return u(examples); }
/**
* Bean property getter: <property>exclusiveMaximum</property>.
@@ -1120,7 +1120,7 @@ public class JsonSchema {
*
* @return The value of the <property>oneOf</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- public List<JsonSchema> getOneOf() { return oneOf; }
+ public List<JsonSchema> getOneOf() { return u(oneOf); }
/**
* Bean property getter: <property>pattern</property>.
@@ -1136,7 +1136,7 @@ public class JsonSchema {
* The value of the <property>patternProperties</property> property on this bean, or <jk>null</jk> if it is
* not set.
*/
- public Map<String,JsonSchema> getPatternProperties() { return patternProperties; }
+ public Map<String,JsonSchema> getPatternProperties() { return u(patternProperties); }
/**
* Bean property getter: <property>prefixItems</property>.
@@ -1153,7 +1153,7 @@ public class JsonSchema {
*
* @return The value of the <property>properties</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- public Map<String,JsonSchema> getProperties() { return properties; }
+ public Map<String,JsonSchema> getProperties() { return u(properties); }
/**
* Returns the property with the specified name.
@@ -1161,7 +1161,7 @@ public class JsonSchema {
* <p>
* This is equivalent to calling <property>getProperty(name, <jk>false</jk>)</property>.
*
- * @param name The property name.
+ * @param name The property name. Can be <jk>null</jk>.
* @return The property with the specified name, or <jk>null</jk> if no property is specified.
*/
public JsonSchema getProperty(String name) {
@@ -1178,7 +1178,7 @@ public class JsonSchema {
* <property>getProperty(name).resolve()</property>, except it's safe from a potential
* <property>NullPointerException</property>.
*
- * @param name The property name.
+ * @param name The property name. Can be <jk>null</jk>.
* @param resolve If <jk>true</jk>, calls {@link #resolve()} on object before returning.
* @return The property with the specified name, or <jk>null</jk> if no property is specified.
*/
@@ -1216,7 +1216,7 @@ public class JsonSchema {
*
* @return The value of the <property>required</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- public List<String> getRequired() { return required; }
+ public List<String> getRequired() { return u(required); }
/**
* Bean property getter: <property>$schema</property>.
@@ -1360,6 +1360,7 @@ public class JsonSchema {
* @param value
* The new value for the <property>additionalItems</property> property on this bean.
* This object must be of type {@link Boolean} or {@link JsonSchemaArray}.
+ * <br>Can be <jk>null</jk> to unset the property.
* @return This object.
* @throws BeanRuntimeException If invalid object type passed in.
*/
@@ -1385,6 +1386,7 @@ public class JsonSchema {
* @param value
* The new value for the <property>additionalProperties</property> property on this bean.
* This object must be of type {@link Boolean} or {@link JsonSchema}.
+ * <br>Can be <jk>null</jk> to unset the property.
* @return This object.
* @throws BeanRuntimeException If invalid object type passed in.
*/
@@ -1680,7 +1682,7 @@ public class JsonSchema {
* <p>
* URIs defined by {@link UriResolver} can be used for values.
*
- * @param value The new value for the <property>id</property> property on this bean.
+ * @param value The new value for the <property>id</property> property on this bean. Can be <jk>null</jk> to unset the property.
* @return This object.
* @deprecated Use {@link #setIdUri(Object)} instead.
*/
@@ -1706,7 +1708,7 @@ public class JsonSchema {
* <p>
* URIs defined by {@link UriResolver} can be used for values.
*
- * @param value The new value for the <property>$id</property> property on this bean.
+ * @param value The new value for the <property>$id</property> property on this bean. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
@BeanProp("$id")
@@ -1737,6 +1739,7 @@ public class JsonSchema {
* @param value
* The new value for the <property>items</property> property on this bean.
* This object must be of type {@link JsonSchema} or {@link JsonSchemaArray}.
+ * <br>Can be <jk>null</jk> to unset the property.
* @return This object.
* @throws BeanRuntimeException If invalid object type passed in.
*/
@@ -1981,7 +1984,7 @@ public class JsonSchema {
* <p>
* URIs defined by {@link UriResolver} can be used for values.
*
- * @param value The new value for the <property>$ref</property> property on this bean.
+ * @param value The new value for the <property>$ref</property> property on this bean. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
@BeanProp("$ref")
@@ -2024,7 +2027,7 @@ public class JsonSchema {
* <p>
* URIs defined by {@link UriResolver} can be used for values.
*
- * @param value The new value for the <property>schemaVersion</property> property on this bean.
+ * @param value The new value for the <property>schemaVersion</property> property on this bean. Can be <jk>null</jk> to unset the property.
* @return This object.
*/
@BeanProp("$schema")
@@ -2078,6 +2081,7 @@ public class JsonSchema {
* @param value
* The new value for the <property>type</property> property on this bean.
* This object must be of type {@link JsonType} or {@link JsonTypeArray}.
+ * <br>Can be <jk>null</jk> to unset the property.
* @return This object.
* @throws BeanRuntimeException If invalid object type passed in.
*/
diff --git a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaBeanGenerator.java b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaBeanGenerator.java
index 27f1de5bea..1d858d1c0b 100644
--- a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaBeanGenerator.java
+++ b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaBeanGenerator.java
@@ -66,8 +66,8 @@ public final class JsonSchemaBeanGenerator {
/**
* Generates a schema bean from a Java type.
*
- * @param type The Java type.
- * @return The generated schema bean.
+ * @param type The Java type. Must not be <jk>null</jk>.
+ * @return The generated schema bean, or <jk>null</jk> if a schema could not be generated for the type.
*/
public JsonSchema generate(Type type) {
assertArgNotNull("type", type);
@@ -88,8 +88,8 @@ public final class JsonSchemaBeanGenerator {
/**
* Generates a schema bean from a Java class.
*
- * @param type The Java class.
- * @return The generated schema bean.
+ * @param type The Java class. Must not be <jk>null</jk>.
+ * @return The generated schema bean, or <jk>null</jk> if a schema could not be generated for the class.
*/
public JsonSchema generate(Class<?> type) {
return generate((Type)type);
@@ -101,8 +101,8 @@ public final class JsonSchemaBeanGenerator {
* <p>
* The value can be a POJO or a <c>Class</c>/<c>Type</c>.
*
- * @param o The value to infer a schema from.
- * @return The generated schema bean.
+ * @param o The value to infer a schema from. Must not be <jk>null</jk>.
+ * @return The generated schema bean, or <jk>null</jk> if a schema could not be generated for the value.
*/
public JsonSchema generate(Object o) {
assertArgNotNull("o", o);
@@ -126,7 +126,7 @@ public final class JsonSchemaBeanGenerator {
* <p>
* Conversion uses a JSON roundtrip to ensure the swaps declared on {@link JsonSchema} are honored.
*
- * @param schemaMap The generated schema map.
+ * @param schemaMap The generated schema map. Must not be <jk>null</jk>.
* @return The typed schema bean.
*/
public static JsonSchema toBean(JsonMap schemaMap) {
diff --git a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaMap.java b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaMap.java
index 87252a5141..77174241ac 100644
--- a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaMap.java
+++ b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaMap.java
@@ -81,7 +81,7 @@ public abstract class JsonSchemaMap extends ConcurrentHashMap<URI,JsonSchema> {
* <p>
* URIs defined by {@link UriResolver} can be used for values.
*
- * @param uri The URI of the schema to retrieve.
+ * @param uri The URI of the schema to retrieve. Must not be <jk>null</jk>.
* @return The JsonSchema, or <jk>null</jk> if schema was not located and could not be loaded.
*/
@Override /* Overridden from Map */
@@ -111,7 +111,7 @@ public abstract class JsonSchemaMap extends ConcurrentHashMap<URI,JsonSchema> {
* The default implementation returns <jk>null</jk>.
*
* @param uri The URI to connect to and retrieve the contents.
- * @return The reader from reading the specified URI.
+ * @return The reader from reading the specified URI, or <jk>null</jk> if the document is unreachable (the default implementation always returns <jk>null</jk>).
*/
public Reader getReader(URI uri) {
return null;
@@ -129,7 +129,7 @@ public abstract class JsonSchemaMap extends ConcurrentHashMap<URI,JsonSchema> {
* unreachable document.
*
* @param uri The URI to load the schema from.
- * @return The parsed schema.
+ * @return The parsed schema, or <jk>null</jk> if the document is unreachable.
*/
public JsonSchema load(URI uri) {
try (var r = getReader(uri)) {
diff --git a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaProperty.java b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaProperty.java
index 92efb67998..49cfffb0ff 100644
--- a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaProperty.java
+++ b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaProperty.java
@@ -31,7 +31,7 @@ public class JsonSchemaProperty extends JsonSchema {
/**
* Convenience constructor.
*
- * @param name The name of this property.
+ * @param name The name of this property. Can be <jk>null</jk>.
*/
public JsonSchemaProperty(String name) {
setName(name);
@@ -40,8 +40,8 @@ public class JsonSchemaProperty extends JsonSchema {
/**
* Convenience constructor.
*
- * @param name The name of this property.
- * @param type The JSON type of this property.
+ * @param name The name of this property. Can be <jk>null</jk>.
+ * @param type The JSON type of this property. Can be <jk>null</jk>.
*/
public JsonSchemaProperty(String name, JsonType type) {
setName(name);
diff --git a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaPropertySimpleArray.java b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaPropertySimpleArray.java
index b751fe71cb..8d72a97dcb 100644
--- a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaPropertySimpleArray.java
+++ b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaPropertySimpleArray.java
@@ -37,8 +37,8 @@ public class JsonSchemaPropertySimpleArray extends JsonSchemaProperty {
/**
* Constructor.
*
- * @param name The name of the schema property.
- * @param elementType The JSON type of the elements in the array.
+ * @param name The name of the schema property. Can be <jk>null</jk>.
+ * @param elementType The JSON type of the elements in the array. Can be <jk>null</jk>.
*/
public JsonSchemaPropertySimpleArray(String name, JsonType elementType) {
setName(name);
diff --git a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaPropertyValidatorFactory.java b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaPropertyValidatorFactory.java
index 4b4bb0df55..bd80a2b370 100644
--- a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaPropertyValidatorFactory.java
+++ b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaPropertyValidatorFactory.java
@@ -50,7 +50,7 @@ public final class JsonSchemaPropertyValidatorFactory implements PropertyValidat
public PropertyValidator create(Map<String,Object> schemaMap, Class<?> propertyType) {
if (ie(schemaMap))
return null;
- var jm = (schemaMap instanceof JsonMap m) ? m : new JsonMap(schemaMap);
+ var jm = (schemaMap instanceof JsonMap schemaMap2) ? schemaMap2 : new JsonMap(schemaMap);
var schema = JsonSchemaBeanGenerator.toBean(jm);
return JsonSchemaValidator.of(schema);
}
diff --git a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaValidator.java b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaValidator.java
index 713bf22bae..11832b1f2b 100644
--- a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaValidator.java
+++ b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchemaValidator.java
@@ -17,6 +17,7 @@
package org.apache.juneau.bean.jsonschema;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
+import static org.apache.juneau.commons.utils.ObjectUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import java.lang.reflect.*;
@@ -168,18 +169,18 @@ public final class JsonSchemaValidator implements PropertyValidator {
validateType(s, value);
- if (value instanceof CharSequence cs) {
- validateString(s, cs.toString(), patternOverride);
- } else if (value instanceof Character ch) {
- validateString(s, ch.toString(), patternOverride);
- } else if (value instanceof Number n) {
- validateNumber(s, n);
- } else if (value instanceof Collection<?> c) {
- validateArray(s, c);
+ if (value instanceof CharSequence value2) {
+ validateString(s, value2.toString(), patternOverride);
+ } else if (value instanceof Character value2) {
+ validateString(s, value2.toString(), patternOverride);
+ } else if (value instanceof Number value2) {
+ validateNumber(s, value2);
+ } else if (value instanceof Collection<?> value2) {
+ validateArray(s, value2);
} else if (value.getClass().isArray()) {
validateArray(s, arrayAsList(value));
- } else if (value instanceof Map<?,?> m) {
- validateObject(s, m);
+ } else if (value instanceof Map<?,?> value2) {
+ validateObject(s, value2);
}
// Java beans: per-property @Schema validators are installed independently on the bean side.
}
@@ -253,9 +254,9 @@ public final class JsonSchemaValidator implements PropertyValidator {
private static boolean isIntegralValue(Object value) {
if (value instanceof Byte || value instanceof Short || value instanceof Integer || value instanceof Long || value instanceof BigInteger)
return true;
- if (value instanceof Number n) {
+ if (value instanceof Number value2) {
try {
- var bd = toBigDecimal(n);
+ var bd = toBigDecimal(value2);
return bd.stripTrailingZeros().scale() <= 0;
} catch (@SuppressWarnings("unused") NumberFormatException e) {
return false;
@@ -337,7 +338,7 @@ public final class JsonSchemaValidator implements PropertyValidator {
throw new SchemaValidationException("Array size %s is less than minItems %s.", size, min);
if (nn(max) && size > max)
throw new SchemaValidationException("Array size %s exceeds maxItems %s.", size, max);
- if (Boolean.TRUE.equals(s.getUniqueItems()) && hasDuplicates(value))
+ if (isTrue(s.getUniqueItems()) && hasDuplicates(value))
throw new SchemaValidationException("Array contains duplicate items but uniqueItems is true.");
var items = s.getItemsAsSchema();
if (nn(items)) {
@@ -406,10 +407,10 @@ public final class JsonSchemaValidator implements PropertyValidator {
// =================================================================================================================
private static BigDecimal toBigDecimal(Number n) {
- if (n instanceof BigDecimal bd)
- return bd;
- if (n instanceof BigInteger bi)
- return new BigDecimal(bi);
+ if (n instanceof BigDecimal n2)
+ return n2;
+ if (n instanceof BigInteger n2)
+ return new BigDecimal(n2);
if (n instanceof Long || n instanceof Integer || n instanceof Short || n instanceof Byte)
return BigDecimal.valueOf(n.longValue());
return new BigDecimal(n.toString());
@@ -423,18 +424,18 @@ public final class JsonSchemaValidator implements PropertyValidator {
return true;
if (a == null || b == null)
return false;
- if (a instanceof Number an && b instanceof Number bn)
- return toBigDecimal(an).compareTo(toBigDecimal(bn)) == 0;
- if (a instanceof Number an && b instanceof CharSequence cs) {
- var bd = tryAsBigDecimal(cs.toString());
- return nn(bd) && toBigDecimal(an).compareTo(bd) == 0;
+ if (a instanceof Number a2 && b instanceof Number b2)
+ return toBigDecimal(a2).compareTo(toBigDecimal(b2)) == 0;
+ if (a instanceof Number a2 && b instanceof CharSequence b2) {
+ var bd = tryAsBigDecimal(b2.toString());
+ return nn(bd) && toBigDecimal(a2).compareTo(bd) == 0;
}
- if (b instanceof Number bn && a instanceof CharSequence cs) {
- var bd = tryAsBigDecimal(cs.toString());
- return nn(bd) && toBigDecimal(bn).compareTo(bd) == 0;
+ if (b instanceof Number b2 && a instanceof CharSequence a2) {
+ var bd = tryAsBigDecimal(a2.toString());
+ return nn(bd) && toBigDecimal(b2).compareTo(bd) == 0;
}
- if (a instanceof CharSequence csa && b instanceof CharSequence csb)
- return csa.toString().equals(csb.toString());
+ if (a instanceof CharSequence a2 && b instanceof CharSequence b2)
+ return a2.toString().equals(b2.toString());
if (a.equals(b))
return true;
try {
diff --git a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonType.java b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonType.java
index 907facb452..c8c643eaad 100644
--- a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonType.java
+++ b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonType.java
@@ -59,7 +59,7 @@ public enum JsonType {
/**
* Converts the specified lowercase form of the enum back into an <c>Enum</c>.
*
- * @param value The lowercase form of the enum (e.g. <js>"array"</js>).
+ * @param value The lowercase form of the enum (e.g. <js>"array"</js>). Can be <jk>null</jk>.
* @return The matching <c>Enum</c>, or <jk>null</jk> if no match found.
*/
@SuppressWarnings({
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/BlobResourceContents.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/BlobResourceContents.java
index afd0bd154a..4ced4da459 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/BlobResourceContents.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/BlobResourceContents.java
@@ -43,7 +43,7 @@ public class BlobResourceContents implements ResourceContents {
/**
* Sets the resource URI.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public BlobResourceContents setUri(String value) {
@@ -63,7 +63,7 @@ public class BlobResourceContents implements ResourceContents {
/**
* Sets the MIME type.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public BlobResourceContents setMimeType(String value) {
@@ -83,7 +83,7 @@ public class BlobResourceContents implements ResourceContents {
/**
* Sets the base64 payload.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public BlobResourceContents setBlob(String value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/CallToolRequest.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/CallToolRequest.java
index 4c0ebb29c3..443c60cb74 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/CallToolRequest.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/CallToolRequest.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.mcp;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.util.*;
import org.apache.juneau.marshall.*;
@@ -41,7 +43,7 @@ public class CallToolRequest {
/**
* Sets the tool name.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public CallToolRequest setName(String value) {
@@ -55,13 +57,13 @@ public class CallToolRequest {
* @return The arguments map, or {@code null} if not set.
*/
public Map<String, Object> getArguments() {
- return arguments;
+ return u(arguments);
}
/**
* Sets tool arguments.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public CallToolRequest setArguments(Map<String, Object> value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/CallToolResult.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/CallToolResult.java
index 6aab4ca63d..9b21dfb598 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/CallToolResult.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/CallToolResult.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.mcp;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.util.*;
import org.apache.juneau.marshall.*;
@@ -35,13 +37,13 @@ public class CallToolResult {
* @return The content list, or {@code null} if not set.
*/
public List<Content> getContent() {
- return content;
+ return u(content);
}
/**
* Sets the content blocks.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public CallToolResult setContent(List<Content> value) {
@@ -61,7 +63,7 @@ public class CallToolResult {
/**
* Sets the error flag.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public CallToolResult setIsError(Boolean value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ClientCapabilities.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ClientCapabilities.java
index f13e40c549..73a74b3dc1 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ClientCapabilities.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ClientCapabilities.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.mcp;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.util.*;
import org.apache.juneau.marshall.*;
@@ -42,7 +44,7 @@ public class ClientCapabilities {
/**
* Sets roots capability.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ClientCapabilities setRoots(RootsCapability value) {
@@ -56,13 +58,13 @@ public class ClientCapabilities {
* @return The sampling map, or {@code null} if not set.
*/
public Map<String, Object> getSampling() {
- return sampling;
+ return u(sampling);
}
/**
* Sets sampling capability.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ClientCapabilities setSampling(Map<String, Object> value) {
@@ -76,13 +78,13 @@ public class ClientCapabilities {
* @return The experimental map, or {@code null} if not set.
*/
public Map<String, Object> getExperimental() {
- return experimental;
+ return u(experimental);
}
/**
* Sets experimental extensions.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ClientCapabilities setExperimental(Map<String, Object> value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/EmbeddedResourceContent.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/EmbeddedResourceContent.java
index 18b2b4c315..2038370437 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/EmbeddedResourceContent.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/EmbeddedResourceContent.java
@@ -42,7 +42,7 @@ public class EmbeddedResourceContent implements Content {
/**
* Sets the inline resource payload.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public EmbeddedResourceContent setResource(ResourceContents value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/GetPromptRequest.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/GetPromptRequest.java
index a72277d6a0..603bac1394 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/GetPromptRequest.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/GetPromptRequest.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.mcp;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.util.*;
import org.apache.juneau.marshall.*;
@@ -41,7 +43,7 @@ public class GetPromptRequest {
/**
* Sets the prompt name.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public GetPromptRequest setName(String value) {
@@ -55,13 +57,13 @@ public class GetPromptRequest {
* @return The arguments map, or {@code null} if not set.
*/
public Map<String, Object> getArguments() {
- return arguments;
+ return u(arguments);
}
/**
* Sets argument values.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public GetPromptRequest setArguments(Map<String, Object> value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/GetPromptResult.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/GetPromptResult.java
index 27b3e3caa9..bbda5ab018 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/GetPromptResult.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/GetPromptResult.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.mcp;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.util.*;
import org.apache.juneau.marshall.*;
@@ -41,7 +43,7 @@ public class GetPromptResult {
/**
* Sets the prompt description.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public GetPromptResult setDescription(String value) {
@@ -55,13 +57,13 @@ public class GetPromptResult {
* @return The messages list, or {@code null} if not set.
*/
public List<PromptMessage> getMessages() {
- return messages;
+ return u(messages);
}
/**
* Sets rendered messages.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public GetPromptResult setMessages(List<PromptMessage> value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ImageContent.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ImageContent.java
index 49e76cba03..4c371eae94 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ImageContent.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ImageContent.java
@@ -39,7 +39,7 @@ public class ImageContent implements Content {
/**
* Sets the base64 payload.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ImageContent setData(String value) {
@@ -59,7 +59,7 @@ public class ImageContent implements Content {
/**
* Sets the MIME type.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ImageContent setMimeType(String value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Implementation.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Implementation.java
index 7531a89e3b..cb032a281b 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Implementation.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Implementation.java
@@ -39,7 +39,7 @@ public class Implementation {
/**
* Sets the implementation name.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public Implementation setName(String value) {
@@ -59,7 +59,7 @@ public class Implementation {
/**
* Sets the implementation version.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public Implementation setVersion(String value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/InitializeRequest.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/InitializeRequest.java
index c69553c203..a836fa68cc 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/InitializeRequest.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/InitializeRequest.java
@@ -40,7 +40,7 @@ public class InitializeRequest {
/**
* Sets the client protocol revision.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public InitializeRequest setProtocolVersion(String value) {
@@ -60,7 +60,7 @@ public class InitializeRequest {
/**
* Sets client capabilities.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public InitializeRequest setCapabilities(ClientCapabilities value) {
@@ -80,7 +80,7 @@ public class InitializeRequest {
/**
* Sets client implementation metadata.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public InitializeRequest setClientInfo(Implementation value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/InitializeResult.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/InitializeResult.java
index 84dca99492..a0e230716b 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/InitializeResult.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/InitializeResult.java
@@ -41,7 +41,7 @@ public class InitializeResult {
/**
* Sets the negotiated protocol revision.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public InitializeResult setProtocolVersion(String value) {
@@ -61,7 +61,7 @@ public class InitializeResult {
/**
* Sets server capabilities.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public InitializeResult setCapabilities(ServerCapabilities value) {
@@ -81,7 +81,7 @@ public class InitializeResult {
/**
* Sets server implementation metadata.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public InitializeResult setServerInfo(Implementation value) {
@@ -101,7 +101,7 @@ public class InitializeResult {
/**
* Sets optional instructions.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public InitializeResult setInstructions(String value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcError.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcError.java
index 166b106ea6..38af45c257 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcError.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcError.java
@@ -60,7 +60,7 @@ public class JsonRpcError {
/**
* Sets the error message.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public JsonRpcError setMessage(String value) {
@@ -80,7 +80,7 @@ public class JsonRpcError {
/**
* Sets optional structured error data.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public JsonRpcError setData(Object value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcRequest.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcRequest.java
index b196369dd7..12cf0c1252 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcRequest.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcRequest.java
@@ -44,7 +44,7 @@ public class JsonRpcRequest {
/**
* Sets the JSON-RPC protocol version.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public JsonRpcRequest setJsonrpc(String value) {
@@ -64,7 +64,7 @@ public class JsonRpcRequest {
/**
* Sets the request id.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public JsonRpcRequest setId(Object value) {
@@ -84,7 +84,7 @@ public class JsonRpcRequest {
/**
* Sets the JSON-RPC method name.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public JsonRpcRequest setMethod(String value) {
@@ -104,7 +104,7 @@ public class JsonRpcRequest {
/**
* Sets method parameters.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public JsonRpcRequest setParams(Object value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcResponse.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcResponse.java
index e6bf3d3fb4..9bd222a48c 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcResponse.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcResponse.java
@@ -44,7 +44,7 @@ public class JsonRpcResponse {
/**
* Sets the JSON-RPC protocol version.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public JsonRpcResponse setJsonrpc(String value) {
@@ -64,7 +64,7 @@ public class JsonRpcResponse {
/**
* Sets the response id.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public JsonRpcResponse setId(Object value) {
@@ -84,7 +84,7 @@ public class JsonRpcResponse {
/**
* Sets the result payload.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public JsonRpcResponse setResult(Object value) {
@@ -104,7 +104,7 @@ public class JsonRpcResponse {
/**
* Sets the error payload.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public JsonRpcResponse setError(JsonRpcError value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonSchema.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonSchema.java
index 35151e3aa5..ecac181488 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonSchema.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonSchema.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.mcp;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.util.*;
import org.apache.juneau.commons.bean.*;
@@ -48,7 +50,7 @@ public class JsonSchema {
/**
* Sets the schema type keyword.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public JsonSchema setType(String value) {
@@ -62,13 +64,13 @@ public class JsonSchema {
* @return The properties map, or {@code null} if not set.
*/
public Map<String, JsonSchema> getProperties() {
- return properties;
+ return u(properties);
}
/**
* Sets object property schemas.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public JsonSchema setProperties(Map<String, JsonSchema> value) {
@@ -82,13 +84,13 @@ public class JsonSchema {
* @return The required list, or {@code null} if not set.
*/
public List<String> getRequired() {
- return required;
+ return u(required);
}
/**
* Sets required property names.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public JsonSchema setRequired(List<String> value) {
@@ -108,7 +110,7 @@ public class JsonSchema {
/**
* Sets {@code additionalProperties}.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public JsonSchema setAdditionalProperties(Object value) {
@@ -128,7 +130,7 @@ public class JsonSchema {
/**
* Sets array items schema.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public JsonSchema setItems(JsonSchema value) {
@@ -142,13 +144,13 @@ public class JsonSchema {
* @return The defs map, or {@code null} if not set.
*/
public Map<String, JsonSchema> getDefs() {
- return defs;
+ return u(defs);
}
/**
* Sets {@code $defs}.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public JsonSchema setDefs(Map<String, JsonSchema> value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListPromptsResult.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListPromptsResult.java
index db5d4f6535..412a3fa308 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListPromptsResult.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListPromptsResult.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.mcp;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.util.*;
import org.apache.juneau.marshall.*;
@@ -35,13 +37,13 @@ public class ListPromptsResult {
* @return The prompts list, or {@code null} if not set.
*/
public List<Prompt> getPrompts() {
- return prompts;
+ return u(prompts);
}
/**
* Sets the prompt descriptors.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ListPromptsResult setPrompts(List<Prompt> value) {
@@ -61,7 +63,7 @@ public class ListPromptsResult {
/**
* Sets the next cursor.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ListPromptsResult setNextCursor(String value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListResourcesResult.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListResourcesResult.java
index 2dfee3c19a..5d91db6ddf 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListResourcesResult.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListResourcesResult.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.mcp;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.util.*;
import org.apache.juneau.marshall.*;
@@ -35,13 +37,13 @@ public class ListResourcesResult {
* @return The resources list, or {@code null} if not set.
*/
public List<Resource> getResources() {
- return resources;
+ return u(resources);
}
/**
* Sets the resource descriptors.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ListResourcesResult setResources(List<Resource> value) {
@@ -61,7 +63,7 @@ public class ListResourcesResult {
/**
* Sets the next cursor.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ListResourcesResult setNextCursor(String value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListToolsResult.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListToolsResult.java
index f0df995397..62eef6c47b 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListToolsResult.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListToolsResult.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.mcp;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.util.*;
import org.apache.juneau.marshall.*;
@@ -35,13 +37,13 @@ public class ListToolsResult {
* @return The tools list, or {@code null} if not set.
*/
public List<Tool> getTools() {
- return tools;
+ return u(tools);
}
/**
* Sets the tool descriptors.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ListToolsResult setTools(List<Tool> value) {
@@ -61,7 +63,7 @@ public class ListToolsResult {
/**
* Sets the next cursor.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ListToolsResult setNextCursor(String value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/LoggingCapability.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/LoggingCapability.java
index 57c92df4dd..2c17ecf0ac 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/LoggingCapability.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/LoggingCapability.java
@@ -38,7 +38,7 @@ public class LoggingCapability {
/**
* Sets the default log level hint.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public LoggingCapability setLevel(String value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/McpException.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/McpException.java
index c526bace36..227aaddafd 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/McpException.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/McpException.java
@@ -35,7 +35,7 @@ import org.apache.juneau.marshall.*;
* Constructor.
*
* @param code JSON-RPC error code.
- * @param message Error message.
+ * @param message Error message. Can be <jk>null</jk>.
*/
public McpException(int code, String message) {
super(message);
@@ -46,8 +46,8 @@ import org.apache.juneau.marshall.*;
* Constructor.
*
* @param code JSON-RPC error code.
- * @param message Error message.
- * @param data Optional structured error data.
+ * @param message Error message. Can be <jk>null</jk>.
+ * @param data Optional structured error data. Can be <jk>null</jk>.
*/
public McpException(int code, String message, Object data) {
super(message);
@@ -87,7 +87,7 @@ import org.apache.juneau.marshall.*;
/**
* Sets optional structured error data.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public McpException setData(Object value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Prompt.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Prompt.java
index 76ae1aee35..e94f0fdeee 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Prompt.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Prompt.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.mcp;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.util.*;
import org.apache.juneau.marshall.*;
@@ -42,7 +44,7 @@ public class Prompt {
/**
* Sets the prompt name.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public Prompt setName(String value) {
@@ -62,7 +64,7 @@ public class Prompt {
/**
* Sets the description.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public Prompt setDescription(String value) {
@@ -76,13 +78,13 @@ public class Prompt {
* @return The arguments list, or {@code null} if not set.
*/
public List<PromptArgument> getArguments() {
- return arguments;
+ return u(arguments);
}
/**
* Sets declared arguments.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public Prompt setArguments(List<PromptArgument> value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptArgument.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptArgument.java
index 86738513a0..eec4a23431 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptArgument.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptArgument.java
@@ -40,7 +40,7 @@ public class PromptArgument {
/**
* Sets the argument name.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public PromptArgument setName(String value) {
@@ -60,7 +60,7 @@ public class PromptArgument {
/**
* Sets the description.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public PromptArgument setDescription(String value) {
@@ -80,7 +80,7 @@ public class PromptArgument {
/**
* Sets the required flag.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public PromptArgument setRequired(Boolean value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptCapability.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptCapability.java
index 48cd68f9ca..8215267741 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptCapability.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptCapability.java
@@ -38,7 +38,7 @@ public class PromptCapability {
/**
* Sets the list-changed flag.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public PromptCapability setListChanged(Boolean value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptMessage.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptMessage.java
index 1900a674ae..f78da1f2ce 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptMessage.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptMessage.java
@@ -39,7 +39,7 @@ public class PromptMessage {
/**
* Sets the message role.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public PromptMessage setRole(Role value) {
@@ -59,7 +59,7 @@ public class PromptMessage {
/**
* Sets the message content.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public PromptMessage setContent(Content value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ReadResourceRequest.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ReadResourceRequest.java
index 6e38aeae37..6ac27059ae 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ReadResourceRequest.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ReadResourceRequest.java
@@ -38,7 +38,7 @@ public class ReadResourceRequest {
/**
* Sets the resource URI.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ReadResourceRequest setUri(String value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ReadResourceResult.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ReadResourceResult.java
index 86b48b6c19..191a48f0d4 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ReadResourceResult.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ReadResourceResult.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.mcp;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.util.*;
import org.apache.juneau.marshall.*;
@@ -34,13 +36,13 @@ public class ReadResourceResult {
* @return The contents list, or {@code null} if not set.
*/
public List<ResourceContents> getContents() {
- return contents;
+ return u(contents);
}
/**
* Sets resource bodies.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ReadResourceResult setContents(List<ResourceContents> value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Resource.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Resource.java
index a8443fd86e..e4aa749eed 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Resource.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Resource.java
@@ -43,7 +43,7 @@ public class Resource {
/**
* Sets the resource URI.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public Resource setUri(String value) {
@@ -63,7 +63,7 @@ public class Resource {
/**
* Sets the short name.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public Resource setName(String value) {
@@ -83,7 +83,7 @@ public class Resource {
/**
* Sets the title.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public Resource setTitle(String value) {
@@ -103,7 +103,7 @@ public class Resource {
/**
* Sets the description.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public Resource setDescription(String value) {
@@ -123,7 +123,7 @@ public class Resource {
/**
* Sets the MIME type.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public Resource setMimeType(String value) {
@@ -143,7 +143,7 @@ public class Resource {
/**
* Sets the size hint.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public Resource setSize(Long value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ResourceCapability.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ResourceCapability.java
index ff1d1db8dd..d666699742 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ResourceCapability.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ResourceCapability.java
@@ -39,7 +39,7 @@ public class ResourceCapability {
/**
* Sets the list-changed flag.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ResourceCapability setListChanged(Boolean value) {
@@ -59,7 +59,7 @@ public class ResourceCapability {
/**
* Sets the subscribe flag.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ResourceCapability setSubscribe(Boolean value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/RootsCapability.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/RootsCapability.java
index ff9a16629e..3d92d93d1d 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/RootsCapability.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/RootsCapability.java
@@ -38,7 +38,7 @@ public class RootsCapability {
/**
* Sets the list-changed flag.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public RootsCapability setListChanged(Boolean value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ServerCapabilities.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ServerCapabilities.java
index 9901dd15b4..e62b872ead 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ServerCapabilities.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ServerCapabilities.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.mcp;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.util.*;
import org.apache.juneau.marshall.*;
@@ -44,7 +46,7 @@ public class ServerCapabilities {
/**
* Sets tools capability.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ServerCapabilities setTools(ToolCapability value) {
@@ -64,7 +66,7 @@ public class ServerCapabilities {
/**
* Sets prompts capability.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ServerCapabilities setPrompts(PromptCapability value) {
@@ -84,7 +86,7 @@ public class ServerCapabilities {
/**
* Sets resources capability.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ServerCapabilities setResources(ResourceCapability value) {
@@ -104,7 +106,7 @@ public class ServerCapabilities {
/**
* Sets logging capability.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ServerCapabilities setLogging(LoggingCapability value) {
@@ -118,13 +120,13 @@ public class ServerCapabilities {
* @return The experimental map, or {@code null} if not set.
*/
public Map<String, Object> getExperimental() {
- return experimental;
+ return u(experimental);
}
/**
* Sets experimental extensions.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ServerCapabilities setExperimental(Map<String, Object> value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/TextContent.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/TextContent.java
index 5d5a66e107..23ce1d38b6 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/TextContent.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/TextContent.java
@@ -38,7 +38,7 @@ public class TextContent implements Content {
/**
* Sets the text payload.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public TextContent setText(String value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/TextResourceContents.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/TextResourceContents.java
index 95e045be0c..7e2f560fee 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/TextResourceContents.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/TextResourceContents.java
@@ -44,7 +44,7 @@ public class TextResourceContents implements ResourceContents {
/**
* Sets the resource URI.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public TextResourceContents setUri(String value) {
@@ -64,7 +64,7 @@ public class TextResourceContents implements ResourceContents {
/**
* Sets the MIME type.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public TextResourceContents setMimeType(String value) {
@@ -84,7 +84,7 @@ public class TextResourceContents implements ResourceContents {
/**
* Sets the text body.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public TextResourceContents setText(String value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Tool.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Tool.java
index 883a6991ae..6d955a2ffa 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Tool.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Tool.java
@@ -40,7 +40,7 @@ public class Tool {
/**
* Sets the tool name.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public Tool setName(String value) {
@@ -60,7 +60,7 @@ public class Tool {
/**
* Sets the description.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public Tool setDescription(String value) {
@@ -80,7 +80,7 @@ public class Tool {
/**
* Sets the input schema.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public Tool setInputSchema(JsonSchema value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ToolCapability.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ToolCapability.java
index e9d7657da0..f45ecd6725 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ToolCapability.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ToolCapability.java
@@ -38,7 +38,7 @@ public class ToolCapability {
/**
* Sets the list-changed flag.
*
- * @param value The new value.
+ * @param value The new value. Can be <jk>null</jk> to unset the property.
* @return This object (for method chaining).
*/
public ToolCapability setListChanged(Boolean value) {
diff --git a/juneau-bean/juneau-bean-mcp/src/test/java/org/apache/juneau/bean/mcp/JsonSchema_Finiteness_Test.java b/juneau-bean/juneau-bean-mcp/src/test/java/org/apache/juneau/bean/mcp/JsonSchema_Finiteness_Test.java
new file mode 100644
index 0000000000..61dd07d5ce
--- /dev/null
+++ b/juneau-bean/juneau-bean-mcp/src/test/java/org/apache/juneau/bean/mcp/JsonSchema_Finiteness_Test.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.juneau.bean.mcp;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.util.*;
+
+import org.apache.juneau.marshall.json.*;
+import org.junit.jupiter.api.*;
+
+/**
+ * Finiteness-invariant tests for the self-referential {@link JsonSchema} bean.
+ *
+ * <p>
+ * {@link JsonSchema} is self-referential ({@code items} → {@code JsonSchema}; {@code properties}/{@code $defs}
+ * are {@code Map<String,JsonSchema>}; {@code additionalProperties} is an opaque {@code Object}). The MCP wire
+ * contract treats it as an <b>acyclic-by-wire DAG</b>: schemas are assembled bottom-up (each child is fully
+ * built before it is attached to a parent), so there is no supported way to manufacture a cycle over the wire.
+ * These tests pin that invariant — {@code toString()} and JSON serialization over a deeply-nested schema
+ * terminate finitely (no depth blow-up / infinite recursion). Mirrors the {@code juneau-marshall} TODO-253
+ * {@code HttpPartSchema} deep-nesting finiteness anchor.
+ */
+class JsonSchema_Finiteness_Test {
+
+ @Test void a01_deepItemsNesting_toStringAndSerializeFinite() {
+ var depth = 100;
+
+ // Build an acyclic 'items' chain bottom-up: leaf is a string, each level wraps the previous in an array.
+ var node = new JsonSchema().setType("string");
+ for (var i = 0; i < depth; i++)
+ node = new JsonSchema().setType("array").setItems(node);
+ var root = node;
+
+ var str = assertDoesNotThrow(root::toString);
+ assertNotNull(str);
+ assertFalse(str.isEmpty());
+
+ var json = assertDoesNotThrow(() -> JsonSerializer.DEFAULT.serialize(root));
+ assertNotNull(json);
+ assertTrue(json.length() < 1_000_000, () -> "Output should be finite: length=" + json.length());
+ }
+
+ @Test void a02_deepPropertyNesting_serializeFinite() {
+ var depth = 100;
+
+ // Build an acyclic 'properties' chain bottom-up (each level nests the previous under a single key).
+ var node = new JsonSchema().setType("object");
+ for (var i = 0; i < depth; i++) {
+ var child = node;
+ var next = new JsonSchema().setType("object");
+ next.setProperties(new LinkedHashMap<>(Map.of("child", child)));
+ node = next;
+ }
+ var root = node;
+
+ var json = assertDoesNotThrow(() -> JsonSerializer.DEFAULT.serialize(root));
+ assertNotNull(json);
+ assertTrue(json.length() < 5_000_000, () -> "Output should be finite: length=" + json.length());
+ }
+}
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Callback.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Callback.java
index 839e4d1cc7..6a074c402b 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Callback.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Callback.java
@@ -17,7 +17,6 @@
package org.apache.juneau.bean.openapi3;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
-import static org.apache.juneau.commons.utils.CollectionUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -97,7 +96,7 @@ public class Callback extends OpenApiElement {
*/
public Callback(Callback copyFrom) {
super(copyFrom);
- this.callbacks = copyOf(copyFrom.callbacks);
+ this.callbacks = cp(copyFrom.callbacks);
}
/**
@@ -139,7 +138,7 @@ public class Callback extends OpenApiElement {
*
* @return The callbacks map.
*/
- public Map<String,PathItem> getCallbacks() { return callbacks; }
+ public Map<String,PathItem> getCallbacks() { return u(callbacks); }
@Override /* Overridden from OpenApiElement */
public Set<String> keySet() {
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Components.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Components.java
index 7ada0183ab..165267d26a 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Components.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Components.java
@@ -17,7 +17,6 @@
package org.apache.juneau.bean.openapi3;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
-import static org.apache.juneau.commons.utils.CollectionUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -123,15 +122,15 @@ public class Components extends OpenApiElement {
*/
public Components(Components copyFrom) {
super(copyFrom);
- this.schemas = copyOf(copyFrom.schemas);
- this.responses = copyOf(copyFrom.responses);
- this.parameters = copyOf(copyFrom.parameters);
- this.examples = copyOf(copyFrom.examples);
- this.requestBodies = copyOf(copyFrom.requestBodies);
- this.headers = copyOf(copyFrom.headers);
- this.securitySchemes = copyOf(copyFrom.securitySchemes);
- this.links = copyOf(copyFrom.links);
- this.callbacks = copyOf(copyFrom.callbacks);
+ this.schemas = cp(copyFrom.schemas);
+ this.responses = cp(copyFrom.responses);
+ this.parameters = cp(copyFrom.parameters);
+ this.examples = cp(copyFrom.examples);
+ this.requestBodies = cp(copyFrom.requestBodies);
+ this.headers = cp(copyFrom.headers);
+ this.securitySchemes = cp(copyFrom.securitySchemes);
+ this.links = cp(copyFrom.links);
+ this.callbacks = cp(copyFrom.callbacks);
}
/**
@@ -165,63 +164,63 @@ public class Components extends OpenApiElement {
*
* @return The callbacks map.
*/
- public Map<String,Callback> getCallbacks() { return callbacks; }
+ public Map<String,Callback> getCallbacks() { return u(callbacks); }
/**
* Returns the examples map.
*
* @return The examples map.
*/
- public Map<String,Example> getExamples() { return examples; }
+ public Map<String,Example> getExamples() { return u(examples); }
/**
* Returns the headers map.
*
* @return The headers map.
*/
- public Map<String,HeaderInfo> getHeaders() { return headers; }
+ public Map<String,HeaderInfo> getHeaders() { return u(headers); }
/**
* Returns the links map.
*
* @return The links map.
*/
- public Map<String,Link> getLinks() { return links; }
+ public Map<String,Link> getLinks() { return u(links); }
/**
* Returns the parameters map.
*
* @return The parameters map.
*/
- public Map<String,Parameter> getParameters() { return parameters; }
+ public Map<String,Parameter> getParameters() { return u(parameters); }
/**
* Returns the request bodies map.
*
* @return The request bodies map.
*/
- public Map<String,RequestBodyInfo> getRequestBodies() { return requestBodies; }
+ public Map<String,RequestBodyInfo> getRequestBodies() { return u(requestBodies); }
/**
* Returns the responses map.
*
* @return The responses map.
*/
- public Map<String,Response> getResponses() { return responses; }
+ public Map<String,Response> getResponses() { return u(responses); }
/**
* Returns the schemas map.
*
* @return The schemas map.
*/
- public Map<String,SchemaInfo> getSchemas() { return schemas; }
+ public Map<String,SchemaInfo> getSchemas() { return u(schemas); }
/**
* Returns the security schemes map.
*
* @return The security schemes map.
*/
- public Map<String,SecuritySchemeInfo> getSecuritySchemes() { return securitySchemes; }
+ public Map<String,SecuritySchemeInfo> getSecuritySchemes() { return u(securitySchemes); }
@Override /* Overridden from OpenApiElement */
public Set<String> keySet() {
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Discriminator.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Discriminator.java
index e41b15326f..f59651f6bf 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Discriminator.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Discriminator.java
@@ -103,7 +103,7 @@ public class Discriminator extends OpenApiElement {
super(copyFrom);
this.propertyName = copyFrom.propertyName;
- this.mapping = copyOf(copyFrom.mapping);
+ this.mapping = cp(copyFrom.mapping);
}
/**
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Encoding.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Encoding.java
index 12062a001e..1cbc108c35 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Encoding.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Encoding.java
@@ -114,7 +114,7 @@ public class Encoding extends OpenApiElement {
this.style = copyFrom.style;
this.explode = copyFrom.explode;
this.allowReserved = copyFrom.allowReserved;
- headers.putAll(copyOf(copyFrom.headers, HeaderInfo::copy));
+ headers.putAll(cp(copyFrom.headers, HeaderInfo::copy));
}
/**
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/HeaderInfo.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/HeaderInfo.java
index 3d4f3ee725..24d4d481b6 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/HeaderInfo.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/HeaderInfo.java
@@ -18,6 +18,7 @@ package org.apache.juneau.bean.openapi3;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.bean.openapi3.OpenApiCopyUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -124,7 +125,7 @@ public class HeaderInfo extends OpenApiElement {
this.description = copyFrom.description;
this.example = copyFrom.example;
this.allowEmptyValue = copyFrom.allowEmptyValue;
- this.schema = copyFrom.schema;
+ this.schema = copyOf(copyFrom.schema);
this.allowReserved = copyFrom.allowReserved;
this.required = copyFrom.required;
this.ref = copyFrom.ref;
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Info.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Info.java
index d0fcda87e1..ceeddac2c3 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Info.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Info.java
@@ -19,6 +19,7 @@ package org.apache.juneau.bean.openapi3;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
+import static org.apache.juneau.bean.openapi3.OpenApiCopyUtils.*;
import java.util.*;
@@ -137,8 +138,8 @@ public class Info extends OpenApiElement {
this.description = copyFrom.description;
this.termsOfService = copyFrom.termsOfService;
this.version = copyFrom.version;
- this.contact = copyFrom.contact == null ? null : copyFrom.contact.copy();
- this.license = copyFrom.license == null ? null : copyFrom.license.copy();
+ this.contact = copyOf(copyFrom.contact);
+ this.license = copyOf(copyFrom.license);
}
/**
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Items.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Items.java
index c854b503b7..6b8289886a 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Items.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Items.java
@@ -18,6 +18,7 @@ package org.apache.juneau.bean.openapi3;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.bean.openapi3.OpenApiCopyUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.contains;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.commons.utils.StringUtils.*;
@@ -160,7 +161,7 @@ public class Items extends OpenApiElement {
this.exclusiveMaximum = copyFrom.exclusiveMaximum;
this.exclusiveMinimum = copyFrom.exclusiveMinimum;
this.uniqueItems = copyFrom.uniqueItems;
- this.items = copyFrom.items == null ? null : copyFrom.items.copy();
+ this.items = copyOf(copyFrom.items);
this.default_ = copyFrom.default_;
this.enum_.addAll(copyOf(copyFrom.enum_));
this.ref = copyFrom.ref;
@@ -778,8 +779,8 @@ public class Items extends OpenApiElement {
/* Resolve references in extra attributes */
private Object resolveRefs(Object o, OpenApi openApi, Deque<String> refStack, int maxDepth) {
- if (o instanceof MarshalledMap mm) {
- var ref2 = mm.get("$ref");
+ if (o instanceof MarshalledMap o2) {
+ var ref2 = o2.get("$ref");
if (ref2 instanceof CharSequence) {
var sref = ref2.toString();
if (refStack.contains(sref) || refStack.size() >= maxDepth)
@@ -790,11 +791,11 @@ public class Items extends OpenApiElement {
refStack.removeLast();
return o3;
}
- for (var e : mm.entrySet())
+ for (var e : o2.entrySet())
e.setValue(resolveRefs(e.getValue(), openApi, refStack, maxDepth));
}
- if (o instanceof MarshalledList ml)
- for (var li = ml.listIterator(); li.hasNext();)
+ if (o instanceof MarshalledList o2)
+ for (var li = o2.listIterator(); li.hasNext();)
li.set(resolveRefs(li.next(), openApi, refStack, maxDepth));
return o;
}
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Link.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Link.java
index 8a0b4c9d47..c3fe3e371d 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Link.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Link.java
@@ -18,6 +18,7 @@ package org.apache.juneau.bean.openapi3;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.bean.openapi3.OpenApiCopyUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -104,7 +105,7 @@ public class Link extends OpenApiElement {
this.description = copyFrom.description;
this.operationId = copyFrom.operationId;
this.requestBody = copyFrom.requestBody;
- this.server = copyFrom.server == null ? null : copyFrom.server.copy();
+ this.server = copyOf(copyFrom.server);
parameters.putAll(copyFrom.parameters);
}
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/MediaType.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/MediaType.java
index 0047af6e20..26cc7141c7 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/MediaType.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/MediaType.java
@@ -18,6 +18,7 @@ package org.apache.juneau.bean.openapi3;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.bean.openapi3.OpenApiCopyUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -104,7 +105,7 @@ public class MediaType extends OpenApiElement {
public MediaType(MediaType copyFrom) {
super(copyFrom);
- this.schema = copyFrom.schema;
+ this.schema = copyOf(copyFrom.schema);
this.example = copyFrom.example;
examples.putAll(copyOf(copyFrom.examples, Example::copy));
encoding.putAll(copyOf(copyFrom.encoding, Encoding::copy));
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OAuthFlows.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OAuthFlows.java
index e2caf2b262..e373df707b 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OAuthFlows.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OAuthFlows.java
@@ -19,6 +19,7 @@ package org.apache.juneau.bean.openapi3;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
+import static org.apache.juneau.bean.openapi3.OpenApiCopyUtils.*;
import java.util.*;
@@ -104,10 +105,10 @@ public class OAuthFlows extends OpenApiElement {
public OAuthFlows(OAuthFlows copyFrom) {
super(copyFrom);
- this.implicit = copyFrom.implicit;
- this.password = copyFrom.password;
- this.clientCredentials = copyFrom.clientCredentials;
- this.authorizationCode = copyFrom.authorizationCode;
+ this.implicit = copyOf(copyFrom.implicit);
+ this.password = copyOf(copyFrom.password);
+ this.clientCredentials = copyOf(copyFrom.clientCredentials);
+ this.authorizationCode = copyOf(copyFrom.authorizationCode);
}
/**
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OpenApi.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OpenApi.java
index 7e91cf5b8a..7656e33018 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OpenApi.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OpenApi.java
@@ -18,6 +18,7 @@ package org.apache.juneau.bean.openapi3;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.bean.openapi3.OpenApiCopyUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -126,13 +127,13 @@ public class OpenApi extends OpenApiElement {
public OpenApi(OpenApi copyFrom) {
super(copyFrom);
this.openapi = copyFrom.openapi;
- this.info = copyFrom.info;
+ this.info = copyOf(copyFrom.info);
this.servers.addAll(copyOf(copyFrom.servers, Server::copy));
this.paths = copyOf(copyFrom.paths);
- this.components = copyFrom.components;
+ this.components = copyOf(copyFrom.components);
this.security.addAll(copyOf(copyFrom.security, SecurityRequirement::copy));
this.tags.addAll(copyOf(copyFrom.tags, Tag::copy));
- this.externalDocs = copyFrom.externalDocs;
+ this.externalDocs = copyOf(copyFrom.externalDocs);
}
/**
@@ -147,7 +148,7 @@ public class OpenApi extends OpenApiElement {
assertArgNotNull(ARG_pathItem, pathItem);
if (paths == null)
paths = new TreeMap<>(PATH_COMPARATOR);
- getPaths().put(path, pathItem);
+ paths.put(path, pathItem);
return this;
}
@@ -332,7 +333,7 @@ public class OpenApi extends OpenApiElement {
*
* @return The paths map.
*/
- public Map<String,PathItem> getPaths() { return paths; }
+ public Map<String,PathItem> getPaths() { return u(paths); }
/**
* Returns the security requirements list.
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OpenApiCopyUtils.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OpenApiCopyUtils.java
new file mode 100644
index 0000000000..d0382b0013
--- /dev/null
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OpenApiCopyUtils.java
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.juneau.bean.openapi3;
+
+import org.apache.juneau.commons.utils.*;
+
+/**
+ * Copy utilities for the OpenAPI 3.0 bean module.
+ *
+ * <p>
+ * Extends {@link CopyUtils} so that a single static-import-on-demand of this class
+ * (<c>import static org.apache.juneau.bean.openapi3.OpenApiCopyUtils.*;</c>) brings in both the inherited
+ * collection/map/array <c>copyOf(...)</c> overloads <b>and</b> the OpenAPI bean <c>copyOf(<BeanType>)</c>
+ * overloads declared here, resolved via ordinary Java overload resolution.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='jc'>{@link CopyUtils}
+ * </ul>
+ */
+public class OpenApiCopyUtils extends CopyUtils {
+
+ /** Constructor. */
+ protected OpenApiCopyUtils() {}
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static Components copyOf(Components value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static Contact copyOf(Contact value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static Discriminator copyOf(Discriminator value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static ExternalDocumentation copyOf(ExternalDocumentation value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static Info copyOf(Info value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static Items copyOf(Items value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static License copyOf(License value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static OAuthFlow copyOf(OAuthFlow value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static Operation copyOf(Operation value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static RequestBodyInfo copyOf(RequestBodyInfo value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static SchemaInfo copyOf(SchemaInfo value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static Server copyOf(Server value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static Xml copyOf(Xml value) {
+ return value == null ? null : value.copy();
+ }
+}
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OpenApiElement.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OpenApiElement.java
index 08e3f2046a..668630d4b3 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OpenApiElement.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OpenApiElement.java
@@ -47,7 +47,7 @@ public abstract class OpenApiElement {
OpenApiElement(OpenApiElement copyFrom) {
this.strict = copyFrom.strict;
- this.extra = copyOf(copyFrom.extra);
+ this.extra = cp(copyFrom.extra);
}
/**
@@ -74,7 +74,7 @@ public abstract class OpenApiElement {
*/
@BeanProp("*")
public Set<String> extraKeys() {
- return extra == null ? Collections.emptySet() : extra.keySet();
+ return extra == null ? Collections.emptySet() : u(extra.keySet());
}
/**
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Operation.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Operation.java
index 670cd44d72..1a6834bb37 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Operation.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Operation.java
@@ -18,6 +18,7 @@ package org.apache.juneau.bean.openapi3;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.bean.openapi3.OpenApiCopyUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -146,9 +147,9 @@ public class Operation extends OpenApiElement {
this.summary = copyFrom.summary;
this.description = copyFrom.description;
this.operationId = copyFrom.operationId;
- this.externalDocs = copyFrom.externalDocs;
+ this.externalDocs = copyOf(copyFrom.externalDocs);
parameters.addAll(copyOf(copyFrom.parameters, Parameter::copy));
- this.requestBody = copyFrom.requestBody;
+ this.requestBody = copyOf(copyFrom.requestBody);
responses.putAll(copyFrom.responses);
callbacks.putAll(copyFrom.callbacks);
this.deprecated = copyFrom.deprecated;
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Parameter.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Parameter.java
index 8326935d5f..88bfb28649 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Parameter.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Parameter.java
@@ -18,6 +18,7 @@ package org.apache.juneau.bean.openapi3;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.bean.openapi3.OpenApiCopyUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -136,7 +137,7 @@ public class Parameter extends OpenApiElement {
this.allowEmptyValue = copyFrom.allowEmptyValue;
this.explode = copyFrom.explode;
this.allowReserved = copyFrom.allowReserved;
- this.schema = copyFrom.schema;
+ this.schema = copyOf(copyFrom.schema);
this.example = copyFrom.example;
this.examples = copyOf(copyFrom.examples);
}
@@ -210,7 +211,7 @@ public class Parameter extends OpenApiElement {
*
* @return The examples map.
*/
- public Map<String,Example> getExamples() { return examples; }
+ public Map<String,Example> getExamples() { return u(examples); }
/**
* Returns the explode flag.
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/PathItem.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/PathItem.java
index c9d9d16a0e..81e29d7bc4 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/PathItem.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/PathItem.java
@@ -17,7 +17,7 @@
package org.apache.juneau.bean.openapi3;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
-import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.bean.openapi3.OpenApiCopyUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -129,14 +129,14 @@ public class PathItem extends OpenApiElement {
super(copyFrom);
this.summary = copyFrom.summary;
this.description = copyFrom.description;
- this.get = copyFrom.get;
- this.put = copyFrom.put;
- this.post = copyFrom.post;
- this.delete = copyFrom.delete;
- this.options = copyFrom.options;
- this.head = copyFrom.head;
- this.patch = copyFrom.patch;
- this.trace = copyFrom.trace;
+ this.get = copyOf(copyFrom.get);
+ this.put = copyOf(copyFrom.put);
+ this.post = copyOf(copyFrom.post);
+ this.delete = copyOf(copyFrom.delete);
+ this.options = copyOf(copyFrom.options);
+ this.head = copyOf(copyFrom.head);
+ this.patch = copyOf(copyFrom.patch);
+ this.trace = copyOf(copyFrom.trace);
this.servers = copyOf(copyFrom.servers);
this.parameters = copyOf(copyFrom.parameters);
}
@@ -210,7 +210,7 @@ public class PathItem extends OpenApiElement {
*
* @return The parameters list.
*/
- public List<Parameter> getParameters() { return parameters; }
+ public List<Parameter> getParameters() { return u(parameters); }
/**
* Returns the PATCH operation.
@@ -238,7 +238,7 @@ public class PathItem extends OpenApiElement {
*
* @return The servers list.
*/
- public List<Server> getServers() { return servers; }
+ public List<Server> getServers() { return u(servers); }
/**
* Returns the summary.
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/RequestBodyInfo.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/RequestBodyInfo.java
index 8f9b1f0ce6..a747fe93f6 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/RequestBodyInfo.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/RequestBodyInfo.java
@@ -99,7 +99,7 @@ public class RequestBodyInfo extends OpenApiElement {
this.description = copyFrom.description;
this.required = copyFrom.required;
- content.putAll(copyOf(copyFrom.content, MediaType::copy));
+ content.putAll(cp(copyFrom.content, MediaType::copy));
}
/**
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Response.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Response.java
index 9f0d575c77..4d1877cb99 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Response.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Response.java
@@ -112,9 +112,9 @@ public class Response extends OpenApiElement {
super(copyFrom);
this.description = copyFrom.description;
- headers.putAll(copyOf(copyFrom.headers, HeaderInfo::copy));
- content.putAll(copyOf(copyFrom.content, MediaType::copy));
- links.putAll(copyOf(copyFrom.links, Link::copy));
+ headers.putAll(cp(copyFrom.headers, HeaderInfo::copy));
+ content.putAll(cp(copyFrom.content, MediaType::copy));
+ links.putAll(cp(copyFrom.links, Link::copy));
}
/**
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/SchemaInfo.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/SchemaInfo.java
index 3268083c02..e9b6058c3c 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/SchemaInfo.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/SchemaInfo.java
@@ -18,6 +18,7 @@ package org.apache.juneau.bean.openapi3;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.bean.openapi3.OpenApiCopyUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -202,7 +203,7 @@ public class SchemaInfo extends OpenApiElement {
this.deprecated = copyFrom.deprecated;
this.pattern = copyFrom.pattern;
this.type = copyFrom.type;
- this.discriminator = copyFrom.discriminator;
+ this.discriminator = copyOf(copyFrom.discriminator);
this.multipleOf = copyFrom.multipleOf;
this.maximum = copyFrom.maximum;
this.minimum = copyFrom.minimum;
@@ -218,17 +219,17 @@ public class SchemaInfo extends OpenApiElement {
this.readOnly = copyFrom.readOnly;
this.default_ = copyFrom.default_;
this.example = copyFrom.example;
- this.items = copyFrom.items == null ? null : copyFrom.items.copy();
- this.xml = copyFrom.xml == null ? null : copyFrom.xml.copy();
- this.externalDocs = copyFrom.externalDocs == null ? null : copyFrom.externalDocs.copy();
+ this.items = copyOf(copyFrom.items);
+ this.xml = copyOf(copyFrom.xml);
+ this.externalDocs = copyOf(copyFrom.externalDocs);
enum_.addAll(copyFrom.enum_);
allOf.addAll(copyFrom.allOf);
required.addAll(copyFrom.required);
anyOf.addAll(copyFrom.anyOf);
oneOf.addAll(copyFrom.oneOf);
this.properties = copyOf(copyFrom.properties, SchemaInfo::copy);
- this.additionalProperties = copyFrom.additionalProperties == null ? null : copyFrom.additionalProperties.copy();
- this.not = copyFrom.not == null ? null : copyFrom.not.copy();
+ this.additionalProperties = copyOf(copyFrom.additionalProperties);
+ this.not = copyOf(copyFrom.not);
}
/**
@@ -637,7 +638,7 @@ public class SchemaInfo extends OpenApiElement {
*
* @return The property value, or <jk>null</jk> if it is not set.
*/
- public Map<String,SchemaInfo> getProperties() { return properties; }
+ public Map<String,SchemaInfo> getProperties() { return u(properties); }
/**
* Bean property getter: <property>readOnly</property>.
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/SecurityRequirement.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/SecurityRequirement.java
index e864806f4e..bfb0cef318 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/SecurityRequirement.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/SecurityRequirement.java
@@ -17,7 +17,6 @@
package org.apache.juneau.bean.openapi3;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
-import static org.apache.juneau.commons.utils.CollectionUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -60,7 +59,7 @@ public class SecurityRequirement extends OpenApiElement {
*/
public SecurityRequirement(SecurityRequirement copyFrom) {
super(copyFrom);
- this.requirements = copyOf(copyFrom.requirements);
+ this.requirements = cp(copyFrom.requirements);
}
/**
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/SecuritySchemeInfo.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/SecuritySchemeInfo.java
index 7210e707d7..2f25dd3883 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/SecuritySchemeInfo.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/SecuritySchemeInfo.java
@@ -18,6 +18,7 @@ package org.apache.juneau.bean.openapi3;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.bean.openapi3.OpenApiCopyUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.contains;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.commons.utils.StringUtils.*;
@@ -136,7 +137,7 @@ public class SecuritySchemeInfo extends OpenApiElement {
this.scheme = copyFrom.scheme;
this.bearerFormat = copyFrom.bearerFormat;
this.openIdConnectUrl = copyFrom.openIdConnectUrl;
- this.flows = copyFrom.flows;
+ this.flows = copyOf(copyFrom.flows);
}
/**
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Server.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Server.java
index b327e01072..bf43bfdef6 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Server.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Server.java
@@ -105,7 +105,7 @@ public class Server extends OpenApiElement {
this.url = copyFrom.url;
this.description = copyFrom.description;
- variables.putAll(copyOf(copyFrom.variables, ServerVariable::copy));
+ variables.putAll(cp(copyFrom.variables, ServerVariable::copy));
}
/**
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/ServerVariable.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/ServerVariable.java
index 24aca533d3..ceba4dd289 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/ServerVariable.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/ServerVariable.java
@@ -99,7 +99,7 @@ public class ServerVariable extends OpenApiElement {
public ServerVariable(ServerVariable copyFrom) {
super(copyFrom);
- this.enum_.addAll(copyOf(copyFrom.enum_));
+ this.enum_.addAll(cp(copyFrom.enum_));
this.default_ = copyFrom.default_;
this.description = copyFrom.description;
}
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Tag.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Tag.java
index 7107905d61..1b98c41678 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Tag.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Tag.java
@@ -19,6 +19,7 @@ package org.apache.juneau.bean.openapi3;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
+import static org.apache.juneau.bean.openapi3.OpenApiCopyUtils.*;
import java.util.*;
@@ -100,7 +101,7 @@ public class Tag extends OpenApiElement {
this.name = copyFrom.name;
this.description = copyFrom.description;
- this.externalDocs = copyFrom.externalDocs == null ? null : copyFrom.externalDocs.copy();
+ this.externalDocs = copyOf(copyFrom.externalDocs);
}
/**
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/ui/OpenApiUI.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/ui/OpenApiUI.java
index 1f6fce753a..fe81c65eb5 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/ui/OpenApiUI.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/ui/OpenApiUI.java
@@ -254,7 +254,7 @@ public class OpenApiUI extends ObjectSwap<OpenApi,Div> {
private static Div opBlock(Session s, String path, String opName, Operation op) {
boolean deprecated = isTrue(op.getDeprecated());
- var opClass = deprecated ? "deprecated" : opName.toLowerCase();
+ var opClass = deprecated ? "deprecated" : lcr(opName);
if (! deprecated && ! STANDARD_METHODS.contains(opClass)) // HTT - opBlock only called with standard method names; custom method branch unreachable
opClass = "other";
@@ -262,7 +262,7 @@ public class OpenApiUI extends ObjectSwap<OpenApi,Div> {
}
private static HtmlElement opBlockSummary(String path, String opName, Operation op) {
- return div().class_("op-block-summary").onclick("toggleOpBlock(this)").children(span(opName.toUpperCase()).class_("method-button"), span(path).class_("path"),
+ return div().class_("op-block-summary").onclick("toggleOpBlock(this)").children(span(ucr(opName)).class_("method-button"), span(path).class_("path"),
nn(op.getSummary()) ? span(op.getSummary()).class_("summary") : null);
}
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/ui/RedocUI.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/ui/RedocUI.java
index 64c6c3c5ad..022680c3be 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/ui/RedocUI.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/ui/RedocUI.java
@@ -110,9 +110,9 @@ public class RedocUI extends ObjectSwap<OpenApi,Div> {
private static void appendOperation(Ul ul, String path, String verb, Operation op) {
if (op == null)
return;
- var anchor = "op-" + verb.toLowerCase() + "-" + path.replaceAll("[^A-Za-z0-9]", "_");
+ var anchor = "op-" + lcr(verb) + "-" + path.replaceAll("[^A-Za-z0-9]", "_");
var label = nn(op.getSummary()) ? op.getSummary() : verb + " " + path;
- ul.child(li(span(verb).class_("redoc-method redoc-method-" + verb.toLowerCase()), a("#" + anchor, label)));
+ ul.child(li(span(verb).class_("redoc-method redoc-method-" + lcr(verb)), a("#" + anchor, label)));
}
private static Div content(OpenApi openApi) {
@@ -156,9 +156,9 @@ public class RedocUI extends ObjectSwap<OpenApi,Div> {
private static void renderOperation(Div contentDiv, String path, String verb, Operation op) {
if (op == null)
return;
- var anchor = "op-" + verb.toLowerCase() + "-" + path.replaceAll("[^A-Za-z0-9]", "_");
+ var anchor = "op-" + lcr(verb) + "-" + path.replaceAll("[^A-Za-z0-9]", "_");
contentDiv.child(div(
- h2(verb + " " + path).id(anchor).class_("redoc-op-title redoc-op-title-" + verb.toLowerCase()),
+ h2(verb + " " + path).id(anchor).class_("redoc-op-title redoc-op-title-" + lcr(verb)),
nn(op.getSummary()) ? div(op.getSummary()).class_("redoc-op-summary") : null,
nn(op.getDescription()) ? div(op.getDescription()).class_("redoc-op-desc") : null
).class_("redoc-op-block"));
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/Callback_Test.java b/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/Callback_Test.java
index 1b8e411d50..3b1c05dfd3 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/Callback_Test.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/Callback_Test.java
@@ -221,7 +221,7 @@ class Callback_Test extends TestBase {
assertMapped(
TESTER.bean(), (obj,prop) -> cns(obj.get(prop, Object.class)),
"callbacks,x1,x2",
- "FilteredMap,String,<null>"
+ "UnmodifiableMap,String,<null>"
);
}
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/Components_Test.java b/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/Components_Test.java
index ff6eddc95a..9cbc714c3f 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/Components_Test.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/Components_Test.java
@@ -215,7 +215,7 @@ class Components_Test extends TestBase {
assertMapped(
TESTER.bean(), (obj,prop) -> cns(obj.get(prop, Object.class)),
"callbacks,examples,headers,links,parameters,requestBodies,responses,schemas,securitySchemes,x1,x2",
- "FilteredMap,FilteredMap,FilteredMap,FilteredMap,FilteredMap,FilteredMap,FilteredMap,FilteredMap,FilteredMap,String,<null>"
+ "UnmodifiableMap,UnmodifiableMap,UnmodifiableMap,UnmodifiableMap,UnmodifiableMap,UnmodifiableMap,UnmodifiableMap,UnmodifiableMap,UnmodifiableMap,String,<null>"
);
}
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/OpenApi_Test.java b/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/OpenApi_Test.java
index beccb2b6b9..51dd931084 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/OpenApi_Test.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/OpenApi_Test.java
@@ -307,7 +307,7 @@ class OpenApi_Test extends TestBase {
assertMapped(
TESTER.bean(), (obj,prop) -> cns(obj.get(prop, Object.class)),
"components,externalDocs,info,openapi,paths,security,servers,tags,x1,x2",
- "Components,ExternalDocumentation,Info,String,FilteredMap,ArrayList,ArrayList,ArrayList,String,<null>"
+ "Components,ExternalDocumentation,Info,String,UnmodifiableMap,ArrayList,ArrayList,ArrayList,String,<null>"
);
}
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/Parameter_Test.java b/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/Parameter_Test.java
index 4ab5b9900e..c66398607c 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/Parameter_Test.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/Parameter_Test.java
@@ -245,7 +245,7 @@ class Parameter_Test extends TestBase {
assertMapped(
TESTER.bean(), (obj,prop) -> cns(obj.get(prop, Object.class)),
"allowEmptyValue,allowReserved,content,deprecated,description,example,examples,explode,in,name,required,schema,style,x1,x2",
- "Boolean,Boolean,LinkedHashMap,Boolean,String,String,FilteredMap,Boolean,String,String,Boolean,SchemaInfo,String,String,<null>"
+ "Boolean,Boolean,LinkedHashMap,Boolean,String,String,UnmodifiableMap,Boolean,String,String,Boolean,SchemaInfo,String,String,<null>"
);
}
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/PathItem_Test.java b/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/PathItem_Test.java
index 2c275aee61..7e03aa56d0 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/PathItem_Test.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/PathItem_Test.java
@@ -217,7 +217,7 @@ class PathItem_Test extends TestBase {
assertMapped(
TESTER.bean(), (obj,prop) -> cns(obj.get(prop, Object.class)),
"delete,description,get,head,options,parameters,patch,post,put,servers,summary,trace,x1,x2",
- "Operation,String,Operation,Operation,Operation,ArrayList,Operation,Operation,Operation,ArrayList,String,Operation,String,<null>"
+ "Operation,String,Operation,Operation,Operation,UnmodifiableRandomAccessList,Operation,Operation,Operation,UnmodifiableRandomAccessList,String,Operation,String,<null>"
);
}
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/SchemaInfo_Test.java b/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/SchemaInfo_Test.java
index aa1d706859..4e500d6211 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/SchemaInfo_Test.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/bean/openapi3/SchemaInfo_Test.java
@@ -326,7 +326,7 @@ class SchemaInfo_Test extends TestBase {
assertMapped(
TESTER.bean(), (obj,prop) -> cns(obj.get(prop, Object.class)),
"additionalItems,additionalProperties,allOf,anyOf,default,description,discriminator,enum,example,exclusiveMaximum,exclusiveMinimum,externalDocs,format,items,maxItems,maxLength,maxProperties,maximum,minItems,minLength,minProperties,minimum,multipleOf,not,nullable,oneOf,pattern,properties,readOnly,required,title,type,uniqueItems,writeOnly,xml,x1,x2",
- "SchemaInfo,SchemaInfo,ArrayList,ArrayList,String,String,Discriminator,ArrayList,String,Boolean,Boolean,ExternalDocumentation,String,Items,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,SchemaInfo,Boolean,ArrayList,String,LinkedHashMap,Boolean,ArrayList,String,String,Boolean,Boolean,Xml,String,<null>"
+ "SchemaInfo,SchemaInfo,ArrayList,ArrayList,String,String,Discriminator,ArrayList,String,Boolean,Boolean,ExternalDocumentation,String,Items,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,SchemaInfo,Boolean,ArrayList,String,UnmodifiableMap,Boolean,ArrayList,String,String,Boolean,Boolean,Xml,String,<null>"
);
}
diff --git a/juneau-bean/juneau-bean-rfc7807/src/main/java/org/apache/juneau/bean/rfc7807/Problem.java b/juneau-bean/juneau-bean-rfc7807/src/main/java/org/apache/juneau/bean/rfc7807/Problem.java
index d87a36064b..ab00fb66b8 100644
--- a/juneau-bean/juneau-bean-rfc7807/src/main/java/org/apache/juneau/bean/rfc7807/Problem.java
+++ b/juneau-bean/juneau-bean-rfc7807/src/main/java/org/apache/juneau/bean/rfc7807/Problem.java
@@ -16,6 +16,8 @@
*/
package org.apache.juneau.bean.rfc7807;
+import static org.apache.juneau.commons.utils.Shorts.*;
+
import java.net.*;
import java.util.*;
@@ -124,7 +126,7 @@ public class Problem {
*/
@BeanIgnore
public URI getTypeOrDefault() {
- return type == null ? DEFAULT_TYPE : type;
+ return or(type, DEFAULT_TYPE);
}
/**
@@ -233,7 +235,7 @@ public class Problem {
*/
@BeanProp("*")
public Set<String> extraKeys() {
- return extra == null ? Collections.emptySet() : extra.keySet();
+ return extra == null ? Collections.emptySet() : u(extra.keySet());
}
/**
@@ -244,7 +246,7 @@ public class Problem {
* <a class="doclink" href="https://www.rfc-editor.org/rfc/rfc7807#section-3.2">§3.2</a> extension members
* that flatten into the top-level JSON object.
*
- * @param property The property name to retrieve. Must not be <jk>null</jk>.
+ * @param property The property name to retrieve. Can be <jk>null</jk> (a <jk>null</jk> key simply resolves to no value).
* @return The property value, or <jk>null</jk> if the property does not exist.
*/
@BeanProp("*")
@@ -260,8 +262,8 @@ public class Problem {
* <a class="doclink" href="https://www.rfc-editor.org/rfc/rfc7807#section-3.2">§3.2</a> extension members.
* The extension map is lazily initialised on first use.
*
- * @param property The property name to set. Must not be <jk>null</jk>.
- * @param value The new value for the property.
+ * @param property The property name to set. Can be <jk>null</jk> ({@link LinkedHashMap} tolerates a <jk>null</jk> key).
+ * @param value The new value for the property. Can be <jk>null</jk>.
* @return This object.
*/
@BeanProp("*")
diff --git a/juneau-bean/juneau-bean-rfc7807/src/main/java/org/apache/juneau/bean/rfc7807/ProblemMapperList.java b/juneau-bean/juneau-bean-rfc7807/src/main/java/org/apache/juneau/bean/rfc7807/ProblemMapperList.java
index 908348ea15..6c4d0e5c62 100644
--- a/juneau-bean/juneau-bean-rfc7807/src/main/java/org/apache/juneau/bean/rfc7807/ProblemMapperList.java
+++ b/juneau-bean/juneau-bean-rfc7807/src/main/java/org/apache/juneau/bean/rfc7807/ProblemMapperList.java
@@ -64,7 +64,7 @@ public class ProblemMapperList {
/**
* Creates a list populated with the supplied mappers in argument order.
*
- * @param mappers The mappers to add. Each must be non-{@code null}; duplicates are allowed and preserved.
+ * @param mappers The mappers to add. Can be <jk>null</jk>, and <jk>null</jk> entries are skipped; duplicates are allowed and preserved.
* @return A new {@link ProblemMapperList} containing the supplied mappers.
*/
public static ProblemMapperList of(ProblemMapper<?>... mappers) {
@@ -79,7 +79,7 @@ public class ProblemMapperList {
/**
* Appends a mapper to the end of the list.
*
- * @param mapper The mapper to add. Must not be <jk>null</jk>.
+ * @param mapper The mapper to add. Can be <jk>null</jk> (no-op).
* @return This object for fluent chaining.
*/
public ProblemMapperList append(ProblemMapper<?> mapper) {
@@ -91,7 +91,7 @@ public class ProblemMapperList {
/**
* Appends a collection of mappers to the end of the list, in iteration order.
*
- * @param values The mappers to add. {@code null} entries are skipped.
+ * @param values The mappers to add. Can be <jk>null</jk>, and <jk>null</jk> entries are skipped.
* @return This object for fluent chaining.
*/
public ProblemMapperList append(Collection<? extends ProblemMapper<?>> values) {
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/HeaderInfo.java b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/HeaderInfo.java
index 9b2e473b8e..d5c574322b 100644
--- a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/HeaderInfo.java
+++ b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/HeaderInfo.java
@@ -18,6 +18,7 @@ package org.apache.juneau.bean.swagger;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.bean.swagger.SwaggerCopyUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -153,7 +154,7 @@ public class HeaderInfo extends SwaggerElement {
this.exclusiveMaximum = copyFrom.exclusiveMaximum;
this.exclusiveMinimum = copyFrom.exclusiveMinimum;
this.format = copyFrom.format;
- this.items = copyFrom.items == null ? null : copyFrom.items.copy();
+ this.items = copyOf(copyFrom.items);
this.maximum = copyFrom.maximum;
this.maxItems = copyFrom.maxItems;
this.maxLength = copyFrom.maxLength;
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Info.java b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Info.java
index 22d3d320fb..77138b4469 100644
--- a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Info.java
+++ b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Info.java
@@ -19,6 +19,7 @@ package org.apache.juneau.bean.swagger;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
+import static org.apache.juneau.bean.swagger.SwaggerCopyUtils.*;
import java.util.*;
@@ -126,9 +127,9 @@ public class Info extends SwaggerElement {
public Info(Info copyFrom) {
super(copyFrom);
- this.contact = copyFrom.contact == null ? null : copyFrom.contact.copy();
+ this.contact = copyOf(copyFrom.contact);
this.description = copyFrom.description;
- this.license = copyFrom.license == null ? null : copyFrom.license.copy();
+ this.license = copyOf(copyFrom.license);
this.siteName = copyFrom.siteName;
this.termsOfService = copyFrom.termsOfService;
this.title = copyFrom.title;
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Items.java b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Items.java
index 454a142ddc..3a2ec57f48 100644
--- a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Items.java
+++ b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Items.java
@@ -18,6 +18,7 @@ package org.apache.juneau.bean.swagger;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.bean.swagger.SwaggerCopyUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -149,7 +150,7 @@ public class Items extends SwaggerElement {
this.exclusiveMaximum = copyFrom.exclusiveMaximum;
this.exclusiveMinimum = copyFrom.exclusiveMinimum;
this.format = copyFrom.format;
- this.items = copyFrom.items == null ? null : copyFrom.items.copy();
+ this.items = copyOf(copyFrom.items);
this.maximum = copyFrom.maximum;
this.maxItems = copyFrom.maxItems;
this.maxLength = copyFrom.maxLength;
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Operation.java b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Operation.java
index 9d60545a87..0d00cce1f4 100644
--- a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Operation.java
+++ b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Operation.java
@@ -18,6 +18,7 @@ package org.apache.juneau.bean.swagger;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.bean.swagger.SwaggerCopyUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -216,7 +217,7 @@ public class Operation extends SwaggerElement {
this.consumes.addAll(copyOf(copyFrom.consumes));
this.deprecated = copyFrom.deprecated;
this.description = copyFrom.description;
- this.externalDocs = copyFrom.externalDocs == null ? null : copyFrom.externalDocs.copy();
+ this.externalDocs = copyOf(copyFrom.externalDocs);
this.operationId = copyFrom.operationId;
this.produces.addAll(copyOf(copyFrom.produces));
this.schemes.addAll(copyOf(copyFrom.schemes));
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/ParameterInfo.java b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/ParameterInfo.java
index 1498969d02..5c04474476 100644
--- a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/ParameterInfo.java
+++ b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/ParameterInfo.java
@@ -18,6 +18,7 @@ package org.apache.juneau.bean.swagger;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.bean.swagger.SwaggerCopyUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -208,7 +209,7 @@ public class ParameterInfo extends SwaggerElement {
this.exclusiveMinimum = copyFrom.exclusiveMinimum;
this.format = copyFrom.format;
this.in = copyFrom.in;
- this.items = copyFrom.items == null ? null : copyFrom.items.copy();
+ this.items = copyOf(copyFrom.items);
this.maximum = copyFrom.maximum;
this.maxItems = copyFrom.maxItems;
this.maxLength = copyFrom.maxLength;
@@ -219,7 +220,7 @@ public class ParameterInfo extends SwaggerElement {
this.name = copyFrom.name;
this.pattern = copyFrom.pattern;
this.required = copyFrom.required;
- this.schema = copyFrom.schema == null ? null : copyFrom.schema.copy();
+ this.schema = copyOf(copyFrom.schema);
this.type = copyFrom.type;
this.uniqueItems = copyFrom.uniqueItems;
@@ -403,7 +404,7 @@ public class ParameterInfo extends SwaggerElement {
*
* @return The property value, or <jk>null</jk> if it is not set.
*/
- public Set<Object> getEnum() { return nie(enum_); }
+ public Set<Object> getEnum() { return u(nie(enum_)); }
/**
* Bean property getter: <property>example</property>.
@@ -423,7 +424,7 @@ public class ParameterInfo extends SwaggerElement {
*
* @return The property value, or <jk>null</jk> if it is not set.
*/
- public Map<String,String> getExamples() { return examples; }
+ public Map<String,String> getExamples() { return u(examples); }
/**
* Bean property getter: <property>exclusiveMaximum</property>.
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/ResponseInfo.java b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/ResponseInfo.java
index 926d487210..f910bc6ebd 100644
--- a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/ResponseInfo.java
+++ b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/ResponseInfo.java
@@ -18,6 +18,7 @@ package org.apache.juneau.bean.swagger;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.bean.swagger.SwaggerCopyUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -117,7 +118,7 @@ public class ResponseInfo extends SwaggerElement {
super(copyFrom);
this.description = copyFrom.description;
- this.schema = copyFrom.schema == null ? null : copyFrom.schema.copy();
+ this.schema = copyOf(copyFrom.schema);
examples.putAll(copyOf(copyFrom.examples));
headers.putAll(copyOf(copyFrom.headers, HeaderInfo::copy));
}
@@ -212,7 +213,7 @@ public class ResponseInfo extends SwaggerElement {
*
* @return The property value, or <jk>null</jk> if it is not set.
*/
- public Map<String,Object> getExamples() { return nie(examples); }
+ public Map<String,Object> getExamples() { return u(nie(examples)); }
/**
* Returns the header information with the specified name.
@@ -233,7 +234,7 @@ public class ResponseInfo extends SwaggerElement {
*
* @return The property value, or <jk>null</jk> if it is not set.
*/
- public Map<String,HeaderInfo> getHeaders() { return nie(headers); }
+ public Map<String,HeaderInfo> getHeaders() { return u(nie(headers)); }
/**
* Bean property getter: <property>schema</property>.
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SchemaInfo.java b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SchemaInfo.java
index 022209ff0e..d7696b8b64 100644
--- a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SchemaInfo.java
+++ b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SchemaInfo.java
@@ -18,6 +18,7 @@ package org.apache.juneau.bean.swagger;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.bean.swagger.SwaggerCopyUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -185,7 +186,7 @@ public class SchemaInfo extends SwaggerElement {
public SchemaInfo(SchemaInfo copyFrom) {
super(copyFrom);
- this.additionalProperties = copyFrom.additionalProperties == null ? null : copyFrom.additionalProperties.copy();
+ this.additionalProperties = copyOf(copyFrom.additionalProperties);
this.allOf.addAll(copyOf(copyFrom.allOf, SchemaInfo::copy));
this.default_ = copyFrom.default_;
this.description = copyFrom.description;
@@ -194,9 +195,9 @@ public class SchemaInfo extends SwaggerElement {
this.example = copyFrom.example;
this.exclusiveMaximum = copyFrom.exclusiveMaximum;
this.exclusiveMinimum = copyFrom.exclusiveMinimum;
- this.externalDocs = copyFrom.externalDocs == null ? null : copyFrom.externalDocs.copy();
+ this.externalDocs = copyOf(copyFrom.externalDocs);
this.format = copyFrom.format;
- this.items = copyFrom.items == null ? null : copyFrom.items.copy();
+ this.items = copyOf(copyFrom.items);
this.maximum = copyFrom.maximum;
this.maxItems = copyFrom.maxItems;
this.maxLength = copyFrom.maxLength;
@@ -214,7 +215,7 @@ public class SchemaInfo extends SwaggerElement {
this.title = copyFrom.title;
this.type = copyFrom.type;
this.uniqueItems = copyFrom.uniqueItems;
- this.xml = copyFrom.xml == null ? null : copyFrom.xml.copy();
+ this.xml = copyOf(copyFrom.xml);
properties.putAll(copyOf(copyFrom.properties, SchemaInfo::copy));
}
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Swagger.java b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Swagger.java
index f613c5c039..84bd87d8c8 100644
--- a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Swagger.java
+++ b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Swagger.java
@@ -18,6 +18,7 @@ package org.apache.juneau.bean.swagger;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.bean.swagger.SwaggerCopyUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
@@ -162,9 +163,9 @@ public class Swagger extends SwaggerElement {
this.basePath = copyFrom.basePath;
this.consumes.addAll(copyOf(copyFrom.consumes));
- this.externalDocs = copyFrom.externalDocs == null ? null : copyFrom.externalDocs.copy();
+ this.externalDocs = copyOf(copyFrom.externalDocs);
this.host = copyFrom.host;
- this.info = copyFrom.info == null ? null : copyFrom.info.copy();
+ this.info = copyOf(copyFrom.info);
this.produces.addAll(copyOf(copyFrom.produces));
this.schemes.addAll(copyOf(copyFrom.schemes));
this.swagger = copyFrom.swagger;
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SwaggerCopyUtils.java b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SwaggerCopyUtils.java
new file mode 100644
index 0000000000..4d4ac40e52
--- /dev/null
+++ b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SwaggerCopyUtils.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://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 org.apache.juneau.bean.swagger;
+
+import org.apache.juneau.commons.utils.*;
+
+/**
+ * Copy utilities for the Swagger 2.0 bean module.
+ *
+ * <p>
+ * Extends {@link CopyUtils} so that a single static-import-on-demand of this class
+ * (<c>import static org.apache.juneau.bean.swagger.SwaggerCopyUtils.*;</c>) brings in both the inherited
+ * collection/map/array <c>copyOf(...)</c> overloads <b>and</b> the Swagger bean <c>copyOf(<BeanType>)</c>
+ * overloads declared here, resolved via ordinary Java overload resolution.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='jc'>{@link CopyUtils}
+ * </ul>
+ */
+public class SwaggerCopyUtils extends CopyUtils {
+
+ /** Constructor. */
+ protected SwaggerCopyUtils() {}
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static Contact copyOf(Contact value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static ExternalDocumentation copyOf(ExternalDocumentation value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static Info copyOf(Info value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static Items copyOf(Items value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static License copyOf(License value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static SchemaInfo copyOf(SchemaInfo value) {
+ return value == null ? null : value.copy();
+ }
+
+ /**
+ * Null-safe copy: returns a deep copy of the specified value, or <jk>null</jk> if the value is <jk>null</jk>.
+ *
+ * @param value The value to copy. Can be <jk>null</jk>.
+ * @return A copy of the value, or <jk>null</jk> if the value was <jk>null</jk>.
+ */
+ public static Xml copyOf(Xml value) {
+ return value == null ? null : value.copy();
+ }
+}
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SwaggerElement.java b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SwaggerElement.java
index b8b1a0a24d..f3ba6ecc4f 100644
--- a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SwaggerElement.java
+++ b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SwaggerElement.java
@@ -50,7 +50,7 @@ public abstract class SwaggerElement {
SwaggerElement(SwaggerElement copyFrom) {
this.strict = copyFrom.strict;
- this.extra = copyOf(copyFrom.extra);
+ this.extra = cp(copyFrom.extra);
}
/**
@@ -76,7 +76,7 @@ public abstract class SwaggerElement {
*/
@BeanProp("*")
public Set<String> extraKeys() {
- return extra == null ? Collections.emptySet() : extra.keySet();
+ return extra == null ? Collections.emptySet() : u(extra.keySet());
}
/**
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Tag.java b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Tag.java
index 5623c4acc5..b16f35cfbf 100644
--- a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Tag.java
+++ b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Tag.java
@@ -19,6 +19,7 @@ package org.apache.juneau.bean.swagger;
import static org.apache.juneau.commons.utils.AssertionUtils.*;
import static org.apache.juneau.commons.utils.Shorts.*;
import static org.apache.juneau.marshall.internal.ConverterUtils.*;
+import static org.apache.juneau.bean.swagger.SwaggerCopyUtils.*;
... 18810 lines suppressed ...