diff --git a/dev/checkstyle/checkstyle.xml b/dev/checkstyle/checkstyle.xml index 6db0a94..117cacd 100644 --- a/dev/checkstyle/checkstyle.xml +++ b/dev/checkstyle/checkstyle.xml @@ -33,7 +33,6 @@ - diff --git a/dev/checkstyle/header.txt b/dev/checkstyle/header.txt index c2f20d0..e8554b3 100644 --- a/dev/checkstyle/header.txt +++ b/dev/checkstyle/header.txt @@ -1,16 +1,4 @@ ^/\*$ ^ \* Copyright [\d]{4}((,[\s]*[\d]{4})*|(-[\d]{4})?) C Thing Software$ -^ \* .* -^ \*$ -^ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);$ -^ \* you may not use this file except in compliance with the License\.$ -^ \* You may obtain a copy of the License at$ -^ \*$ -^ \* 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\.$ +^ \* SPDX-License-Identifier: Apache-2.0$ ^ \*/$ diff --git a/src/main/java/org/cthing/xmlwriter/XmlAttributes.java b/src/main/java/org/cthing/xmlwriter/XmlAttributes.java index 86e09a2..05ff25c 100644 --- a/src/main/java/org/cthing/xmlwriter/XmlAttributes.java +++ b/src/main/java/org/cthing/xmlwriter/XmlAttributes.java @@ -1,17 +1,6 @@ /* * Copyright 2022 C Thing Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * 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. + * SPDX-License-Identifier: Apache-2.0 */ package org.cthing.xmlwriter; diff --git a/src/main/java/org/cthing/xmlwriter/XmlWriter.java b/src/main/java/org/cthing/xmlwriter/XmlWriter.java index 6f66033..1083d83 100755 --- a/src/main/java/org/cthing/xmlwriter/XmlWriter.java +++ b/src/main/java/org/cthing/xmlwriter/XmlWriter.java @@ -1,17 +1,6 @@ /* * Copyright 2022 C Thing Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * 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. + * SPDX-License-Identifier: Apache-2.0 */ package org.cthing.xmlwriter; @@ -615,7 +604,6 @@ public void flush() throws SAXException { * output is used. * @return The newly set writer. */ - @SuppressWarnings({ "resource", "IOResourceOpenedButNotSafelyClosed" }) public final Writer setOutput(@Nullable @WillNotClose final Writer writer) { this.out = (writer == null) ? new OutputStreamWriter(System.out, StandardCharsets.UTF_8) : writer; return this.out; @@ -2501,7 +2489,6 @@ private void writeName(final String uri, final String localName, final String qN * @return Number of namespace declaration attributes written * @throws SAXException If there is a problem writing the namespaces. */ - @SuppressWarnings("unchecked") private int writeNSDecls() throws SAXException { // Since the iteration order for namespaces is not stable, sort them. final List prefixes = Collections.list(this.nsSupport.getDeclaredPrefixes()); diff --git a/src/main/java/org/cthing/xmlwriter/package-info.java b/src/main/java/org/cthing/xmlwriter/package-info.java index 18791ce..dbbaf3e 100644 --- a/src/main/java/org/cthing/xmlwriter/package-info.java +++ b/src/main/java/org/cthing/xmlwriter/package-info.java @@ -1,17 +1,6 @@ /* * Copyright 2022 C Thing Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * 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. + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/src/test/java/org/cthing/xmlwriter/XmlAttributesTest.java b/src/test/java/org/cthing/xmlwriter/XmlAttributesTest.java index ef0a33e..33900ce 100644 --- a/src/test/java/org/cthing/xmlwriter/XmlAttributesTest.java +++ b/src/test/java/org/cthing/xmlwriter/XmlAttributesTest.java @@ -1,17 +1,6 @@ /* * Copyright 2022 C Thing Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * 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. + * SPDX-License-Identifier: Apache-2.0 */ package org.cthing.xmlwriter; diff --git a/src/test/java/org/cthing/xmlwriter/XmlWriterTest.java b/src/test/java/org/cthing/xmlwriter/XmlWriterTest.java index 706244c..3e00243 100755 --- a/src/test/java/org/cthing/xmlwriter/XmlWriterTest.java +++ b/src/test/java/org/cthing/xmlwriter/XmlWriterTest.java @@ -1,17 +1,6 @@ /* * Copyright 2022 C Thing Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * 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. + * SPDX-License-Identifier: Apache-2.0 */ package org.cthing.xmlwriter;