From e2d497a74329519c968e95753fc2d88c2931c9e3 Mon Sep 17 00:00:00 2001
From: "James R. Perkins"
Date: Mon, 14 Aug 2023 17:38:59 -0700
Subject: [PATCH 01/10] Bump version to 3.0.0.Final.
Signed-off-by: James R. Perkins
---
annotations/pom.xml | 2 +-
docs/pom.xml | 2 +-
pom.xml | 2 +-
processor/pom.xml | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/annotations/pom.xml b/annotations/pom.xml
index 63a95e9..d52f8fc 100644
--- a/annotations/pom.xml
+++ b/annotations/pom.xml
@@ -25,7 +25,7 @@
org.jboss.loggingjboss-logging-tools-parent
- 2.3.0.Beta1-SNAPSHOT
+ 3.0.0.Final-SNAPSHOT../pom.xml
diff --git a/docs/pom.xml b/docs/pom.xml
index 640c623..81d7bc1 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -25,7 +25,7 @@
org.jboss.loggingjboss-logging-tools-parent
- 2.3.0.Beta1-SNAPSHOT
+ 3.0.0.Final-SNAPSHOT../pom.xml
diff --git a/pom.xml b/pom.xml
index ff980ff..c989383 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
org.jboss.loggingjboss-logging-tools-parent
- 2.3.0.Beta1-SNAPSHOT
+ 3.0.0.Final-SNAPSHOTpomJBoss Logging Tools Parent
diff --git a/processor/pom.xml b/processor/pom.xml
index 98ff41a..804e623 100644
--- a/processor/pom.xml
+++ b/processor/pom.xml
@@ -28,7 +28,7 @@
org.jboss.loggingjboss-logging-tools-parent
- 2.3.0.Beta1-SNAPSHOT
+ 3.0.0.Final-SNAPSHOT../pom.xml
From d1069f423744a1d65e8bf14dd0379ebb62559eb9 Mon Sep 17 00:00:00 2001
From: "James R. Perkins"
Date: Mon, 14 Aug 2023 17:45:05 -0700
Subject: [PATCH 02/10] [LOGTOOL-154] Migrate the license from LGPL to ASLv2.
https://issues.redhat.com/browse/LOGTOOL-154
Signed-off-by: James R. Perkins
---
.../resources/META-INF/LICENSE.txt => LICENSE | 7 +-
annotations/pom.xml | 6 +-
.../jboss/logging/annotations/BaseUrl.java | 2 +-
.../org/jboss/logging/annotations/Cause.java | 2 +-
.../logging/annotations/ConstructType.java | 2 +-
.../org/jboss/logging/annotations/Field.java | 2 +-
.../org/jboss/logging/annotations/Fields.java | 2 +-
.../jboss/logging/annotations/FormatWith.java | 2 +-
.../jboss/logging/annotations/LogMessage.java | 2 +-
.../logging/annotations/LoggingClass.java | 2 +-
.../jboss/logging/annotations/Message.java | 2 +-
.../logging/annotations/MessageBundle.java | 2 +-
.../logging/annotations/MessageLogger.java | 2 +-
.../org/jboss/logging/annotations/Once.java | 2 +-
.../org/jboss/logging/annotations/Param.java | 2 +-
.../org/jboss/logging/annotations/Pos.java | 2 +-
.../jboss/logging/annotations/Producer.java | 2 +-
.../jboss/logging/annotations/Properties.java | 2 +-
.../jboss/logging/annotations/Property.java | 2 +-
.../logging/annotations/ResolutionDoc.java | 2 +-
.../jboss/logging/annotations/Signature.java | 2 +-
.../jboss/logging/annotations/Suppressed.java | 2 +-
.../jboss/logging/annotations/Transform.java | 2 +-
.../annotations/TransformException.java | 2 +-
.../logging/annotations/ValidIdRange.java | 2 +-
.../logging/annotations/ValidIdRanges.java | 2 +-
docs/pom.xml | 4 +-
pom.xml | 31 +-
processor/pom.xml | 27 +-
.../processor/apt/AbstractClassType.java | 27 +-
.../processor/apt/AbstractGenerator.java | 27 +-
.../apt/ImplementationClassGenerator.java | 27 +-
.../processor/apt/LoggingToolsProcessor.java | 27 +-
.../apt/MessageInterfaceFactory.java | 27 +-
.../processor/apt/MessageMethodBuilder.java | 27 +-
.../processor/apt/ParameterFactory.java | 27 +-
.../processor/apt/ProcessingException.java | 27 +-
.../processor/apt/ReportFileGenerator.java | 27 +-
.../processor/apt/ReturnTypeFactory.java | 27 +-
.../processor/apt/ThrowableTypeFactory.java | 27 +-
.../logging/processor/apt/ToolLogger.java | 27 +-
.../apt/TranslationClassGenerator.java | 27 +-
.../apt/TranslationFileGenerator.java | 27 +-
.../apt/report/AsciidocReportWriter.java | 27 +-
.../apt/report/IndentingXmlWriter.java | 27 +-
.../processor/apt/report/ReportType.java | 27 +-
.../processor/apt/report/ReportWriter.java | 27 +-
.../processor/apt/report/XmlReportWriter.java | 27 +-
.../processor/generator/model/ClassModel.java | 27 +-
.../generator/model/ClassModelFactory.java | 27 +-
.../generator/model/ClassModelHelper.java | 27 +-
.../model/ImplementationClassModel.java | 27 +-
.../model/MessageBundleImplementor.java | 27 +-
.../model/MessageBundleTranslator.java | 27 +-
.../model/MessageLoggerImplementor.java | 27 +-
.../model/MessageLoggerTranslator.java | 27 +-
.../logging/processor/model/ClassType.java | 27 +-
.../processor/model/DelegatingElement.java | 27 +-
.../model/DelegatingExecutableElement.java | 27 +-
.../model/DelegatingTypeElement.java | 27 +-
.../processor/model/JavaDocComment.java | 27 +-
.../processor/model/LoggerMessageMethod.java | 27 +-
.../processor/model/MessageInterface.java | 27 +-
.../processor/model/MessageMethod.java | 27 +-
.../logging/processor/model/Parameter.java | 27 +-
.../logging/processor/model/ReturnType.java | 27 +-
.../processor/model/ThrowableType.java | 27 +-
.../logging/processor/util/Comparison.java | 27 +-
.../logging/processor/util/ElementHelper.java | 27 +-
.../logging/processor/util/Expressions.java | 27 +-
.../jboss/logging/processor/util/Objects.java | 27 +-
.../processor/util/TranslationHelper.java | 27 +-
.../processor/util/VersionComparator.java | 27 +-
.../validation/AbstractFormatPart.java | 27 +-
.../validation/AbstractFormatValidator.java | 27 +-
.../processor/validation/FormatPart.java | 27 +-
.../processor/validation/FormatValidator.java | 27 +-
.../validation/FormatValidatorFactory.java | 27 +-
.../validation/IdLengthValidator.java | 27 +-
.../validation/IdRangeValidator.java | 27 +-
.../validation/MessageFormatPart.java | 27 +-
.../validation/MessageFormatValidator.java | 27 +-
.../validation/MessageIdValidator.java | 27 +-
.../validation/NoFormatValidator.java | 27 +-
.../validation/PropertyValidator.java | 27 +-
.../validation/StringFormatPart.java | 27 +-
.../validation/StringFormatValidator.java | 27 +-
.../processor/validation/StringPart.java | 27 +-
.../validation/ValidationMessage.java | 27 +-
.../validation/ValidationMessageFactory.java | 27 +-
.../processor/validation/Validator.java | 27 +-
.../src/main/resources/META-INF/LICENSE.txt | 502 ------------------
.../resources/schema/logging-report_1_0.xsd | 27 +-
.../processor/generated/DefaultLogger.java | 27 +-
.../processor/generated/DefaultMessages.java | 27 +-
.../processor/generated/ExpressionLogger.java | 27 +-
.../processor/generated/ExtendedLogger.java | 27 +-
.../processor/generated/LogOnceLogger.java | 27 +-
.../generated/MethodMessageConstants.java | 27 +-
.../processor/generated/RootLocaleLogger.java | 27 +-
.../generated/SignatureMessages.java | 27 +-
.../generated/StringFormatLogger.java | 27 +-
.../generated/StringFormatMessages.java | 27 +-
.../processor/generated/TestConstants.java | 27 +-
.../processor/generated/TransformLogger.java | 27 +-
.../generated/TransformMessages.java | 27 +-
.../processor/generated/ValidLogger.java | 27 +-
.../processor/generated/ValidMessages.java | 27 +-
.../generated/tests/AbstractLoggerTest.java | 27 +-
.../tests/ExpressionMessagesTest.java | 27 +-
.../tests/GeneratedSkeletonTest.java | 27 +-
.../tests/GeneratedSourceAnalysisTest.java | 27 +-
.../generated/tests/LevelIdCheckTest.java | 27 +-
.../generated/tests/LogOnceTest.java | 27 +-
.../processor/generated/tests/LoggerTest.java | 27 +-
.../tests/LoggerVerificationTest.java | 27 +-
.../generated/tests/MessagesTest.java | 27 +-
.../generated/tests/QueuedMessageHandler.java | 27 +-
.../tests/ThrowableSignatureTest.java | 27 +-
.../generated/tests/TransformTest.java | 27 +-
.../report/ReportGenerationTest.java | 27 +-
.../processor/report/TestReportLogger.java | 27 +-
.../processor/report/TestReportMessages.java | 27 +-
.../processor/util/ExpressionsTest.java | 27 +-
.../processor/util/VersionComparatorTest.java | 27 +-
.../MessageFormatValidatorTest.java | 27 +-
.../validation/StringFormatValidatorTest.java | 27 +-
.../src/test/resources/expression.properties | 27 +-
.../src/test/resources/logging.properties | 27 +-
.../DefaultLogger.i18n_de.properties | 27 +-
.../DefaultLogger.i18n_de_DE.properties | 27 +-
.../DefaultLogger.i18n_en.properties | 27 +-
.../DefaultLogger.i18n_en_CA.properties | 27 +-
.../DefaultLogger.i18n_en_UK.properties | 27 +-
.../DefaultLogger.i18n_en_US.properties | 27 +-
.../DefaultLogger.i18n_es.properties | 27 +-
.../DefaultLogger.i18n_fr.properties | 27 +-
.../DefaultLogger.i18n_fr_CA.properties | 27 +-
.../DefaultLogger.i18n_fr_FR.properties | 27 +-
.../DefaultLogger.i18n_it.properties | 27 +-
.../DefaultLogger.i18n_it_IT.properties | 27 +-
.../DefaultLogger.i18n_ja.properties | 27 +-
.../DefaultLogger.i18n_ja_JP.properties | 27 +-
.../DefaultLogger.i18n_ko.properties | 27 +-
.../DefaultLogger.i18n_ko_KR.properties | 27 +-
.../DefaultLogger.i18n_zh.properties | 27 +-
.../DefaultLogger.i18n_zh_CN.properties | 27 +-
.../DefaultLogger.i18n_zh_TW.properties | 27 +-
.../DefaultMessages.i18n_de.properties | 27 +-
.../DefaultMessages.i18n_es.properties | 27 +-
.../DefaultMessages.i18n_fr.properties | 27 +-
.../RootLocaleLogger.i18n_en_US.properties | 27 +-
.../StringFormatLogger.i18n_es.properties | 27 +-
153 files changed, 1534 insertions(+), 2412 deletions(-)
rename annotations/src/main/resources/META-INF/LICENSE.txt => LICENSE (99%)
delete mode 100644 processor/src/main/resources/META-INF/LICENSE.txt
diff --git a/annotations/src/main/resources/META-INF/LICENSE.txt b/LICENSE
similarity index 99%
rename from annotations/src/main/resources/META-INF/LICENSE.txt
rename to LICENSE
index 7a4a3ea..8dada3e 100644
--- a/annotations/src/main/resources/META-INF/LICENSE.txt
+++ b/LICENSE
@@ -1,4 +1,3 @@
-
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -179,7 +178,7 @@
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
+ boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
@@ -187,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright [yyyy] [name of copyright owner]
+ Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -199,4 +198,4 @@
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.
\ No newline at end of file
+ limitations under the License.
diff --git a/annotations/pom.xml b/annotations/pom.xml
index d52f8fc..f261972 100644
--- a/annotations/pom.xml
+++ b/annotations/pom.xml
@@ -2,7 +2,7 @@
@@ -66,8 +63,8 @@
- lgpl
- http://repository.jboss.org/licenses/lgpl-2.1.txt
+ Apache License 2.0
+ https://repository.jboss.org/licenses/apache-2.0.txtrepo
diff --git a/processor/pom.xml b/processor/pom.xml
index 804e623..6c95059 100644
--- a/processor/pom.xml
+++ b/processor/pom.xml
@@ -1,24 +1,21 @@
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/AbstractClassType.java b/processor/src/main/java/org/jboss/logging/processor/apt/AbstractClassType.java
index f934ee3..a67bd18 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/AbstractClassType.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/AbstractClassType.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/AbstractGenerator.java b/processor/src/main/java/org/jboss/logging/processor/apt/AbstractGenerator.java
index 31876ac..d43c4f0 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/AbstractGenerator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/AbstractGenerator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/ImplementationClassGenerator.java b/processor/src/main/java/org/jboss/logging/processor/apt/ImplementationClassGenerator.java
index 0bda3a2..888802e 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/ImplementationClassGenerator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/ImplementationClassGenerator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/LoggingToolsProcessor.java b/processor/src/main/java/org/jboss/logging/processor/apt/LoggingToolsProcessor.java
index 4f4a5df..c200d19 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/LoggingToolsProcessor.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/LoggingToolsProcessor.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/MessageInterfaceFactory.java b/processor/src/main/java/org/jboss/logging/processor/apt/MessageInterfaceFactory.java
index f19d03b..034d891 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/MessageInterfaceFactory.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/MessageInterfaceFactory.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/MessageMethodBuilder.java b/processor/src/main/java/org/jboss/logging/processor/apt/MessageMethodBuilder.java
index f831b5d..540deff 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/MessageMethodBuilder.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/MessageMethodBuilder.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/ParameterFactory.java b/processor/src/main/java/org/jboss/logging/processor/apt/ParameterFactory.java
index e67747a..351362b 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/ParameterFactory.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/ParameterFactory.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/ProcessingException.java b/processor/src/main/java/org/jboss/logging/processor/apt/ProcessingException.java
index 0937809..2e07e7d 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/ProcessingException.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/ProcessingException.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/ReportFileGenerator.java b/processor/src/main/java/org/jboss/logging/processor/apt/ReportFileGenerator.java
index f85a7ac..daaf08d 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/ReportFileGenerator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/ReportFileGenerator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/ReturnTypeFactory.java b/processor/src/main/java/org/jboss/logging/processor/apt/ReturnTypeFactory.java
index ba15930..837fd6f 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/ReturnTypeFactory.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/ReturnTypeFactory.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/ThrowableTypeFactory.java b/processor/src/main/java/org/jboss/logging/processor/apt/ThrowableTypeFactory.java
index 80ff4cd..7286035 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/ThrowableTypeFactory.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/ThrowableTypeFactory.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/ToolLogger.java b/processor/src/main/java/org/jboss/logging/processor/apt/ToolLogger.java
index 2a144e3..26dc210 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/ToolLogger.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/ToolLogger.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/TranslationClassGenerator.java b/processor/src/main/java/org/jboss/logging/processor/apt/TranslationClassGenerator.java
index 8b54e75..1bc75cd 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/TranslationClassGenerator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/TranslationClassGenerator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/TranslationFileGenerator.java b/processor/src/main/java/org/jboss/logging/processor/apt/TranslationFileGenerator.java
index dc05d55..9603e8b 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/TranslationFileGenerator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/TranslationFileGenerator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/report/AsciidocReportWriter.java b/processor/src/main/java/org/jboss/logging/processor/apt/report/AsciidocReportWriter.java
index f7e7503..3fc9a32 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/report/AsciidocReportWriter.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/report/AsciidocReportWriter.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt.report;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/report/IndentingXmlWriter.java b/processor/src/main/java/org/jboss/logging/processor/apt/report/IndentingXmlWriter.java
index d7f797a..9e4b5b0 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/report/IndentingXmlWriter.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/report/IndentingXmlWriter.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt.report;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/report/ReportType.java b/processor/src/main/java/org/jboss/logging/processor/apt/report/ReportType.java
index a9934a8..9236242 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/report/ReportType.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/report/ReportType.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt.report;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/report/ReportWriter.java b/processor/src/main/java/org/jboss/logging/processor/apt/report/ReportWriter.java
index 13dbc11..9f84ce0 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/report/ReportWriter.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/report/ReportWriter.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt.report;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/report/XmlReportWriter.java b/processor/src/main/java/org/jboss/logging/processor/apt/report/XmlReportWriter.java
index 1a10c69..ac77115 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/report/XmlReportWriter.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/report/XmlReportWriter.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.apt.report;
diff --git a/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModel.java b/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModel.java
index 9aa7a3b..32959b0 100644
--- a/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModel.java
+++ b/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModel.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.generator.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelFactory.java b/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelFactory.java
index 7623fef..7aedb32 100644
--- a/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelFactory.java
+++ b/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelFactory.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.generator.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelHelper.java b/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelHelper.java
index 758319f..a5527bb 100644
--- a/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelHelper.java
+++ b/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelHelper.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.generator.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/generator/model/ImplementationClassModel.java b/processor/src/main/java/org/jboss/logging/processor/generator/model/ImplementationClassModel.java
index 05426f7..ef83ef6 100644
--- a/processor/src/main/java/org/jboss/logging/processor/generator/model/ImplementationClassModel.java
+++ b/processor/src/main/java/org/jboss/logging/processor/generator/model/ImplementationClassModel.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.generator.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageBundleImplementor.java b/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageBundleImplementor.java
index 6c9c351..8c4b705 100644
--- a/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageBundleImplementor.java
+++ b/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageBundleImplementor.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.generator.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageBundleTranslator.java b/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageBundleTranslator.java
index 6462d20..7e8d6bd 100644
--- a/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageBundleTranslator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageBundleTranslator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.generator.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageLoggerImplementor.java b/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageLoggerImplementor.java
index 1ec4856..00cb238 100644
--- a/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageLoggerImplementor.java
+++ b/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageLoggerImplementor.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.generator.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageLoggerTranslator.java b/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageLoggerTranslator.java
index c83d942..3e6c930 100644
--- a/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageLoggerTranslator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageLoggerTranslator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.generator.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/ClassType.java b/processor/src/main/java/org/jboss/logging/processor/model/ClassType.java
index 0d89bc3..a9a41ef 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/ClassType.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/ClassType.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/DelegatingElement.java b/processor/src/main/java/org/jboss/logging/processor/model/DelegatingElement.java
index f002f9e..3496a90 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/DelegatingElement.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/DelegatingElement.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/DelegatingExecutableElement.java b/processor/src/main/java/org/jboss/logging/processor/model/DelegatingExecutableElement.java
index 202552f..63a4355 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/DelegatingExecutableElement.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/DelegatingExecutableElement.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/DelegatingTypeElement.java b/processor/src/main/java/org/jboss/logging/processor/model/DelegatingTypeElement.java
index dbeaef9..e163cb9 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/DelegatingTypeElement.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/DelegatingTypeElement.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/JavaDocComment.java b/processor/src/main/java/org/jboss/logging/processor/model/JavaDocComment.java
index 9b5623b..a2c5f53 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/JavaDocComment.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/JavaDocComment.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/LoggerMessageMethod.java b/processor/src/main/java/org/jboss/logging/processor/model/LoggerMessageMethod.java
index f4a4d50..49e2559 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/LoggerMessageMethod.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/LoggerMessageMethod.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2021, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/MessageInterface.java b/processor/src/main/java/org/jboss/logging/processor/model/MessageInterface.java
index eeaf48f..5fac7c6 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/MessageInterface.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/MessageInterface.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/MessageMethod.java b/processor/src/main/java/org/jboss/logging/processor/model/MessageMethod.java
index bcd175a..801bb8d 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/MessageMethod.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/MessageMethod.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/Parameter.java b/processor/src/main/java/org/jboss/logging/processor/model/Parameter.java
index d748536..ac2fc30 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/Parameter.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/Parameter.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/ReturnType.java b/processor/src/main/java/org/jboss/logging/processor/model/ReturnType.java
index ca052c6..872b6e3 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/ReturnType.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/ReturnType.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/ThrowableType.java b/processor/src/main/java/org/jboss/logging/processor/model/ThrowableType.java
index bf360a5..16c770c 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/ThrowableType.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/ThrowableType.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.model;
diff --git a/processor/src/main/java/org/jboss/logging/processor/util/Comparison.java b/processor/src/main/java/org/jboss/logging/processor/util/Comparison.java
index 81b4b14..9b85c4d 100644
--- a/processor/src/main/java/org/jboss/logging/processor/util/Comparison.java
+++ b/processor/src/main/java/org/jboss/logging/processor/util/Comparison.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.util;
diff --git a/processor/src/main/java/org/jboss/logging/processor/util/ElementHelper.java b/processor/src/main/java/org/jboss/logging/processor/util/ElementHelper.java
index 8763956..df04408 100644
--- a/processor/src/main/java/org/jboss/logging/processor/util/ElementHelper.java
+++ b/processor/src/main/java/org/jboss/logging/processor/util/ElementHelper.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.util;
diff --git a/processor/src/main/java/org/jboss/logging/processor/util/Expressions.java b/processor/src/main/java/org/jboss/logging/processor/util/Expressions.java
index 2d2320a..4b61f12 100644
--- a/processor/src/main/java/org/jboss/logging/processor/util/Expressions.java
+++ b/processor/src/main/java/org/jboss/logging/processor/util/Expressions.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.util;
diff --git a/processor/src/main/java/org/jboss/logging/processor/util/Objects.java b/processor/src/main/java/org/jboss/logging/processor/util/Objects.java
index aa14934..8ada0fc 100644
--- a/processor/src/main/java/org/jboss/logging/processor/util/Objects.java
+++ b/processor/src/main/java/org/jboss/logging/processor/util/Objects.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.util;
diff --git a/processor/src/main/java/org/jboss/logging/processor/util/TranslationHelper.java b/processor/src/main/java/org/jboss/logging/processor/util/TranslationHelper.java
index 73f7f79..50981cb 100644
--- a/processor/src/main/java/org/jboss/logging/processor/util/TranslationHelper.java
+++ b/processor/src/main/java/org/jboss/logging/processor/util/TranslationHelper.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.util;
diff --git a/processor/src/main/java/org/jboss/logging/processor/util/VersionComparator.java b/processor/src/main/java/org/jboss/logging/processor/util/VersionComparator.java
index cc210f5..6b4bcb0 100644
--- a/processor/src/main/java/org/jboss/logging/processor/util/VersionComparator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/util/VersionComparator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.util;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/AbstractFormatPart.java b/processor/src/main/java/org/jboss/logging/processor/validation/AbstractFormatPart.java
index 80bcaa1..5d8abf9 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/AbstractFormatPart.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/AbstractFormatPart.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/AbstractFormatValidator.java b/processor/src/main/java/org/jboss/logging/processor/validation/AbstractFormatValidator.java
index 24b7a3b..6ce3b19 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/AbstractFormatValidator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/AbstractFormatValidator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/FormatPart.java b/processor/src/main/java/org/jboss/logging/processor/validation/FormatPart.java
index 0eaa5d8..29e0b0d 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/FormatPart.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/FormatPart.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/FormatValidator.java b/processor/src/main/java/org/jboss/logging/processor/validation/FormatValidator.java
index 28ba8da..53f5d5d 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/FormatValidator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/FormatValidator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/FormatValidatorFactory.java b/processor/src/main/java/org/jboss/logging/processor/validation/FormatValidatorFactory.java
index bea11f7..2376549 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/FormatValidatorFactory.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/FormatValidatorFactory.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/IdLengthValidator.java b/processor/src/main/java/org/jboss/logging/processor/validation/IdLengthValidator.java
index 6f8f1fb..21946ed 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/IdLengthValidator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/IdLengthValidator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/IdRangeValidator.java b/processor/src/main/java/org/jboss/logging/processor/validation/IdRangeValidator.java
index 915ce27..390959e 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/IdRangeValidator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/IdRangeValidator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/MessageFormatPart.java b/processor/src/main/java/org/jboss/logging/processor/validation/MessageFormatPart.java
index 78ef393..c31e6f5 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/MessageFormatPart.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/MessageFormatPart.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/MessageFormatValidator.java b/processor/src/main/java/org/jboss/logging/processor/validation/MessageFormatValidator.java
index ab36c3c..ca69236 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/MessageFormatValidator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/MessageFormatValidator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/MessageIdValidator.java b/processor/src/main/java/org/jboss/logging/processor/validation/MessageIdValidator.java
index 46bf86b..4e4a7d6 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/MessageIdValidator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/MessageIdValidator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/NoFormatValidator.java b/processor/src/main/java/org/jboss/logging/processor/validation/NoFormatValidator.java
index d81d8b7..37dc20d 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/NoFormatValidator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/NoFormatValidator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/PropertyValidator.java b/processor/src/main/java/org/jboss/logging/processor/validation/PropertyValidator.java
index 6a4f48d..398bada 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/PropertyValidator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/PropertyValidator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/StringFormatPart.java b/processor/src/main/java/org/jboss/logging/processor/validation/StringFormatPart.java
index 72c36c0..f949e09 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/StringFormatPart.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/StringFormatPart.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/StringFormatValidator.java b/processor/src/main/java/org/jboss/logging/processor/validation/StringFormatValidator.java
index d61ccd7..326ef20 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/StringFormatValidator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/StringFormatValidator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/StringPart.java b/processor/src/main/java/org/jboss/logging/processor/validation/StringPart.java
index b02310b..24911ce 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/StringPart.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/StringPart.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/ValidationMessage.java b/processor/src/main/java/org/jboss/logging/processor/validation/ValidationMessage.java
index e2ffe84..0699149 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/ValidationMessage.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/ValidationMessage.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/ValidationMessageFactory.java b/processor/src/main/java/org/jboss/logging/processor/validation/ValidationMessageFactory.java
index 0dd8901..ea37052 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/ValidationMessageFactory.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/ValidationMessageFactory.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/Validator.java b/processor/src/main/java/org/jboss/logging/processor/validation/Validator.java
index 6dc4fb8..f82efa6 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/Validator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/Validator.java
@@ -1,23 +1,20 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2016, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
+ * Copyright 2023 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
*
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * 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
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 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.jboss.logging.processor.validation;
diff --git a/processor/src/main/resources/META-INF/LICENSE.txt b/processor/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 4362b49..0000000
--- a/processor/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,502 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- , 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
diff --git a/processor/src/main/resources/schema/logging-report_1_0.xsd b/processor/src/main/resources/schema/logging-report_1_0.xsd
index 8843209..f390d54 100644
--- a/processor/src/main/resources/schema/logging-report_1_0.xsd
+++ b/processor/src/main/resources/schema/logging-report_1_0.xsd
@@ -2,24 +2,21 @@
Date: Tue, 15 Aug 2023 08:03:28 -0700
Subject: [PATCH 03/10] Use the org.jboss.logging:logging-parent POM. Require a
minimum of Java 11.
Signed-off-by: James R. Perkins
---
.github/workflows/build.yml | 26 +++++++++----------
pom.xml | 9 +++----
.../apt/MessageInterfaceFactory.java | 13 +++-------
3 files changed, 20 insertions(+), 28 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index d700479..dd8a796 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -6,10 +6,15 @@ name: JBoss Logging Tools - CI
on:
push:
branches:
- - '**'
+ - 'main'
pull_request:
- types: [opened, synchronize, reopened, ready_for_review]
+ branches:
+ - '**'
+# Only run the latest job
+concurrency:
+ group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
+ cancel-in-progress: true
jobs:
build:
@@ -19,25 +24,20 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
- java: ['8', '11']
+ java: ['11', '17', '21-ea']
steps:
- - uses: actions/checkout@v2
- - uses: actions/cache@v1
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-maven-
+ - uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v2
+ uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
- distribution: 'adopt'
+ distribution: 'temurin'
+ cache: 'maven'
- name: Build and Test on ${{ matrix.java }}
run: mvn clean -U -B install
- uses: actions/upload-artifact@v2
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}
- path: '**/surefire-reports/*.txt'
\ No newline at end of file
+ path: '**/surefire-reports/'
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 8488383..0ee13c5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,9 +23,9 @@
4.0.0
- org.jboss
- jboss-parent
- 38
+ org.jboss.logging
+ logging-parent
+ 1.0.1.Finalorg.jboss.logging
@@ -121,9 +121,6 @@
maven-javadoc-plugin
-
- http://docs.oracle.com/javase/8/docs/api
- publicJBoss Logging Tools, ${project.version}
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/MessageInterfaceFactory.java b/processor/src/main/java/org/jboss/logging/processor/apt/MessageInterfaceFactory.java
index 034d891..a7f743e 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/MessageInterfaceFactory.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/MessageInterfaceFactory.java
@@ -33,9 +33,11 @@
import java.util.Properties;
import java.util.Set;
import java.util.stream.Collectors;
+import javax.annotation.processing.Generated;
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.Modifier;
+import javax.lang.model.element.ModuleElement;
import javax.lang.model.element.TypeElement;
import javax.lang.model.type.TypeMirror;
import javax.lang.model.util.ElementFilter;
@@ -134,15 +136,8 @@ private AptMessageInterface(final TypeElement interfaceElement, final Processing
validIdRanges = Collections.emptyList();
}
// Determine the type for the generated annotation
- TypeElement generatedAnnotation = null;
- if (addGeneratedAnnotation) {
- generatedAnnotation = processingEnv.getElementUtils().getTypeElement("javax.annotation.Generated");
- if (generatedAnnotation == null) {
- // As of Java 9 the annotation has been moved to the javax.annotation.processing package
- generatedAnnotation = processingEnv.getElementUtils().getTypeElement("javax.annotation.processing.Generated");
- }
- }
- this.generatedAnnotation = generatedAnnotation;
+ final ModuleElement moduleElement = processingEnv.getElementUtils().getModuleElement(Generated.class.getModule().getName());
+ this.generatedAnnotation = processingEnv.getElementUtils().getTypeElement(moduleElement, Generated.class.getName());
}
@Override
From db55608e41ae18766afef1549ba88f3d43604836 Mon Sep 17 00:00:00 2001
From: "James R. Perkins"
Date: Tue, 15 Aug 2023 08:04:54 -0700
Subject: [PATCH 04/10] Enable auto-formatting of source files.
Signed-off-by: James R. Perkins
---
.github/workflows/build.yml | 18 +++++++++++++-
.gitignore | 1 +
pom.xml | 47 +++++++++++++++++++++++++++++++++++++
3 files changed, 65 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index dd8a796..84f257e 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -40,4 +40,20 @@ jobs:
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}
- path: '**/surefire-reports/'
\ No newline at end of file
+ path: '**/surefire-reports/'
+
+ format-check:
+ runs-on: ubuntu-latest
+ timeout-minutes: 30
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up JDK 17
+ uses: actions/setup-java@v3
+ with:
+ java-version: 17
+ distribution: 'temurin'
+ cache: 'maven'
+ - name: Validate Formatting
+ run: |
+ mvn -B validate -Pformat-check -Denforcer.skip=true
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 267adba..978bfdb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
#Ignore Maven target folder
target/
+.cache
#Ignore Eclipse files
.settings/
diff --git a/pom.xml b/pom.xml
index 0ee13c5..7bc94c2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -129,6 +129,16 @@
+
+
+ net.revelc.code.formatter
+ formatter-maven-plugin
+
+
+ net.revelc.code
+ impsort-maven-plugin
+
+
@@ -136,4 +146,41 @@
processordocs
+
+
+
+ format-check
+
+
+
+
+ net.revelc.code.formatter
+ formatter-maven-plugin
+
+
+ validate-format
+ validate
+
+ validate
+
+
+
+
+
+ net.revelc.code
+ impsort-maven-plugin
+
+
+ check-import-sort
+ validate
+
+ check
+
+
+
+
+
+
+
+
From 2388e14d7db1db9a7840375ca1336c8e531d1eca Mon Sep 17 00:00:00 2001
From: "James R. Perkins"
Date: Tue, 15 Aug 2023 08:05:32 -0700
Subject: [PATCH 05/10] Format source files.
Signed-off-by: James R. Perkins
---
.../org/jboss/logging/annotations/Field.java | 4 +-
.../org/jboss/logging/annotations/Fields.java | 1 -
.../jboss/logging/annotations/FormatWith.java | 4 +-
.../jboss/logging/annotations/LogMessage.java | 2 +-
.../logging/annotations/LoggingClass.java | 2 +-
.../jboss/logging/annotations/Message.java | 4 +-
.../logging/annotations/MessageBundle.java | 2 +-
.../logging/annotations/MessageLogger.java | 4 +-
.../jboss/logging/annotations/Properties.java | 1 -
.../jboss/logging/annotations/Property.java | 5 +-
.../logging/annotations/ResolutionDoc.java | 2 +-
.../jboss/logging/annotations/Signature.java | 3 +-
.../jboss/logging/annotations/Transform.java | 3 +-
.../annotations/TransformException.java | 12 +-
.../logging/tools/examples/AppLogger.java | 2 +-
.../logging/tools/examples/ContentWriter.java | 2 +-
.../tools/examples/ContentWriterBuilder.java | 5 +-
.../logging/tools/examples/ErrorMessages.java | 5 +-
.../processor/apt/AbstractGenerator.java | 19 +--
.../apt/ImplementationClassGenerator.java | 5 +-
.../processor/apt/LoggingToolsProcessor.java | 16 +-
.../apt/MessageInterfaceFactory.java | 29 ++--
.../processor/apt/MessageMethodBuilder.java | 18 +-
.../processor/apt/ParameterFactory.java | 14 +-
.../processor/apt/ProcessingException.java | 9 +-
.../processor/apt/ReportFileGenerator.java | 13 +-
.../processor/apt/ReturnTypeFactory.java | 8 +-
.../processor/apt/ThrowableTypeFactory.java | 22 ++-
.../logging/processor/apt/ToolLogger.java | 5 +-
.../apt/TranslationClassGenerator.java | 26 ++-
.../apt/TranslationFileGenerator.java | 18 +-
.../apt/report/IndentingXmlWriter.java | 13 +-
.../processor/apt/report/ReportType.java | 1 +
.../processor/apt/report/ReportWriter.java | 4 +-
.../processor/apt/report/XmlReportWriter.java | 4 +-
.../processor/generator/model/ClassModel.java | 18 +-
.../generator/model/ClassModelFactory.java | 25 ++-
.../generator/model/ClassModelHelper.java | 7 +-
.../model/ImplementationClassModel.java | 55 ++++---
.../model/MessageBundleImplementor.java | 5 +-
.../model/MessageBundleTranslator.java | 5 +-
.../model/MessageLoggerImplementor.java | 25 ++-
.../model/MessageLoggerTranslator.java | 7 +-
.../processor/model/DelegatingElement.java | 1 +
.../model/DelegatingExecutableElement.java | 1 +
.../model/DelegatingTypeElement.java | 1 +
.../processor/model/LoggerMessageMethod.java | 2 +-
.../processor/model/MessageInterface.java | 3 +-
.../logging/processor/model/ReturnType.java | 1 +
.../processor/model/ThrowableType.java | 2 +-
.../logging/processor/util/ElementHelper.java | 47 +++---
.../logging/processor/util/Expressions.java | 3 +-
.../jboss/logging/processor/util/Objects.java | 1 -
.../validation/AbstractFormatPart.java | 6 +-
.../validation/FormatValidatorFactory.java | 2 -
.../validation/IdLengthValidator.java | 6 +-
.../validation/IdRangeValidator.java | 9 +-
.../validation/MessageFormatPart.java | 25 +--
.../validation/MessageFormatValidator.java | 7 +-
.../validation/MessageIdValidator.java | 11 +-
.../validation/PropertyValidator.java | 37 +++--
.../validation/StringFormatPart.java | 60 ++++---
.../validation/StringFormatValidator.java | 36 ++--
.../validation/ValidationMessageFactory.java | 21 ++-
.../processor/validation/Validator.java | 155 ++++++++++++------
.../generated/MethodMessageConstants.java | 2 +-
.../generated/SignatureMessages.java | 4 +-
.../processor/generated/TransformLogger.java | 33 ++--
.../generated/TransformMessages.java | 33 ++--
.../processor/generated/ValidLogger.java | 2 +-
.../processor/generated/ValidMessages.java | 22 ++-
.../tests/GeneratedSkeletonTest.java | 4 +-
.../tests/GeneratedSourceAnalysisTest.java | 65 +++++---
.../generated/tests/LevelIdCheckTest.java | 1 -
.../processor/generated/tests/LoggerTest.java | 4 +-
.../tests/LoggerVerificationTest.java | 6 +-
.../generated/tests/MessagesTest.java | 29 ++--
.../generated/tests/TransformTest.java | 126 +++++++++-----
.../report/ReportGenerationTest.java | 4 +-
.../processor/report/TestReportMessages.java | 1 +
.../processor/util/ExpressionsTest.java | 3 +-
81 files changed, 757 insertions(+), 453 deletions(-)
diff --git a/annotations/src/main/java/org/jboss/logging/annotations/Field.java b/annotations/src/main/java/org/jboss/logging/annotations/Field.java
index 274ebb6..7c90cff 100644
--- a/annotations/src/main/java/org/jboss/logging/annotations/Field.java
+++ b/annotations/src/main/java/org/jboss/logging/annotations/Field.java
@@ -40,13 +40,13 @@
* @author James R. Perkins
*/
@Retention(CLASS)
-@Target({PARAMETER, METHOD})
+@Target({ PARAMETER, METHOD })
@Repeatable(Fields.class)
@Documented
public @interface Field {
/**
- * The field name. If not specified, the parameter name is assumed to be the field name.
+ * The field name. If not specified, the parameter name is assumed to be the field name.
*
* This becomes a required attrubyte if this annotation is present on a method.
*
diff --git a/annotations/src/main/java/org/jboss/logging/annotations/Fields.java b/annotations/src/main/java/org/jboss/logging/annotations/Fields.java
index bc79c72..bc69fe0 100644
--- a/annotations/src/main/java/org/jboss/logging/annotations/Fields.java
+++ b/annotations/src/main/java/org/jboss/logging/annotations/Fields.java
@@ -17,7 +17,6 @@
* limitations under the License.
*/
-
package org.jboss.logging.annotations;
import static java.lang.annotation.ElementType.METHOD;
diff --git a/annotations/src/main/java/org/jboss/logging/annotations/FormatWith.java b/annotations/src/main/java/org/jboss/logging/annotations/FormatWith.java
index a29ffc1..dc1af11 100644
--- a/annotations/src/main/java/org/jboss/logging/annotations/FormatWith.java
+++ b/annotations/src/main/java/org/jboss/logging/annotations/FormatWith.java
@@ -27,8 +27,8 @@
import java.lang.annotation.Target;
/**
- * Indicate that the given parameter should be wrapped with a formatting object of the given class. The class
- * must have a one-argument constructor which unambiguously accepts a value of this parameter's type. The resultant
+ * Indicate that the given parameter should be wrapped with a formatting object of the given class. The class
+ * must have a one-argument constructor which unambiguously accepts a value of this parameter's type. The resultant
* object will be passed in as a parameter to the underlying format type; thus its {@link Object#toString() toString()}
* method will be invoked (or, if the format style is {@link Message.Format#PRINTF PRINTF}, the object may implement
* {@link java.util.Formattable Formattable} to get extra functionality).
diff --git a/annotations/src/main/java/org/jboss/logging/annotations/LogMessage.java b/annotations/src/main/java/org/jboss/logging/annotations/LogMessage.java
index 88cd061..7f37e3c 100644
--- a/annotations/src/main/java/org/jboss/logging/annotations/LogMessage.java
+++ b/annotations/src/main/java/org/jboss/logging/annotations/LogMessage.java
@@ -41,7 +41,7 @@
public @interface LogMessage {
/**
- * The log level at which this message should be logged. Defaults to {@code INFO}.
+ * The log level at which this message should be logged. Defaults to {@code INFO}.
*
* @return the log level
*/
diff --git a/annotations/src/main/java/org/jboss/logging/annotations/LoggingClass.java b/annotations/src/main/java/org/jboss/logging/annotations/LoggingClass.java
index 88650bb..4db9b9a 100644
--- a/annotations/src/main/java/org/jboss/logging/annotations/LoggingClass.java
+++ b/annotations/src/main/java/org/jboss/logging/annotations/LoggingClass.java
@@ -27,7 +27,7 @@
import java.lang.annotation.Target;
/**
- * Mark a parameter as specifying the name of the logging class to use. The parameter
+ * Mark a parameter as specifying the name of the logging class to use. The parameter
* may have a type of {@link Class}.
*
* @author David M. Lloyd
diff --git a/annotations/src/main/java/org/jboss/logging/annotations/Message.java b/annotations/src/main/java/org/jboss/logging/annotations/Message.java
index 7728557..40be3c6 100644
--- a/annotations/src/main/java/org/jboss/logging/annotations/Message.java
+++ b/annotations/src/main/java/org/jboss/logging/annotations/Message.java
@@ -27,7 +27,7 @@
import java.lang.annotation.Target;
/**
- * Assigns a message string to a resource method. The method arguments are used to supply the positional parameter
+ * Assigns a message string to a resource method. The method arguments are used to supply the positional parameter
* values for the method.
*
* @author David M. Lloyd
@@ -47,7 +47,7 @@
int INHERIT = -1;
/**
- * The message ID number. Only one message with a given name may specify an ID other than {@link #INHERIT}.
+ * The message ID number. Only one message with a given name may specify an ID other than {@link #INHERIT}.
*
* @return the message ID number
*/
diff --git a/annotations/src/main/java/org/jboss/logging/annotations/MessageBundle.java b/annotations/src/main/java/org/jboss/logging/annotations/MessageBundle.java
index e09dffc..c7000e7 100644
--- a/annotations/src/main/java/org/jboss/logging/annotations/MessageBundle.java
+++ b/annotations/src/main/java/org/jboss/logging/annotations/MessageBundle.java
@@ -38,7 +38,7 @@
public @interface MessageBundle {
/**
- * Get the project code for messages that have an associated code. If no project code is associated
+ * Get the project code for messages that have an associated code. If no project code is associated
* with this bundle, specify {@code ""} (the empty string).
*
* @return the project code
diff --git a/annotations/src/main/java/org/jboss/logging/annotations/MessageLogger.java b/annotations/src/main/java/org/jboss/logging/annotations/MessageLogger.java
index c7dc8dc..3aa179c 100644
--- a/annotations/src/main/java/org/jboss/logging/annotations/MessageLogger.java
+++ b/annotations/src/main/java/org/jboss/logging/annotations/MessageLogger.java
@@ -28,7 +28,7 @@
import java.util.Locale;
/**
- * Signify that an interface is a typed logger interface. A message logger interface may optionally extend other
+ * Signify that an interface is a typed logger interface. A message logger interface may optionally extend other
* message logger interfaces and message bundle interfaces (see {@link org.jboss.logging.annotations.MessageBundle}, as
* well as the {@link org.jboss.logging.BasicLogger} interface.
*
@@ -40,7 +40,7 @@
public @interface MessageLogger {
/**
- * Get the project code for messages that have an associated code. If no project code is associated
+ * Get the project code for messages that have an associated code. If no project code is associated
* with this logger, specify {@code ""} (the empty string).
*
* @return the project code
diff --git a/annotations/src/main/java/org/jboss/logging/annotations/Properties.java b/annotations/src/main/java/org/jboss/logging/annotations/Properties.java
index 745a594..e433e5b 100644
--- a/annotations/src/main/java/org/jboss/logging/annotations/Properties.java
+++ b/annotations/src/main/java/org/jboss/logging/annotations/Properties.java
@@ -17,7 +17,6 @@
* limitations under the License.
*/
-
package org.jboss.logging.annotations;
import static java.lang.annotation.ElementType.METHOD;
diff --git a/annotations/src/main/java/org/jboss/logging/annotations/Property.java b/annotations/src/main/java/org/jboss/logging/annotations/Property.java
index db5ca3f..55c4cc2 100644
--- a/annotations/src/main/java/org/jboss/logging/annotations/Property.java
+++ b/annotations/src/main/java/org/jboss/logging/annotations/Property.java
@@ -17,7 +17,6 @@
* limitations under the License.
*/
-
package org.jboss.logging.annotations;
import static java.lang.annotation.ElementType.METHOD;
@@ -42,13 +41,13 @@
* @author James R. Perkins
*/
@Retention(CLASS)
-@Target({PARAMETER, METHOD})
+@Target({ PARAMETER, METHOD })
@Repeatable(Properties.class)
@Documented
public @interface Property {
/**
- * The property name. If not specified, the parameter name is assumed to be the property name.
+ * The property name. If not specified, the parameter name is assumed to be the property name.
*
* This becomes a required attribute if this annotation is present on a method.
*
diff --git a/annotations/src/main/java/org/jboss/logging/annotations/ResolutionDoc.java b/annotations/src/main/java/org/jboss/logging/annotations/ResolutionDoc.java
index fbe7367..973f86e 100644
--- a/annotations/src/main/java/org/jboss/logging/annotations/ResolutionDoc.java
+++ b/annotations/src/main/java/org/jboss/logging/annotations/ResolutionDoc.java
@@ -67,7 +67,7 @@
* @author James R. Perkins
* @since 1.2
*/
-@Target({METHOD, TYPE})
+@Target({ METHOD, TYPE })
@Retention(CLASS)
@Documented
public @interface ResolutionDoc {
diff --git a/annotations/src/main/java/org/jboss/logging/annotations/Signature.java b/annotations/src/main/java/org/jboss/logging/annotations/Signature.java
index 4a4227f..3715be2 100644
--- a/annotations/src/main/java/org/jboss/logging/annotations/Signature.java
+++ b/annotations/src/main/java/org/jboss/logging/annotations/Signature.java
@@ -30,7 +30,8 @@
* Specifies the exact signature to use when creating a {@link Throwable} return type.
*
*
- * Given the following exception and message bundle interface method the {@code InvalidIntValueException(final RuntimeException cause, final String msg, final int value)}
+ * Given the following exception and message bundle interface method the
+ * {@code InvalidIntValueException(final RuntimeException cause, final String msg, final int value)}
* constructor would be used.
*
*
diff --git a/annotations/src/main/java/org/jboss/logging/annotations/Transform.java b/annotations/src/main/java/org/jboss/logging/annotations/Transform.java
index be32710..014487a 100644
--- a/annotations/src/main/java/org/jboss/logging/annotations/Transform.java
+++ b/annotations/src/main/java/org/jboss/logging/annotations/Transform.java
@@ -27,7 +27,8 @@
import java.lang.annotation.Target;
/**
- * Indicate the given parameter should be transformed in each of the {@link org.jboss.logging.annotations.Transform.TransformType transform types}
+ * Indicate the given parameter should be transformed in each of the
+ * {@link org.jboss.logging.annotations.Transform.TransformType transform types}
* provided. The parameter cannot be a primitive type.
*
* For the {@link TransformType#SIZE} type, the object must be a {@link String}, a {@link java.util.Collection}, a
diff --git a/annotations/src/main/java/org/jboss/logging/annotations/TransformException.java b/annotations/src/main/java/org/jboss/logging/annotations/TransformException.java
index 4005fd4..d473ba4 100644
--- a/annotations/src/main/java/org/jboss/logging/annotations/TransformException.java
+++ b/annotations/src/main/java/org/jboss/logging/annotations/TransformException.java
@@ -35,10 +35,14 @@
*
*
* In the above example an exception is created based on the {@code toCopy} parameter. If the {@code toCopy} parameter
* is a {@link java.net.BindException} then a {@link java.net.BindException} is created and the stack trace from the
diff --git a/docs/src/main/java/org/jboss/logging/tools/examples/AppLogger.java b/docs/src/main/java/org/jboss/logging/tools/examples/AppLogger.java
index dcc3b60..32b6ddf 100644
--- a/docs/src/main/java/org/jboss/logging/tools/examples/AppLogger.java
+++ b/docs/src/main/java/org/jboss/logging/tools/examples/AppLogger.java
@@ -38,7 +38,7 @@
*
* @author James R. Perkins
*/
-@SuppressWarnings({"unused", "SameParameterValue"})
+@SuppressWarnings({ "unused", "SameParameterValue" })
@MessageLogger(projectCode = "CW")
@ResolutionDoc(url = "errors", suffix = ".html")
public interface AppLogger extends BasicLogger {
diff --git a/docs/src/main/java/org/jboss/logging/tools/examples/ContentWriter.java b/docs/src/main/java/org/jboss/logging/tools/examples/ContentWriter.java
index d775dcb..ce51fb0 100644
--- a/docs/src/main/java/org/jboss/logging/tools/examples/ContentWriter.java
+++ b/docs/src/main/java/org/jboss/logging/tools/examples/ContentWriter.java
@@ -32,7 +32,7 @@
*
* @author James R. Perkins
*/
-@SuppressWarnings({"unused", "WeakerAccess"})
+@SuppressWarnings({ "unused", "WeakerAccess" })
public class ContentWriter implements Closeable, Flushable {
private final Object outputLock = new Object();
diff --git a/docs/src/main/java/org/jboss/logging/tools/examples/ContentWriterBuilder.java b/docs/src/main/java/org/jboss/logging/tools/examples/ContentWriterBuilder.java
index d2fd596..15b0443 100644
--- a/docs/src/main/java/org/jboss/logging/tools/examples/ContentWriterBuilder.java
+++ b/docs/src/main/java/org/jboss/logging/tools/examples/ContentWriterBuilder.java
@@ -41,7 +41,6 @@ public class ContentWriterBuilder {
private boolean append = true;
private String encoding = null;
-
private ContentWriterBuilder(final Path path) {
this.path = path;
}
@@ -95,9 +94,9 @@ public ContentWriterBuilder setAppend(final boolean append) {
public ContentWriter build() throws IOException {
final OpenOption[] options;
if (append) {
- options = new OpenOption[] {StandardOpenOption.CREATE, StandardOpenOption.APPEND};
+ options = new OpenOption[] { StandardOpenOption.CREATE, StandardOpenOption.APPEND };
} else {
- options = new OpenOption[] {StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING};
+ options = new OpenOption[] { StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING };
}
Charset charset = StandardCharsets.UTF_8;
if (encoding != null) {
diff --git a/docs/src/main/java/org/jboss/logging/tools/examples/ErrorMessages.java b/docs/src/main/java/org/jboss/logging/tools/examples/ErrorMessages.java
index a6ab8b5..39b5fe4 100644
--- a/docs/src/main/java/org/jboss/logging/tools/examples/ErrorMessages.java
+++ b/docs/src/main/java/org/jboss/logging/tools/examples/ErrorMessages.java
@@ -131,7 +131,7 @@ public interface ErrorMessages {
* Uses the producer function to create the returned exception indicating the operation has failed.
*
* The formatted value of the message will be the first parameter for the functions
- * {@linkplain BiFunction#apply(Object, Object)} apply} method. The second parameter will be the cause.
+ * {@linkplain BiFunction#apply(Object, Object)} apply} method. The second parameter will be the cause.
*
*
* @param fn the function to produce the returned exception
@@ -141,5 +141,6 @@ public interface ErrorMessages {
*
* @return the produced exception for the error
*/
- T operationFailed(@Producer BiFunction fn, @Cause IOException cause, String name);
+ T operationFailed(@Producer BiFunction fn, @Cause IOException cause,
+ String name);
}
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/AbstractGenerator.java b/processor/src/main/java/org/jboss/logging/processor/apt/AbstractGenerator.java
index d43c4f0..06aa5ee 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/AbstractGenerator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/AbstractGenerator.java
@@ -18,28 +18,15 @@
*/
package org.jboss.logging.processor.apt;
-import java.io.Writer;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
import java.util.Set;
-import javax.annotation.processing.Filer;
+
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.SupportedOptions;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.AnnotationValue;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.Name;
-import javax.lang.model.element.PackageElement;
import javax.lang.model.element.TypeElement;
-import javax.lang.model.util.Elements;
-import javax.lang.model.util.Types;
-import org.jboss.logging.processor.model.DelegatingElement;
-import org.jboss.logging.processor.model.DelegatingTypeElement;
import org.jboss.logging.processor.model.MessageInterface;
/**
@@ -71,8 +58,8 @@ public abstract class AbstractGenerator {
* @param element the element that contains the methods.
* @param messageInterface the message interface to implement.
*/
- public abstract void processTypeElement(final TypeElement annotation, final TypeElement element, final MessageInterface messageInterface);
-
+ public abstract void processTypeElement(final TypeElement annotation, final TypeElement element,
+ final MessageInterface messageInterface);
/**
* Returns the logger to log messages with.
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/ImplementationClassGenerator.java b/processor/src/main/java/org/jboss/logging/processor/apt/ImplementationClassGenerator.java
index 888802e..0858244 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/ImplementationClassGenerator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/ImplementationClassGenerator.java
@@ -21,13 +21,13 @@
import java.io.IOException;
import java.util.Map;
+
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.TypeElement;
import org.jboss.logging.processor.generator.model.ClassModel;
import org.jboss.logging.processor.generator.model.ClassModelFactory;
import org.jboss.logging.processor.model.MessageInterface;
-import org.jboss.logging.processor.util.VersionComparator;
/**
* A generator for creating implementations of message bundle and logging
@@ -51,7 +51,8 @@ public ImplementationClassGenerator(ProcessingEnvironment processingEnv) {
}
@Override
- public void processTypeElement(final TypeElement annotation, final TypeElement element, final MessageInterface messageInterface) {
+ public void processTypeElement(final TypeElement annotation, final TypeElement element,
+ final MessageInterface messageInterface) {
try {
final ClassModel classModel = ClassModelFactory.implementation(processingEnv, messageInterface);
classModel.generateAndWrite();
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/LoggingToolsProcessor.java b/processor/src/main/java/org/jboss/logging/processor/apt/LoggingToolsProcessor.java
index c200d19..7c1b429 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/LoggingToolsProcessor.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/LoggingToolsProcessor.java
@@ -36,6 +36,7 @@
import java.util.List;
import java.util.Properties;
import java.util.Set;
+
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.RoundEnvironment;
@@ -86,7 +87,8 @@ public class LoggingToolsProcessor extends AbstractProcessor {
public static final String DEBUG_OPTION = "debug";
static final String EXPRESSION_PROPERTIES = "org.jboss.logging.tools.expressionProperties";
static final String ADD_GENERATED_ANNOTATION = "org.jboss.logging.tools.addGeneratedAnnotation";
- private final List interfaceAnnotations = Arrays.asList(MessageBundle.class.getName(), MessageLogger.class.getName());
+ private final List interfaceAnnotations = Arrays.asList(MessageBundle.class.getName(),
+ MessageLogger.class.getName());
private final List generators;
private final Set supportedAnnotations;
private ToolLogger logger;
@@ -113,8 +115,7 @@ public LoggingToolsProcessor() {
Signature.class,
Transform.class,
ValidIdRange.class,
- ValidIdRanges.class
- );
+ ValidIdRanges.class);
}
@Override
@@ -183,7 +184,8 @@ private void doProcess(final Set extends TypeElement> annotations, final Round
}
}
}
- final boolean addGeneratedAnnotation = Boolean.parseBoolean(processingEnv.getOptions().getOrDefault(ADD_GENERATED_ANNOTATION, "true"));
+ final boolean addGeneratedAnnotation = Boolean
+ .parseBoolean(processingEnv.getOptions().getOrDefault(ADD_GENERATED_ANNOTATION, "true"));
boolean generate = true;
final Validator validator = new Validator(processingEnv);
@@ -195,7 +197,8 @@ private void doProcess(final Set extends TypeElement> annotations, final Round
final Set extends TypeElement> interfaces = typesIn(roundEnv.getElementsAnnotatedWith(annotation));
for (TypeElement interfaceElement : interfaces) {
try {
- final MessageInterface messageInterface = MessageInterfaceFactory.of(processingEnv, interfaceElement, expressionProperties, addGeneratedAnnotation);
+ final MessageInterface messageInterface = MessageInterfaceFactory.of(processingEnv,
+ interfaceElement, expressionProperties, addGeneratedAnnotation);
final Collection validationMessages = validator.validate(messageInterface);
for (ValidationMessage message : validationMessages) {
if (message.printMessage(processingEnv.getMessager())) {
@@ -220,7 +223,8 @@ private void doProcess(final Set extends TypeElement> annotations, final Round
} else if (value == null) {
processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, e.getMessage(), element, a);
} else {
- processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, e.getMessage(), element, a, value);
+ processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, e.getMessage(), element, a,
+ value);
}
}
}
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/MessageInterfaceFactory.java b/processor/src/main/java/org/jboss/logging/processor/apt/MessageInterfaceFactory.java
index a7f743e..b404435 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/MessageInterfaceFactory.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/MessageInterfaceFactory.java
@@ -33,6 +33,7 @@
import java.util.Properties;
import java.util.Set;
import java.util.stream.Collectors;
+
import javax.annotation.processing.Generated;
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.ExecutableElement;
@@ -78,9 +79,10 @@ private MessageInterfaceFactory() {
* @return a message interface for the interface element.
*/
public static MessageInterface of(final ProcessingEnvironment processingEnv, final TypeElement interfaceElement,
- final Properties expressionProperties, final boolean addGeneratedAnnotation) {
+ final Properties expressionProperties, final boolean addGeneratedAnnotation) {
final Types types = processingEnv.getTypeUtils();
- if (types.isSameType(interfaceElement.asType(), ElementHelper.toType(processingEnv.getElementUtils(), BasicLogger.class))) {
+ if (types.isSameType(interfaceElement.asType(),
+ ElementHelper.toType(processingEnv.getElementUtils(), BasicLogger.class))) {
MessageInterface result = LOGGER_INTERFACE;
if (result == null) {
synchronized (LOCK) {
@@ -93,10 +95,12 @@ public static MessageInterface of(final ProcessingEnvironment processingEnv, fin
}
return result;
}
- final AptMessageInterface result = new AptMessageInterface(interfaceElement, processingEnv, expressionProperties, addGeneratedAnnotation);
+ final AptMessageInterface result = new AptMessageInterface(interfaceElement, processingEnv, expressionProperties,
+ addGeneratedAnnotation);
result.init();
for (TypeMirror typeMirror : interfaceElement.getInterfaces()) {
- final MessageInterface extended = MessageInterfaceFactory.of(processingEnv, (TypeElement) types.asElement(typeMirror),
+ final MessageInterface extended = MessageInterfaceFactory.of(processingEnv,
+ (TypeElement) types.asElement(typeMirror),
expressionProperties, addGeneratedAnnotation);
result.extendedInterfaces.add(extended);
result.extendedInterfaces.addAll(extended.extendedInterfaces());
@@ -122,7 +126,7 @@ private static class AptMessageInterface extends AbstractClassType implements Me
private int idLen;
private AptMessageInterface(final TypeElement interfaceElement, final ProcessingEnvironment processingEnv,
- final Properties expressionProperties, final boolean addGeneratedAnnotation) {
+ final Properties expressionProperties, final boolean addGeneratedAnnotation) {
super(processingEnv, interfaceElement);
this.interfaceElement = interfaceElement;
this.expressionProperties = expressionProperties;
@@ -136,7 +140,8 @@ private AptMessageInterface(final TypeElement interfaceElement, final Processing
validIdRanges = Collections.emptyList();
}
// Determine the type for the generated annotation
- final ModuleElement moduleElement = processingEnv.getElementUtils().getModuleElement(Generated.class.getModule().getName());
+ final ModuleElement moduleElement = processingEnv.getElementUtils()
+ .getModuleElement(Generated.class.getModule().getName());
this.generatedAnnotation = processingEnv.getElementUtils().getTypeElement(moduleElement, Generated.class.getName());
}
@@ -189,7 +194,8 @@ private void init() {
projectCode = messageLogger.projectCode();
idLen = messageLogger.length();
} else {
- throw new ProcessingException(interfaceElement, "Interface is not annotated with @MessageBundle or @MessageLogger");
+ throw new ProcessingException(interfaceElement,
+ "Interface is not annotated with @MessageBundle or @MessageLogger");
}
qualifiedName = elements.getBinaryName(interfaceElement).toString();
final int lastDot = qualifiedName.lastIndexOf(".");
@@ -201,7 +207,8 @@ private void init() {
simpleName = qualifiedName;
}
// Get the FQCN
- final TypeElement loggingClass = ElementHelper.getClassAnnotationValue(interfaceElement, MessageLogger.class, "loggingClass");
+ final TypeElement loggingClass = ElementHelper.getClassAnnotationValue(interfaceElement, MessageLogger.class,
+ "loggingClass");
if (loggingClass != null) {
final String value = loggingClass.getQualifiedName().toString();
if (!value.equals(Void.class.getName())) {
@@ -240,7 +247,6 @@ public int getIdLength() {
return idLen;
}
-
@Override
public TypeElement getDelegate() {
return interfaceElement;
@@ -268,13 +274,11 @@ public boolean equals(final Object obj) {
return areEqual(name(), other.name());
}
-
@Override
public String toString() {
return ToStringBuilder.of(this).add(qualifiedName).toString();
}
-
}
private static class LoggerInterface extends AbstractClassType implements MessageInterface {
@@ -295,7 +299,8 @@ private void init() {
}
static LoggerInterface of(final ProcessingEnvironment processingEnv) {
- final LoggerInterface result = new LoggerInterface(processingEnv, ElementHelper.toTypeElement(processingEnv, BasicLogger.class));
+ final LoggerInterface result = new LoggerInterface(processingEnv,
+ ElementHelper.toTypeElement(processingEnv, BasicLogger.class));
result.init();
return result;
}
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/MessageMethodBuilder.java b/processor/src/main/java/org/jboss/logging/processor/apt/MessageMethodBuilder.java
index 540deff..443e50c 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/MessageMethodBuilder.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/MessageMethodBuilder.java
@@ -37,6 +37,7 @@
import java.util.Properties;
import java.util.Set;
import java.util.function.Supplier;
+
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.ExecutableElement;
@@ -106,7 +107,8 @@ Set build() {
}
// Check to see if the method is overloaded
if (resultMethod.isOverloaded()) {
- resultMethod.messageMethodName = resultMethod.name() + resultMethod.formatParameterCount() + MESSAGE_METHOD_SUFFIX;
+ resultMethod.messageMethodName = resultMethod.name() + resultMethod.formatParameterCount()
+ + MESSAGE_METHOD_SUFFIX;
resultMethod.translationKey = resultMethod.name() + "." + resultMethod.formatParameterCount();
} else {
resultMethod.messageMethodName = resultMethod.name() + MESSAGE_METHOD_SUFFIX;
@@ -175,7 +177,8 @@ private boolean hasMessageId(final Message message) {
return message != null && (message.id() != Message.NONE && message.id() != Message.INHERIT);
}
- private Collection findByName(final Collection methods, final ExecutableElement method) {
+ private Collection findByName(final Collection methods,
+ final ExecutableElement method) {
final Name methodName = method.getSimpleName();
final List result = new ArrayList<>();
final int paramCount = parameterCount(method.getParameters());
@@ -187,7 +190,6 @@ private Collection findByName(final Collection methods, fin
private boolean isOverloaded(final Collection methods, final ExecutableElement method) {
final Collection allMethods = findByName(methods, method.getSimpleName());
for (ExecutableElement m : allMethods) {
- if (method.getSimpleName().equals(m.getSimpleName()) && parameterCount(method.getParameters()) != parameterCount(m.getParameters())) {
+ if (method.getSimpleName().equals(m.getSimpleName())
+ && parameterCount(method.getParameters()) != parameterCount(m.getParameters())) {
return true;
}
}
@@ -367,7 +370,8 @@ public Set parameters() {
@Override
public Set parametersAnnotatedWith(final Class extends Annotation> annotation) {
final TypeElement type = ElementHelper.toTypeElement(elements, annotation);
- return parameters.containsKey(type.asType()) ? Collections.unmodifiableSet(parameters.get(type.asType())) : Collections.emptySet();
+ return parameters.containsKey(type.asType()) ? Collections.unmodifiableSet(parameters.get(type.asType()))
+ : Collections.emptySet();
}
@Override
@@ -474,7 +478,8 @@ public int compareTo(final MessageMethod o) {
result = Comparison.GREATER;
}
// Short circuit
- if (result != Comparison.EQUAL) break;
+ if (result != Comparison.EQUAL)
+ break;
}
}
return result;
@@ -488,7 +493,6 @@ public String getComment() {
private static class AptLoggerMessageMethod extends AptMessageMethod implements LoggerMessageMethod {
-
/**
* Private constructor for the
*
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/ParameterFactory.java b/processor/src/main/java/org/jboss/logging/processor/apt/ParameterFactory.java
index 351362b..203bea9 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/ParameterFactory.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/ParameterFactory.java
@@ -27,6 +27,7 @@
import java.util.List;
import java.util.Objects;
import java.util.Set;
+
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.Element;
import javax.lang.model.element.ExecutableElement;
@@ -102,13 +103,14 @@ private static class AptParameter extends AbstractClassType implements Parameter
/**
* Only allow construction from within the parent class.
*
- * @param processingEnv the annotation processing environment.
- * @param qualifiedType the qualified type name of the parameter.
- * @param param the parameter.
- * @param formatterClass the formatter class, or {@code null} if none
- * @param isVarArgs {@code true} if this is a vararg parameter, otherwise {@code false}.
+ * @param processingEnv the annotation processing environment.
+ * @param qualifiedType the qualified type name of the parameter.
+ * @param param the parameter.
+ * @param formatterClass the formatter class, or {@code null} if none
+ * @param isVarArgs {@code true} if this is a vararg parameter, otherwise {@code false}.
*/
- AptParameter(final ProcessingEnvironment processingEnv, final String qualifiedType, final VariableElement param, final String formatterClass, final boolean isVarArgs) {
+ AptParameter(final ProcessingEnvironment processingEnv, final String qualifiedType, final VariableElement param,
+ final String formatterClass, final boolean isVarArgs) {
super(processingEnv, param);
this.qualifiedType = qualifiedType;
this.param = param;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/ProcessingException.java b/processor/src/main/java/org/jboss/logging/processor/apt/ProcessingException.java
index 2e07e7d..5e5027b 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/ProcessingException.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/ProcessingException.java
@@ -62,7 +62,8 @@ public ProcessingException(final Element element, final AnnotationMirror annotat
* @param annotationValue the annotation value
* @param message the message
*/
- public ProcessingException(final Element element, final AnnotationMirror annotation, final AnnotationValue annotationValue, final String message) {
+ public ProcessingException(final Element element, final AnnotationMirror annotation, final AnnotationValue annotationValue,
+ final String message) {
super(message);
this.element = element;
this.annotation = annotation;
@@ -88,7 +89,8 @@ public ProcessingException(final Element element, final String format, final Obj
* @param format the format for the message
* @param args the arguments for the format
*/
- public ProcessingException(final Element element, final AnnotationMirror annotation, final String format, final Object... args) {
+ public ProcessingException(final Element element, final AnnotationMirror annotation, final String format,
+ final Object... args) {
this(element, annotation, null, format, args);
}
@@ -101,7 +103,8 @@ public ProcessingException(final Element element, final AnnotationMirror annotat
* @param format the format for the message
* @param args the arguments for the format
*/
- public ProcessingException(final Element element, final AnnotationMirror annotation, final AnnotationValue annotationValue, final String format, final Object... args) {
+ public ProcessingException(final Element element, final AnnotationMirror annotation, final AnnotationValue annotationValue,
+ final String format, final Object... args) {
super(String.format(format, args));
this.element = element;
this.annotation = annotation;
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/ReportFileGenerator.java b/processor/src/main/java/org/jboss/logging/processor/apt/ReportFileGenerator.java
index daaf08d..bf75cd6 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/ReportFileGenerator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/ReportFileGenerator.java
@@ -32,6 +32,7 @@
import java.util.Locale;
import java.util.Map;
import java.util.TreeSet;
+
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.SupportedOptions;
import javax.lang.model.element.TypeElement;
@@ -84,7 +85,8 @@ public class ReportFileGenerator extends AbstractGenerator {
}
@Override
- public void processTypeElement(final TypeElement annotation, final TypeElement element, final MessageInterface messageInterface) {
+ public void processTypeElement(final TypeElement annotation, final TypeElement element,
+ final MessageInterface messageInterface) {
if (reportType != null) {
try {
// Don't generate empty interfaces
@@ -97,8 +99,7 @@ public void processTypeElement(final TypeElement annotation, final TypeElement e
final String fileName = messageInterface.simpleName() + reportType.getExtension();
try (
final BufferedWriter writer = createWriter(messageInterface.packageName(), fileName);
- final ReportWriter reportWriter = ReportWriter.of(reportType, messageInterface, writer)
- ) {
+ final ReportWriter reportWriter = ReportWriter.of(reportType, messageInterface, writer)) {
reportWriter.writeHeader(reportTitle);
// Process the methods
for (MessageMethod messageMethod : getSortedMessageMethods(messageInterface)) {
@@ -114,9 +115,11 @@ public void processTypeElement(final TypeElement annotation, final TypeElement e
private BufferedWriter createWriter(final String packageName, final String fileName) throws IOException {
if (reportPath == null) {
- return new BufferedWriter(processingEnv.getFiler().createResource(StandardLocation.SOURCE_OUTPUT, packageName, fileName).openWriter());
+ return new BufferedWriter(processingEnv.getFiler()
+ .createResource(StandardLocation.SOURCE_OUTPUT, packageName, fileName).openWriter());
}
- final Path outputPath = Paths.get(reportPath, packageName.replace(".", FileSystems.getDefault().getSeparator()), fileName);
+ final Path outputPath = Paths.get(reportPath, packageName.replace(".", FileSystems.getDefault().getSeparator()),
+ fileName);
Files.createDirectories(outputPath.getParent());
return Files.newBufferedWriter(outputPath, StandardCharsets.UTF_8, StandardOpenOption.CREATE);
}
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/ReturnTypeFactory.java b/processor/src/main/java/org/jboss/logging/processor/apt/ReturnTypeFactory.java
index 837fd6f..fe2d568 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/ReturnTypeFactory.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/ReturnTypeFactory.java
@@ -24,6 +24,7 @@
import java.util.List;
import java.util.function.Supplier;
+
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.Element;
import javax.lang.model.element.TypeElement;
@@ -51,8 +52,8 @@ final class ReturnTypeFactory {
private ReturnTypeFactory() {
}
-
- public static ReturnType of(final ProcessingEnvironment processingEnv, final TypeMirror returnType, final MessageMethod method) {
+ public static ReturnType of(final ProcessingEnvironment processingEnv, final TypeMirror returnType,
+ final MessageMethod method) {
if (returnType.getKind() == TypeKind.VOID) {
return VoidReturnType.getInstance(processingEnv.getTypeUtils());
}
@@ -133,7 +134,8 @@ private void init() {
}
throwableReturnType = constructTypeValue.asType();
if (!types.isAssignable(throwableReturnType, resolvedType)) {
- throw new ProcessingException(method, "The requested type %s can not be assigned to %s.", throwableReturnType, resolvedType);
+ throw new ProcessingException(method, "The requested type %s can not be assigned to %s.",
+ throwableReturnType, resolvedType);
}
}
throwableType = ThrowableTypeFactory.forReturnType(processingEnv, throwableReturnType, method);
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/ThrowableTypeFactory.java b/processor/src/main/java/org/jboss/logging/processor/apt/ThrowableTypeFactory.java
index 7286035..5d74aa8 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/ThrowableTypeFactory.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/ThrowableTypeFactory.java
@@ -30,6 +30,7 @@
import java.util.List;
import java.util.Optional;
import java.util.Set;
+
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.Element;
import javax.lang.model.element.ExecutableElement;
@@ -66,7 +67,8 @@ private ThrowableTypeFactory() {
*
* @return the return type descriptor.
*/
- public static ThrowableType forReturnType(final ProcessingEnvironment processingEnv, final TypeMirror type, final MessageMethod messageMethod) {
+ public static ThrowableType forReturnType(final ProcessingEnvironment processingEnv, final TypeMirror type,
+ final MessageMethod messageMethod) {
final AptReturnThrowableType result = new AptReturnThrowableType(processingEnv, messageMethod, type);
result.init();
return result;
@@ -271,7 +273,8 @@ private static class AptReturnThrowableType extends AptThrowableType {
* @param messageMethod the message method.
* @param type the class name of the return type.
*/
- private AptReturnThrowableType(final ProcessingEnvironment processingEnv, final MessageMethod messageMethod, final TypeMirror type) {
+ private AptReturnThrowableType(final ProcessingEnvironment processingEnv, final MessageMethod messageMethod,
+ final TypeMirror type) {
super(processingEnv, type, (messageMethod.hasCause() ? messageMethod.cause().asType() : null));
this.messageMethod = messageMethod;
constructionParameters = new LinkedHashSet<>();
@@ -287,15 +290,18 @@ protected void init() {
final List args = ElementHelper.getClassArrayAnnotationValue(method, Signature.class, "value");
// Validate the constructor exists
if (!ElementHelper.hasConstructor(types, this, args)) {
- throw new ProcessingException(method, "Constructor of type %s could not be found with arguments %s", this.asType(), args);
+ throw new ProcessingException(method, "Constructor of type %s could not be found with arguments %s",
+ this.asType(), args);
}
final int causeIndex = signature.causeIndex();
final int messageIndex = signature.messageIndex();
// Note that the messageIndex is required and must be 0 or greater
if (messageIndex < 0) {
- throw new ProcessingException(method, "A messageIndex of 0 or greater is required. Value %d is invalid.", messageIndex);
+ throw new ProcessingException(method, "A messageIndex of 0 or greater is required. Value %d is invalid.",
+ messageIndex);
}
- final List methodConstructorParameters = new ArrayList<>(messageMethod.parametersAnnotatedWith(Param.class));
+ final List methodConstructorParameters = new ArrayList<>(
+ messageMethod.parametersAnnotatedWith(Param.class));
constructionParameters.clear();
useConstructionParameters = true;
@@ -323,7 +329,8 @@ protected void init() {
.stream()
.findFirst();
if (parameter.isPresent()) {
- final List suggestions = ElementHelper.getClassArrayAnnotationValue(parameter.get(), TransformException.class, "value");
+ final List suggestions = ElementHelper.getClassArrayAnnotationValue(parameter.get(),
+ TransformException.class, "value");
for (TypeMirror suggestion : suggestions) {
final AptThrowableType result = new AptThrowableType(processingEnv, suggestion, null);
result.init();
@@ -369,7 +376,8 @@ protected void init(final List extends VariableElement> params) {
}
}
// Short circuit
- if (!match) break;
+ if (!match)
+ break;
}
if (match) {
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/ToolLogger.java b/processor/src/main/java/org/jboss/logging/processor/apt/ToolLogger.java
index 26dc210..3892d54 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/ToolLogger.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/ToolLogger.java
@@ -25,6 +25,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+
import javax.annotation.processing.Messager;
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.Element;
@@ -290,7 +291,6 @@ private void log(final Kind kind, final Element element, final String message) {
}
}
-
private void log(final Kind kind, final Element element, final String messageFormat, final Object... args) {
try {
String message = ((args == null || args.length == 0) ? messageFormat : String.format(messageFormat, args));
@@ -310,7 +310,8 @@ private void log(final Kind kind, final Element element, final String messageFor
}
}
- private void log(final Kind kind, final Element element, final Throwable cause, final String messageFormat, final Object... args) {
+ private void log(final Kind kind, final Element element, final Throwable cause, final String messageFormat,
+ final Object... args) {
String stringCause = stackTraceToString(cause);
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/TranslationClassGenerator.java b/processor/src/main/java/org/jboss/logging/processor/apt/TranslationClassGenerator.java
index 1bc75cd..3365165 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/TranslationClassGenerator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/TranslationClassGenerator.java
@@ -37,6 +37,7 @@
import java.util.Properties;
import java.util.Set;
import java.util.regex.Pattern;
+
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.SupportedOptions;
import javax.lang.model.element.TypeElement;
@@ -87,7 +88,6 @@ final class TranslationClassGenerator extends AbstractGenerator {
private final String translationFilesPath;
private final boolean skipTranslations;
-
/**
* Construct an instance of the Translation
* Class Generator.
@@ -103,7 +103,8 @@ public TranslationClassGenerator(final ProcessingEnvironment processingEnv) {
}
@Override
- public void processTypeElement(final TypeElement annotation, final TypeElement element, final MessageInterface messageInterface) {
+ public void processTypeElement(final TypeElement annotation, final TypeElement element,
+ final MessageInterface messageInterface) {
if (skipTranslations) {
logger().debug(element, "Skipping processing of translation implementation");
return;
@@ -121,7 +122,8 @@ public void processTypeElement(final TypeElement annotation, final TypeElement e
}
}
- private Map> allInterfaceTranslations(final MessageInterface messageInterface, final List files) throws IOException {
+ private Map> allInterfaceTranslations(final MessageInterface messageInterface,
+ final List files) throws IOException {
final Map> validTranslations = new LinkedHashMap<>();
for (MessageInterface superInterface : messageInterface.extendedInterfaces()) {
validTranslations.putAll(allInterfaceTranslations(superInterface, findTranslationFiles(superInterface)));
@@ -208,14 +210,18 @@ private Map validateTranslationMessages(final MessageInte
validator.argumentCount(), messageMethod.formatParameterCount());
}
} else {
- logger().warn(messageMethod, "%s Resource Bundle: %s", validator.summaryMessage(), file.getAbsolutePath());
+ logger().warn(messageMethod, "%s Resource Bundle: %s", validator.summaryMessage(),
+ file.getAbsolutePath());
}
} else {
- logger().warn(messageMethod, "The translation message with key %s is ignored because value is empty or contains only whitespace", key);
+ logger().warn(messageMethod,
+ "The translation message with key %s is ignored because value is empty or contains only whitespace",
+ key);
}
} else {
- logger().warn(messageMethod, "The translation message with key %s have no corresponding messageMethod.", key);
+ logger().warn(messageMethod, "The translation message with key %s have no corresponding messageMethod.",
+ key);
}
}
@@ -233,18 +239,20 @@ private Map validateTranslationMessages(final MessageInte
* @param translationFile the translation file
* @param translations the translations message
*/
- private void generateSourceFileFor(final MessageInterface messageInterface, final File translationFile, final Map translations) {
+ private void generateSourceFileFor(final MessageInterface messageInterface, final File translationFile,
+ final Map translations) {
//Generate empty translation super class if needed
//Check if enclosing translation file exists, if not generate an empty super class
final String enclosingTranslationFileName = getEnclosingTranslationFileName(translationFile);
final File enclosingTranslationFile = new File(translationFile.getParent(), enclosingTranslationFileName);
if (!enclosingTranslationFileName.equals(translationFile.getName()) && !enclosingTranslationFile.exists()) {
- generateSourceFileFor(messageInterface, enclosingTranslationFile, Collections.emptyMap());
+ generateSourceFileFor(messageInterface, enclosingTranslationFile, Collections. emptyMap());
}
//Create source file
- final ClassModel classModel = ClassModelFactory.translation(processingEnv, messageInterface, getTranslationClassNameSuffix(translationFile.getName()), translations);
+ final ClassModel classModel = ClassModelFactory.translation(processingEnv, messageInterface,
+ getTranslationClassNameSuffix(translationFile.getName()), translations);
try {
classModel.generateAndWrite();
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/TranslationFileGenerator.java b/processor/src/main/java/org/jboss/logging/processor/apt/TranslationFileGenerator.java
index 9603e8b..fbc3d40 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/TranslationFileGenerator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/TranslationFileGenerator.java
@@ -36,6 +36,7 @@
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.SupportedOptions;
import javax.lang.model.element.Element;
@@ -60,11 +61,13 @@
* @author James R. Perkins
*/
@SuppressWarnings("MagicNumber")
-@SupportedOptions({TranslationFileGenerator.GENERATED_FILES_PATH_OPTION, TranslationFileGenerator.LEVEL_OPTION, TranslationFileGenerator.SKIP_INDEX})
+@SupportedOptions({ TranslationFileGenerator.GENERATED_FILES_PATH_OPTION, TranslationFileGenerator.LEVEL_OPTION,
+ TranslationFileGenerator.SKIP_INDEX })
final class TranslationFileGenerator extends AbstractGenerator {
private static final Map levels = new HashMap<>();
- private static final Pattern PATTERN = Pattern.compile("((@[a-zA-Z_0-9]+)\\s+([a-zA-Z_][a-zA-Z_0-9]*)\\s+([a-zA-Z_][a-zA-Z_0-9].*)\\s*)");
+ private static final Pattern PATTERN = Pattern
+ .compile("((@[a-zA-Z_0-9]+)\\s+([a-zA-Z_][a-zA-Z_0-9]*)\\s+([a-zA-Z_][a-zA-Z_0-9].*)\\s*)");
private static final String EMPTY_STRING = "";
private static final String JAVA_DOC_PARAM = "@param";
@@ -134,7 +137,8 @@ public String run() {
}
@Override
- public void processTypeElement(final TypeElement annotation, final TypeElement element, final MessageInterface messageInterface) {
+ public void processTypeElement(final TypeElement annotation, final TypeElement element,
+ final MessageInterface messageInterface) {
if (generatedFilesPath != null) {
if (element.getKind().isInterface()) {
String packageName = processingEnv.getElementUtils().getPackageOf(element).getQualifiedName().toString();
@@ -156,7 +160,8 @@ public void processTypeElement(final TypeElement annotation, final TypeElement e
* @param fileName the file name
* @param messageInterface the message interface
*/
- private void generateSkeletalTranslationFile(final String relativePath, final String fileName, final MessageInterface messageInterface) {
+ private void generateSkeletalTranslationFile(final String relativePath, final String fileName,
+ final MessageInterface messageInterface) {
if (messageInterface == null) {
throw new IllegalArgumentException("The translations parameter cannot be null");
}
@@ -192,7 +197,6 @@ private void generateSkeletalTranslationFile(final String relativePath, final St
}
}
-
}
/**
@@ -206,7 +210,8 @@ private void generateDefaultTranslationFile(final MessageInterface messageInterf
try {
if (generatedFilesPath == null) {
- final FileObject fileObject = processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT, messageInterface.packageName(), fileName);
+ final FileObject fileObject = processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT,
+ messageInterface.packageName(), fileName);
// Note the FileObject#openWriter() is used here. The FileObject#openOutputStream() returns an output stream
// that writes each byte separately which results in poor performance.
writer = new BufferedWriter(fileObject.openWriter());
@@ -249,7 +254,6 @@ private void generateDefaultTranslationFile(final MessageInterface messageInterf
}
}
-
}
private void writeSkeletonMessageMethod(final BufferedWriter writer, final MessageMethod messageMethod) throws IOException {
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/report/IndentingXmlWriter.java b/processor/src/main/java/org/jboss/logging/processor/apt/report/IndentingXmlWriter.java
index 9e4b5b0..0712daa 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/report/IndentingXmlWriter.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/report/IndentingXmlWriter.java
@@ -21,6 +21,7 @@
import java.util.Iterator;
import java.util.stream.Stream;
+
import javax.xml.namespace.NamespaceContext;
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
@@ -79,7 +80,8 @@ public void writeStartElement(final String namespaceURI, final String localName)
}
@Override
- public void writeStartElement(final String prefix, final String localName, final String namespaceURI) throws XMLStreamException {
+ public void writeStartElement(final String prefix, final String localName, final String namespaceURI)
+ throws XMLStreamException {
newline();
indent();
delegate.writeStartElement(prefix, localName, namespaceURI);
@@ -97,7 +99,8 @@ public void writeEmptyElement(final String namespaceURI, final String localName)
}
@Override
- public void writeEmptyElement(final String prefix, final String localName, final String namespaceURI) throws XMLStreamException {
+ public void writeEmptyElement(final String prefix, final String localName, final String namespaceURI)
+ throws XMLStreamException {
newline();
indent();
delegate.writeEmptyElement(prefix, localName, namespaceURI);
@@ -146,12 +149,14 @@ public void writeAttribute(final String localName, final String value) throws XM
}
@Override
- public void writeAttribute(final String prefix, final String namespaceURI, final String localName, final String value) throws XMLStreamException {
+ public void writeAttribute(final String prefix, final String namespaceURI, final String localName, final String value)
+ throws XMLStreamException {
delegate.writeAttribute(prefix, namespaceURI, localName, value);
}
@Override
- public void writeAttribute(final String namespaceURI, final String localName, final String value) throws XMLStreamException {
+ public void writeAttribute(final String namespaceURI, final String localName, final String value)
+ throws XMLStreamException {
delegate.writeAttribute(namespaceURI, localName, value);
}
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/report/ReportType.java b/processor/src/main/java/org/jboss/logging/processor/apt/report/ReportType.java
index 9236242..7352c69 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/report/ReportType.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/report/ReportType.java
@@ -27,6 +27,7 @@
public enum ReportType {
ASCIIDOC(".adoc"),
XML(".xml");
+
private final String extension;
ReportType(final String extension) {
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/report/ReportWriter.java b/processor/src/main/java/org/jboss/logging/processor/apt/report/ReportWriter.java
index 9f84ce0..c894f4a 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/report/ReportWriter.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/report/ReportWriter.java
@@ -22,6 +22,7 @@
import java.io.BufferedWriter;
import java.io.Closeable;
import java.io.IOException;
+
import javax.xml.stream.XMLStreamException;
import org.jboss.logging.annotations.BaseUrl;
@@ -70,7 +71,8 @@ public abstract class ReportWriter implements Closeable {
* @throws IllegalStateException if there was an error creating the report writer
* @throws IllegalArgumentException if the {@code reportType} is invalid
*/
- public static ReportWriter of(final ReportType reportType, final MessageInterface messageInterface, final BufferedWriter writer) {
+ public static ReportWriter of(final ReportType reportType, final MessageInterface messageInterface,
+ final BufferedWriter writer) {
if (reportType == ReportType.ASCIIDOC) {
return new AsciidocReportWriter(messageInterface, writer);
} else if (reportType == ReportType.XML) {
diff --git a/processor/src/main/java/org/jboss/logging/processor/apt/report/XmlReportWriter.java b/processor/src/main/java/org/jboss/logging/processor/apt/report/XmlReportWriter.java
index ac77115..b8afd25 100644
--- a/processor/src/main/java/org/jboss/logging/processor/apt/report/XmlReportWriter.java
+++ b/processor/src/main/java/org/jboss/logging/processor/apt/report/XmlReportWriter.java
@@ -21,6 +21,7 @@
import java.io.BufferedWriter;
import java.io.IOException;
+
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
@@ -101,7 +102,8 @@ public void writeFooter() throws IOException {
@Override
public void close() throws IOException {
try {
- if (xmlWriter != null) xmlWriter.close();
+ if (xmlWriter != null)
+ xmlWriter.close();
} catch (XMLStreamException ignore) {
}
}
diff --git a/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModel.java b/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModel.java
index 32959b0..78785df 100644
--- a/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModel.java
+++ b/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModel.java
@@ -30,6 +30,7 @@
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
+
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.TypeElement;
@@ -78,7 +79,6 @@ public abstract class ClassModel {
private final Map messageMethods;
-
final JSourceFile sourceFile;
final ProcessingEnvironment processingEnv;
@@ -89,12 +89,14 @@ public abstract class ClassModel {
* @param messageInterface the message interface to implement.
* @param superClassName the super class used for the translation implementations.
*/
- ClassModel(final ProcessingEnvironment processingEnv, final MessageInterface messageInterface, final String className, final String superClassName) {
+ ClassModel(final ProcessingEnvironment processingEnv, final MessageInterface messageInterface, final String className,
+ final String superClassName) {
this.processingEnv = processingEnv;
this.messageInterface = messageInterface;
this.className = messageInterface.packageName() + "." + className;
this.superClassName = superClassName;
- sources = JDeparser.createSources(JFiler.newInstance(processingEnv.getFiler()), new FormatPreferences(new Properties()));
+ sources = JDeparser.createSources(JFiler.newInstance(processingEnv.getFiler()),
+ new FormatPreferences(new Properties()));
sourceFile = sources.createSourceFile(messageInterface.packageName(), className);
classDef = sourceFile._class(JMod.PUBLIC, className);
final int idLen = messageInterface.getIdLength();
@@ -222,7 +224,8 @@ JMethodDef addMessageMethod(final MessageMethod messageMethod, final String mess
method = classDef.method(JMod.PROTECTED, String.class, messageMethod.messageMethodName());
final JBlock body = method.body();
final String msg;
- if (messageInterface.projectCode() != null && !messageInterface.projectCode().isEmpty() && messageMethod.message().hasId()) {
+ if (messageInterface.projectCode() != null && !messageInterface.projectCode().isEmpty()
+ && messageMethod.message().hasId()) {
// Prefix the id to the string message
msg = String.format(format, messageInterface.projectCode(), messageMethod.message().id(), messageValue);
} else {
@@ -244,7 +247,6 @@ public final String qualifiedClassName() {
return className;
}
-
/**
* Creates the read resolve method and instance field.
*
@@ -252,7 +254,8 @@ public final String qualifiedClassName() {
*/
protected JMethodDef createReadResolveMethod() {
final JType type = typeOf(classDef);
- final JVarDeclaration instance = classDef.field(JMod.PUBLIC | JMod.STATIC | JMod.FINAL, type, INSTANCE_FIELD_NAME, type._new());
+ final JVarDeclaration instance = classDef.field(JMod.PUBLIC | JMod.STATIC | JMod.FINAL, type, INSTANCE_FIELD_NAME,
+ type._new());
final JMethodDef readResolveMethod = classDef.method(JMod.PROTECTED, Object.class, GET_INSTANCE_METHOD_NAME);
readResolveMethod.body()._return($v(instance));
return readResolveMethod;
@@ -275,7 +278,8 @@ JCall createLocaleGetter(final String locale, final boolean override) {
// Create the type and import it
final JType localeType = typeOf(Locale.class);
sourceFile._import(localeType);
- final JVarDeclaration defaultInstance = classDef.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, localeType, "LOCALE", determineLocale(locale, localeType));
+ final JVarDeclaration defaultInstance = classDef.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, localeType, "LOCALE",
+ determineLocale(locale, localeType));
// Create the method
final JMethodDef method = classDef.method(JMod.PROTECTED, localeType, methodName);
diff --git a/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelFactory.java b/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelFactory.java
index 7aedb32..8658e94 100644
--- a/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelFactory.java
+++ b/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelFactory.java
@@ -23,6 +23,7 @@
import static org.jboss.logging.processor.util.TranslationHelper.getEnclosingTranslationClassName;
import java.util.Map;
+
import javax.annotation.processing.ProcessingEnvironment;
import org.jboss.logging.annotations.MessageBundle;
@@ -52,16 +53,19 @@ private ClassModelFactory() {
*
* @return the class model used to implement the interface.
*
- * @throws IllegalArgumentException if interface is not annotated with {@link MessageBundle @MessageBundle} or {@link MessageLogger @MessageLogger}
+ * @throws IllegalArgumentException if interface is not annotated with {@link MessageBundle @MessageBundle} or
+ * {@link MessageLogger @MessageLogger}
*/
- public static ClassModel implementation(final ProcessingEnvironment processingEnv, final MessageInterface messageInterface) throws IllegalArgumentException {
+ public static ClassModel implementation(final ProcessingEnvironment processingEnv, final MessageInterface messageInterface)
+ throws IllegalArgumentException {
if (messageInterface.isAnnotatedWith(MessageBundle.class)) {
return new MessageBundleImplementor(processingEnv, messageInterface);
}
if (messageInterface.isAnnotatedWith(MessageLogger.class)) {
return new MessageLoggerImplementor(processingEnv, messageInterface);
}
- throw new IllegalArgumentException(String.format("Message interface %s is not a valid message logger or message bundle.", messageInterface));
+ throw new IllegalArgumentException(
+ String.format("Message interface %s is not a valid message logger or message bundle.", messageInterface));
}
/**
@@ -76,19 +80,24 @@ public static ClassModel implementation(final ProcessingEnvironment processingEn
*
* @return the class model used to create translation implementations of the interface.
*
- * @throws IllegalArgumentException if interface is not annotated with {@link MessageBundle @MessageBundle} or {@link MessageLogger @MessageLogger}
+ * @throws IllegalArgumentException if interface is not annotated with {@link MessageBundle @MessageBundle} or
+ * {@link MessageLogger @MessageLogger}
*/
- public static ClassModel translation(final ProcessingEnvironment processingEnv, final MessageInterface messageInterface, final String translationSuffix, final Map translations) throws IllegalArgumentException {
+ public static ClassModel translation(final ProcessingEnvironment processingEnv, final MessageInterface messageInterface,
+ final String translationSuffix, final Map translations) throws IllegalArgumentException {
final String generatedClassName = implementationClassName(messageInterface, translationSuffix);
final String superClassName = getEnclosingTranslationClassName(generatedClassName);
// The locale should be the same as the translationsSuffix minus the leading _
final String locale = translationSuffix.substring(1);
if (messageInterface.isAnnotatedWith(MessageBundle.class)) {
- return new MessageBundleTranslator(processingEnv, messageInterface, generatedClassName, superClassName, locale, translations);
+ return new MessageBundleTranslator(processingEnv, messageInterface, generatedClassName, superClassName, locale,
+ translations);
}
if (messageInterface.isAnnotatedWith(MessageLogger.class)) {
- return new MessageLoggerTranslator(processingEnv, messageInterface, generatedClassName, superClassName, locale, translations);
+ return new MessageLoggerTranslator(processingEnv, messageInterface, generatedClassName, superClassName, locale,
+ translations);
}
- throw new IllegalArgumentException(String.format("Message interface %s is not a valid message logger or message bundle.", messageInterface));
+ throw new IllegalArgumentException(
+ String.format("Message interface %s is not a valid message logger or message bundle.", messageInterface));
}
}
diff --git a/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelHelper.java b/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelHelper.java
index a5527bb..a2430db 100644
--- a/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelHelper.java
+++ b/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelHelper.java
@@ -25,7 +25,6 @@
import org.jboss.logging.annotations.MessageBundle;
import org.jboss.logging.annotations.MessageLogger;
import org.jboss.logging.processor.model.MessageInterface;
-import org.jboss.logging.processor.util.ElementHelper;
/**
* Utilities for the code model.
@@ -80,7 +79,8 @@ public static String implementationClassName(final MessageInterface messageInter
} else if (messageInterface.isAnnotatedWith(MessageLogger.class)) {
result.append("_$logger");
} else {
- throw new IllegalArgumentException(String.format("Message interface %s is not a message bundle or message logger.", messageInterface));
+ throw new IllegalArgumentException(
+ String.format("Message interface %s is not a message bundle or message logger.", messageInterface));
}
return result.toString();
}
@@ -95,7 +95,8 @@ public static String implementationClassName(final MessageInterface messageInter
*
* @throws IllegalArgumentException if the message interface is not a message bundle or a message logger.
*/
- public static String implementationClassName(final MessageInterface messageInterface, final String translationSuffix) throws IllegalArgumentException {
+ public static String implementationClassName(final MessageInterface messageInterface, final String translationSuffix)
+ throws IllegalArgumentException {
return implementationClassName(messageInterface) + translationSuffix;
}
}
diff --git a/processor/src/main/java/org/jboss/logging/processor/generator/model/ImplementationClassModel.java b/processor/src/main/java/org/jboss/logging/processor/generator/model/ImplementationClassModel.java
index ef83ef6..d0643a1 100644
--- a/processor/src/main/java/org/jboss/logging/processor/generator/model/ImplementationClassModel.java
+++ b/processor/src/main/java/org/jboss/logging/processor/generator/model/ImplementationClassModel.java
@@ -37,6 +37,7 @@
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.BiFunction;
import java.util.function.Supplier;
+
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.AnnotationValue;
@@ -197,7 +198,8 @@ void createBundleMethod(final JClassDef classDef, final JCall localeGetter, fina
for (int i = 0; i < positions.length; i++) {
final int index = positions[i] - 1;
if (transform != null && transform.length > 0) {
- final JAssignableExpr tVar = createTransformVar(parameterNames, method.body(), param, transform[i], $v(var));
+ final JAssignableExpr tVar = createTransformVar(parameterNames, method.body(), param,
+ transform[i], $v(var));
if (index < args.size()) {
args.add(index, tVar);
} else {
@@ -221,7 +223,8 @@ void createBundleMethod(final JClassDef classDef, final JCall localeGetter, fina
if (!added) {
if (formatterCall == null) {
// This should never happen, but let's safe guard against it
- throw new ProcessingException(messageMethod, "No format parameters are allowed when NO_FORMAT is specified.");
+ throw new ProcessingException(messageMethod,
+ "No format parameters are allowed when NO_FORMAT is specified.");
} else {
if (formatterClass == null) {
if (param.isArray() || param.isVarArgs()) {
@@ -272,11 +275,13 @@ void createBundleMethod(final JClassDef classDef, final JCall localeGetter, fina
body._return(result);
}
- JAssignableExpr createTransformVar(final List parameterNames, final JBlock methodBody, final Parameter param, final JExpr var) {
+ JAssignableExpr createTransformVar(final List parameterNames, final JBlock methodBody, final Parameter param,
+ final JExpr var) {
return createTransformVar(parameterNames, methodBody, param, param.getAnnotation(Transform.class), var);
}
- JAssignableExpr createTransformVar(final List parameterNames, final JBlock methodBody, final Parameter param, final Transform transform, final JExpr var) {
+ JAssignableExpr createTransformVar(final List parameterNames, final JBlock methodBody, final Parameter param,
+ final Transform transform, final JExpr var) {
final List transformTypes = Arrays.asList(transform.value());
// GET_CLASS should always be processed first
final JAssignableExpr result;
@@ -382,7 +387,8 @@ private void addMethodTypeParameters(final JMethodDef method, final TypeMirror t
}
}
- private JExpr createReturnType(final JClassDef classDef, final MessageMethod messageMethod, final JBlock body, final JCall format, final Map fields, final Map properties) {
+ private JExpr createReturnType(final JClassDef classDef, final MessageMethod messageMethod, final JBlock body,
+ final JCall format, final Map fields, final Map properties) {
final Set producers = messageMethod.parametersAnnotatedWith(Producer.class);
final JType type;
final JVarDeclaration resultField;
@@ -462,8 +468,10 @@ private JExpr createReturnType(final JClassDef classDef, final MessageMethod mes
}
// Get the @Property or @Properties annotation values
- addDefultProperties(messageMethod, ElementHelper.getAnnotations(messageMethod, Properties.class, Property.class), body, $v(resultField), false);
- addDefultProperties(messageMethod, ElementHelper.getAnnotations(messageMethod, Fields.class, Field.class), body, $v(resultField), true);
+ addDefultProperties(messageMethod, ElementHelper.getAnnotations(messageMethod, Properties.class, Property.class), body,
+ $v(resultField), false);
+ addDefultProperties(messageMethod, ElementHelper.getAnnotations(messageMethod, Fields.class, Field.class), body,
+ $v(resultField), true);
// Determine how the stack trace should be copied. If annotated with TransformException and copyStackTrace() is
// true, then we copy the parameters stack trace.
@@ -485,7 +493,8 @@ private JExpr createReturnType(final JClassDef classDef, final MessageMethod mes
.add($v(resultField).call("addSuppressed").arg($v(name)));
} else if (p.isAssignableFrom(Collection.class)) {
final String name = String.format("$%sVar", p.name());
- body.add($v(p.name()).call("forEach").arg(JExprs.lambda().param(name).body($v(resultField).call("addSuppressed").arg($v(name)))));
+ body.add($v(p.name()).call("forEach")
+ .arg(JExprs.lambda().param(name).body($v(resultField).call("addSuppressed").arg($v(name)))));
} else {
body.add($v(resultField).call("addSuppressed").arg($v(p.name())));
}
@@ -497,8 +506,9 @@ private JExpr createReturnType(final JClassDef classDef, final MessageMethod mes
return resultExpr;
}
- private JVarDeclaration constructReturnType(final MessageMethod messageMethod, final ThrowableType returnType, final JCall format,
- final JBlock body, final JVarDeclaration resultField) {
+ private JVarDeclaration constructReturnType(final MessageMethod messageMethod, final ThrowableType returnType,
+ final JCall format,
+ final JBlock body, final JVarDeclaration resultField) {
final JType type = JTypes.typeOf(returnType.asType());
// Import once more as the throwable return type may be different from the actual return type
sourceFile._import(type);
@@ -569,11 +579,13 @@ protected JParamDeclaration addMethodParameter(final JMethodDef method, final Pa
return method.param(FINAL, paramType, param.name());
}
- private void addDefultProperties(final MessageMethod messageMethod, final Collection annotations, final JBlock body, final JAssignableExpr resultField, final boolean field) {
+ private void addDefultProperties(final MessageMethod messageMethod, final Collection annotations,
+ final JBlock body, final JAssignableExpr resultField, final boolean field) {
for (AnnotationMirror propertyAnnotation : annotations) {
String name = null;
AnnotationValue annotationValue = null;
- for (Map.Entry extends ExecutableElement, ? extends AnnotationValue> entry : propertyAnnotation.getElementValues().entrySet()) {
+ for (Map.Entry extends ExecutableElement, ? extends AnnotationValue> entry : propertyAnnotation.getElementValues()
+ .entrySet()) {
final ExecutableElement attribute = entry.getKey();
final AnnotationValue attributeValue = entry.getValue();
if ("name".contentEquals(attribute.getSimpleName())) {
@@ -583,15 +595,18 @@ private void addDefultProperties(final MessageMethod messageMethod, final Collec
}
}
if (name == null) {
- throw new ProcessingException(messageMethod, propertyAnnotation, "The name attribute is required for the annotation.");
+ throw new ProcessingException(messageMethod, propertyAnnotation,
+ "The name attribute is required for the annotation.");
}
if (annotationValue == null || annotationValue.getValue() == null) {
- throw new ProcessingException(messageMethod, propertyAnnotation, "A value for one of the default attributes is required.");
+ throw new ProcessingException(messageMethod, propertyAnnotation,
+ "A value for one of the default attributes is required.");
}
final JExpr resultValue = annotationValue.accept(JExprAnnotationValueVisitor.INSTANCE, null);
if (resultValue == null) {
final Object value = annotationValue.getValue();
- throw new ProcessingException(messageMethod, propertyAnnotation, annotationValue, "Could not resolve value type for %s (%s)", value, value.getClass());
+ throw new ProcessingException(messageMethod, propertyAnnotation, annotationValue,
+ "Could not resolve value type for %s (%s)", value, value.getClass());
}
if (field) {
body.add(resultField.field(name).assign(resultValue));
@@ -603,6 +618,7 @@ private void addDefultProperties(final MessageMethod messageMethod, final Collec
/**
* Creates a method for formatting {@link MessageFormat} messages. The method should look something like:
+ *
*
*
*
@@ -644,10 +660,8 @@ private JCall getFormatMethod(final JClassDef classDef, final JCall localeGetter
.arg($v(args))
.arg($t(StringBuffer.class)._new())
.arg($t(FieldPosition.class)._new()
- .arg(JExpr.ZERO)
- )
- .call("toString")
- );
+ .arg(JExpr.ZERO))
+ .call("toString"));
}
return JExprs.call(methodName);
@@ -665,7 +679,8 @@ private JCall getCopyStackMethod(final JClassDef classDef) {
sourceFile._import(arrays);
final JExpr e = $v(param);
final JVarDeclaration st = body.var(FINAL, $t(StackTraceElement.class).array(), "st", e.call("getStackTrace"));
- body.add(e.call("setStackTrace").arg(arrays.call("copyOfRange").arg($v(st)).arg(JExpr.ONE).arg($v(st).field("length"))));
+ body.add(e.call("setStackTrace")
+ .arg(arrays.call("copyOfRange").arg($v(st)).arg(JExpr.ONE).arg($v(st).field("length"))));
}
return JExprs.call(methodName);
}
diff --git a/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageBundleImplementor.java b/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageBundleImplementor.java
index 8c4b705..2c7ffce 100644
--- a/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageBundleImplementor.java
+++ b/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageBundleImplementor.java
@@ -21,6 +21,7 @@
import java.util.LinkedHashSet;
import java.util.Set;
+
import javax.annotation.processing.ProcessingEnvironment;
import org.jboss.jdeparser.JCall;
@@ -30,7 +31,6 @@
import org.jboss.logging.annotations.MessageLogger;
import org.jboss.logging.processor.model.MessageInterface;
import org.jboss.logging.processor.model.MessageMethod;
-import org.jboss.logging.processor.util.ElementHelper;
/**
* Used to generate a message bundle implementation.
@@ -63,7 +63,8 @@ protected JClassDef generateModel() throws IllegalStateException {
final Set messageMethods = new LinkedHashSet<>();
messageMethods.addAll(messageInterface().methods());
for (MessageInterface messageInterface : messageInterface().extendedInterfaces()) {
- if (messageInterface.isAnnotatedWith(MessageBundle.class) || messageInterface.isAnnotatedWith(MessageLogger.class)) {
+ if (messageInterface.isAnnotatedWith(MessageBundle.class)
+ || messageInterface.isAnnotatedWith(MessageLogger.class)) {
messageMethods.addAll(messageInterface.methods());
}
}
diff --git a/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageBundleTranslator.java b/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageBundleTranslator.java
index 7e8d6bd..6a3c821 100644
--- a/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageBundleTranslator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageBundleTranslator.java
@@ -23,6 +23,7 @@
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
+
import javax.annotation.processing.ProcessingEnvironment;
import org.jboss.jdeparser.JClassDef;
@@ -54,7 +55,9 @@ class MessageBundleTranslator extends ClassModel {
* @param locale the locale used to override the default locale
* @param translations the translation map.
*/
- public MessageBundleTranslator(final ProcessingEnvironment processingEnv, final MessageInterface messageInterface, final String className, final String superClassName, final String locale, final Map translations) {
+ public MessageBundleTranslator(final ProcessingEnvironment processingEnv, final MessageInterface messageInterface,
+ final String className, final String superClassName, final String locale,
+ final Map translations) {
super(processingEnv, messageInterface, className, superClassName);
this.locale = locale;
if (translations != null) {
diff --git a/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageLoggerImplementor.java b/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageLoggerImplementor.java
index 00cb238..96d780a 100644
--- a/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageLoggerImplementor.java
+++ b/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageLoggerImplementor.java
@@ -35,6 +35,7 @@
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Supplier;
+
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.type.TypeKind;
import javax.lang.model.type.TypeMirror;
@@ -100,9 +101,11 @@ protected JClassDef generateModel() throws IllegalStateException {
// Add FQCN
if (messageInterface().loggingFQCN() == null) {
- classDef.field(JMod.PRIVATE | JMod.FINAL | JMod.STATIC, String.class, FQCN_FIELD_NAME, $t(classDef)._class().call("getName"));
+ classDef.field(JMod.PRIVATE | JMod.FINAL | JMod.STATIC, String.class, FQCN_FIELD_NAME,
+ $t(classDef)._class().call("getName"));
} else {
- classDef.field(JMod.PRIVATE | JMod.FINAL | JMod.STATIC, String.class, FQCN_FIELD_NAME, $t(messageInterface().loggingFQCN())._class().call("getName"));
+ classDef.field(JMod.PRIVATE | JMod.FINAL | JMod.STATIC, String.class, FQCN_FIELD_NAME,
+ $t(messageInterface().loggingFQCN())._class().call("getName"));
}
// Add default constructor
@@ -129,7 +132,8 @@ protected JClassDef generateModel() throws IllegalStateException {
final Set messageMethods = new LinkedHashSet<>();
messageMethods.addAll(messageInterface().methods());
for (MessageInterface messageInterface : messageInterface().extendedInterfaces()) {
- if (messageInterface.isAnnotatedWith(MessageBundle.class) || messageInterface.isAnnotatedWith(MessageLogger.class)) {
+ if (messageInterface.isAnnotatedWith(MessageBundle.class)
+ || messageInterface.isAnnotatedWith(MessageLogger.class)) {
messageMethods.addAll(messageInterface.methods());
}
}
@@ -152,9 +156,11 @@ protected JClassDef generateModel() throws IllegalStateException {
* @param classDef the class definition used to create the method on
* @param logger the logger to use.
*/
- private void createLoggerMethod(final LoggerMessageMethod messageMethod, final JClassDef classDef, final JAssignableExpr logger) {
+ private void createLoggerMethod(final LoggerMessageMethod messageMethod, final JClassDef classDef,
+ final JAssignableExpr logger) {
final String msgMethodName = messageMethod.messageMethodName();
- final JMethodDef method = classDef.method(JMod.PUBLIC | JMod.FINAL, messageMethod.returnType().name(), messageMethod.name());
+ final JMethodDef method = classDef.method(JMod.PUBLIC | JMod.FINAL, messageMethod.returnType().name(),
+ messageMethod.name());
method.annotate(Override.class);
addMessageMethod(messageMethod);
addThrownTypes(messageMethod, method);
@@ -187,7 +193,8 @@ private void createLoggerMethod(final LoggerMessageMethod messageMethod, final J
if (logOnceVars.containsKey(varName)) {
var = logOnceVars.get(varName);
} else {
- var = classDef.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, atomicBoolean, varName, atomicBoolean._new().arg(JExpr.FALSE));
+ var = classDef.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, atomicBoolean, varName,
+ atomicBoolean._new().arg(JExpr.FALSE));
logOnceVars.put(varName, var);
}
body = baseBody._if(
@@ -260,7 +267,8 @@ private void createLoggerMethod(final LoggerMessageMethod messageMethod, final J
for (int i = 0; i < positions.length; i++) {
final int index = positions[i] - 1;
if (transform.length > 0) {
- final JAssignableExpr tVar = createTransformVar(parameterNames, body, param, transform[i], $v(var));
+ final JAssignableExpr tVar = createTransformVar(parameterNames, body, param, transform[i],
+ $v(var));
if (index < args.size()) {
args.add(index, tVar);
} else {
@@ -339,7 +347,8 @@ private JBlock wrapTccl(final JBlock body, final String currentName) {
final JTry tryBlock = body._try();
// Set the new TCCL then log the message
- tryBlock.add(JExprs.callStatic(thread, "currentThread").call("setContextClassLoader").arg(classExpression.call("getClassLoader")));
+ tryBlock.add(JExprs.callStatic(thread, "currentThread").call("setContextClassLoader")
+ .arg(classExpression.call("getClassLoader")));
final JBlock finallyBlock = tryBlock._finally();
// Reset the TCCL
diff --git a/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageLoggerTranslator.java b/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageLoggerTranslator.java
index 3e6c930..f1257c8 100644
--- a/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageLoggerTranslator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/generator/model/MessageLoggerTranslator.java
@@ -19,13 +19,13 @@
package org.jboss.logging.processor.generator.model;
-
import static org.jboss.jdeparser.JExprs.$v;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
+
import javax.annotation.processing.ProcessingEnvironment;
import org.jboss.jdeparser.JBlock;
@@ -36,7 +36,6 @@
import org.jboss.logging.processor.model.MessageInterface;
import org.jboss.logging.processor.model.MessageMethod;
-
/**
* The java message logger translation class model.
*
@@ -65,7 +64,9 @@ class MessageLoggerTranslator extends ClassModel {
* @param locale the locale used to override the default locale
* @param translations the translation map.
*/
- public MessageLoggerTranslator(final ProcessingEnvironment processingEnv, final MessageInterface messageInterface, final String className, final String superClassName, final String locale, final Map translations) {
+ public MessageLoggerTranslator(final ProcessingEnvironment processingEnv, final MessageInterface messageInterface,
+ final String className, final String superClassName, final String locale,
+ final Map translations) {
super(processingEnv, messageInterface, className, superClassName);
this.locale = locale;
if (translations != null) {
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/DelegatingElement.java b/processor/src/main/java/org/jboss/logging/processor/model/DelegatingElement.java
index 3496a90..12a6439 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/DelegatingElement.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/DelegatingElement.java
@@ -22,6 +22,7 @@
import java.lang.annotation.Annotation;
import java.util.List;
import java.util.Set;
+
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/DelegatingExecutableElement.java b/processor/src/main/java/org/jboss/logging/processor/model/DelegatingExecutableElement.java
index 63a4355..01cac27 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/DelegatingExecutableElement.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/DelegatingExecutableElement.java
@@ -20,6 +20,7 @@
package org.jboss.logging.processor.model;
import java.util.List;
+
import javax.lang.model.element.AnnotationValue;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.Name;
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/DelegatingTypeElement.java b/processor/src/main/java/org/jboss/logging/processor/model/DelegatingTypeElement.java
index e163cb9..ed88a61 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/DelegatingTypeElement.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/DelegatingTypeElement.java
@@ -20,6 +20,7 @@
package org.jboss.logging.processor.model;
import java.util.List;
+
import javax.lang.model.element.Element;
import javax.lang.model.element.Name;
import javax.lang.model.element.NestingKind;
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/LoggerMessageMethod.java b/processor/src/main/java/org/jboss/logging/processor/model/LoggerMessageMethod.java
index 49e2559..015c292 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/LoggerMessageMethod.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/LoggerMessageMethod.java
@@ -48,7 +48,7 @@ public interface LoggerMessageMethod extends MessageMethod {
* checked before any logging, or an expensive operation, is done.
*
* @return {@code true} if the statement should be wrapped in an {@code if (logger.isEnabled(level))} block,
- * otherwise {@code false}
+ * otherwise {@code false}
*/
default boolean wrapInEnabledCheck() {
return !parametersAnnotatedWith(Transform.class).isEmpty();
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/MessageInterface.java b/processor/src/main/java/org/jboss/logging/processor/model/MessageInterface.java
index 5fac7c6..b9e8b19 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/MessageInterface.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/MessageInterface.java
@@ -23,6 +23,7 @@
import java.util.List;
import java.util.Properties;
import java.util.Set;
+
import javax.lang.model.element.TypeElement;
import org.jboss.logging.annotations.MessageBundle;
@@ -63,7 +64,7 @@ public interface MessageInterface extends Comparable, ClassTyp
* {@link MessageBundle @MessageBundle} or {@link MessageLogger @MessageLogger}.
*
* @return the project code or {@code null} if not annotated with
- * {@link MessageBundle @MessageBundle} or {@link MessageLogger @MessageLogger}
+ * {@link MessageBundle @MessageBundle} or {@link MessageLogger @MessageLogger}
*/
String projectCode();
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/ReturnType.java b/processor/src/main/java/org/jboss/logging/processor/model/ReturnType.java
index 872b6e3..60f03c0 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/ReturnType.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/ReturnType.java
@@ -20,6 +20,7 @@
package org.jboss.logging.processor.model;
import java.util.List;
+
import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.TypeMirror;
diff --git a/processor/src/main/java/org/jboss/logging/processor/model/ThrowableType.java b/processor/src/main/java/org/jboss/logging/processor/model/ThrowableType.java
index 16c770c..140739c 100644
--- a/processor/src/main/java/org/jboss/logging/processor/model/ThrowableType.java
+++ b/processor/src/main/java/org/jboss/logging/processor/model/ThrowableType.java
@@ -80,7 +80,7 @@ public interface ThrowableType extends ClassType, Comparable, Del
* Indicates whether or not the {@linkplain org.jboss.logging.annotations.Cause cause} was set in the constructor.
*
* @return {@code true} if the cause was set in the constructor, {@code false} if the
- * {@link Throwable#initCause(Throwable)} should be executed
+ * {@link Throwable#initCause(Throwable)} should be executed
*/
default boolean causeSetInConstructor() {
return false;
diff --git a/processor/src/main/java/org/jboss/logging/processor/util/ElementHelper.java b/processor/src/main/java/org/jboss/logging/processor/util/ElementHelper.java
index df04408..c3cf5fb 100644
--- a/processor/src/main/java/org/jboss/logging/processor/util/ElementHelper.java
+++ b/processor/src/main/java/org/jboss/logging/processor/util/ElementHelper.java
@@ -26,6 +26,7 @@
import java.util.List;
import java.util.Map;
import java.util.Optional;
+
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.AnnotatedConstruct;
import javax.lang.model.element.AnnotationMirror;
@@ -103,7 +104,8 @@ public static List extends TypeMirror> getTypeArguments(final TypeMirror type)
*
* @throws IllegalArgumentException if element parameter is null
*/
- public static boolean isAnnotatedWith(final AnnotatedConstruct annotatedConstruct, final Class extends Annotation> clazz) {
+ public static boolean isAnnotatedWith(final AnnotatedConstruct annotatedConstruct,
+ final Class extends Annotation> clazz) {
if (annotatedConstruct == null) {
throw new IllegalArgumentException("The element parameter is null");
}
@@ -119,7 +121,7 @@ public static boolean isAnnotatedWith(final AnnotatedConstruct annotatedConstruc
* @param annotation the annotation to get the value from
*
* @return a {@link TypeElement} representing the value for the first annotation attribute or {@code null} if no
- * attributes were found
+ * attributes were found
*/
public static TypeElement getClassAnnotationValue(final Element element, final Class extends Annotation> annotation) {
for (AnnotationMirror mirror : element.getAnnotationMirrors()) {
@@ -140,10 +142,11 @@ public static TypeElement getClassAnnotationValue(final Element element, final C
* @param attributeName the name of the attribute to retrieve the class value for
*
* @return a {@link TypeElement} representing the value for the annotation attribute or {@code null} if the
- * attribute was not found
+ * attribute was not found
*/
- @SuppressWarnings({"StaticMethodOnlyUsedInOneClass", "SameParameterValue"})
- public static TypeElement getClassAnnotationValue(final Element element, final Class extends Annotation> annotation, final String attributeName) {
+ @SuppressWarnings({ "StaticMethodOnlyUsedInOneClass", "SameParameterValue" })
+ public static TypeElement getClassAnnotationValue(final Element element, final Class extends Annotation> annotation,
+ final String attributeName) {
for (AnnotationMirror mirror : element.getAnnotationMirrors()) {
final DeclaredType annotationType = mirror.getAnnotationType();
if (annotationType.toString().equals(annotation.getName())) {
@@ -167,7 +170,8 @@ public static TypeElement getClassAnnotationValue(final Element element, final C
*
* @return a list of {@link TypeMirror} representing the value for the annotation attribute or an empty list
*/
- public static List getClassArrayAnnotationValue(final Element element, final Class extends Annotation> annotation, @SuppressWarnings("SameParameterValue") final String attributeName) {
+ public static List getClassArrayAnnotationValue(final Element element,
+ final Class extends Annotation> annotation, @SuppressWarnings("SameParameterValue") final String attributeName) {
for (AnnotationMirror mirror : element.getAnnotationMirrors()) {
final DeclaredType annotationType = mirror.getAnnotationType();
if (annotationType.toString().equals(annotation.getName())) {
@@ -199,12 +203,14 @@ public static List getClassArrayAnnotationValue(final Element elemen
*
*
* @param element the element to search for annotations
- * @param groupedAnnotation the grouped annotation, e.g. collector for repeatable annotations, or {@code null} if not a repeatable annotation
+ * @param groupedAnnotation the grouped annotation, e.g. collector for repeatable annotations, or {@code null} if not a
+ * repeatable annotation
* @param annotation the annotation to search for
*
* @return a collection matched annotations
*/
- public static Collection getAnnotations(final Element element, final Class extends Annotation> groupedAnnotation, final Class extends Annotation> annotation) {
+ public static Collection getAnnotations(final Element element,
+ final Class extends Annotation> groupedAnnotation, final Class extends Annotation> annotation) {
final Collection result = new ArrayList<>();
final List extends AnnotationMirror> annotations = element.getAnnotationMirrors();
for (AnnotationMirror annotationMirror : annotations) {
@@ -308,19 +314,20 @@ private static Collection getContainingAnnotations(final Annot
final Collection result = new ArrayList<>();
// Return any child annotations
final Map extends ExecutableElement, ? extends AnnotationValue> childAnnotations = annotation.getElementValues();
- childAnnotations.entrySet().stream().filter(entry -> entry.getKey().getSimpleName().contentEquals("value")).forEach(entry -> {
- final Object value = entry.getValue().getValue();
- if (value instanceof List) {
- final List extends AnnotationValue> values = (List extends AnnotationValue>) value;
- for (AnnotationValue subValue : values) {
- if (subValue instanceof AnnotationMirror) {
- result.add((AnnotationMirror) subValue);
- } else {
- result.add((AnnotationMirror) subValue.getValue());
+ childAnnotations.entrySet().stream().filter(entry -> entry.getKey().getSimpleName().contentEquals("value"))
+ .forEach(entry -> {
+ final Object value = entry.getValue().getValue();
+ if (value instanceof List) {
+ final List extends AnnotationValue> values = (List extends AnnotationValue>) value;
+ for (AnnotationValue subValue : values) {
+ if (subValue instanceof AnnotationMirror) {
+ result.add((AnnotationMirror) subValue);
+ } else {
+ result.add((AnnotationMirror) subValue.getValue());
+ }
+ }
}
- }
- }
- });
+ });
return result;
}
diff --git a/processor/src/main/java/org/jboss/logging/processor/util/Expressions.java b/processor/src/main/java/org/jboss/logging/processor/util/Expressions.java
index 4b61f12..b833ad8 100644
--- a/processor/src/main/java/org/jboss/logging/processor/util/Expressions.java
+++ b/processor/src/main/java/org/jboss/logging/processor/util/Expressions.java
@@ -33,7 +33,8 @@ public class Expressions {
private static final int DEFAULT = 4;
public static String resolve(final Properties props, final String expression) {
- if (expression == null) return null;
+ if (expression == null)
+ return null;
final StringBuilder builder = new StringBuilder();
final char[] chars = expression.toCharArray();
final int len = chars.length;
diff --git a/processor/src/main/java/org/jboss/logging/processor/util/Objects.java b/processor/src/main/java/org/jboss/logging/processor/util/Objects.java
index 8ada0fc..bd5f76a 100644
--- a/processor/src/main/java/org/jboss/logging/processor/util/Objects.java
+++ b/processor/src/main/java/org/jboss/logging/processor/util/Objects.java
@@ -37,7 +37,6 @@ private Objects() {
}
-
/**
* Checks to see if two booleans are equal.
*
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/AbstractFormatPart.java b/processor/src/main/java/org/jboss/logging/processor/validation/AbstractFormatPart.java
index 5d8abf9..4182420 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/AbstractFormatPart.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/AbstractFormatPart.java
@@ -22,7 +22,8 @@
import org.jboss.logging.processor.util.Comparison;
/**
- * Abstract class that only implements Comparable for convenience. Uses the {@link org.jboss.logging.processor.validation.FormatPart#position()} for
+ * Abstract class that only implements Comparable for convenience. Uses the
+ * {@link org.jboss.logging.processor.validation.FormatPart#position()} for
* the comparison.
*
* Date: 13.06.2011
@@ -33,8 +34,7 @@ abstract class AbstractFormatPart implements FormatPart {
@Override
public int compareTo(final FormatPart other) {
- return Comparison.begin().
- compare(position(), other.position()).result();
+ return Comparison.begin().compare(position(), other.position()).result();
}
@Override
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/FormatValidatorFactory.java b/processor/src/main/java/org/jboss/logging/processor/validation/FormatValidatorFactory.java
index 2376549..caa2eff 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/FormatValidatorFactory.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/FormatValidatorFactory.java
@@ -56,7 +56,6 @@ public static FormatValidator create(final Format format, final String message)
return InvalidFormatValidator.of(String.format("Format %s is invalid.", format));
}
-
private static final class InvalidFormatValidator extends AbstractFormatValidator {
private InvalidFormatValidator() {
@@ -92,4 +91,3 @@ public boolean isValid() {
}
}
}
-
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/IdLengthValidator.java b/processor/src/main/java/org/jboss/logging/processor/validation/IdLengthValidator.java
index 21946ed..764d577 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/IdLengthValidator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/IdLengthValidator.java
@@ -40,14 +40,16 @@ public Collection validate(final MessageInterface messageInte
final String projectCode = messageInterface.projectCode();
final int idLength = messageInterface.getIdLength();
if ((idLength > 0 && idLength < 3) || idLength > 8) {
- messages.add(createError(messageInterface, "The length of the message id padding must be between 3 and 8. The value %d is invalid.", idLength));
+ messages.add(createError(messageInterface,
+ "The length of the message id padding must be between 3 and 8. The value %d is invalid.", idLength));
} else {
synchronized (this) {
// Check the length id's
if (lengths.containsKey(projectCode)) {
final int len = lengths.get(projectCode);
if (len != idLength) {
- messages.add(createError(messageInterface, "A length of %d was already used for project code '%s'.", len, projectCode));
+ messages.add(createError(messageInterface, "A length of %d was already used for project code '%s'.",
+ len, projectCode));
}
} else {
lengths.put(projectCode, idLength);
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/IdRangeValidator.java b/processor/src/main/java/org/jboss/logging/processor/validation/IdRangeValidator.java
index 390959e..e5ca470 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/IdRangeValidator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/IdRangeValidator.java
@@ -21,7 +21,6 @@
import static org.jboss.logging.processor.validation.ValidationMessageFactory.createError;
-import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
@@ -44,14 +43,16 @@ public Collection validate(final MessageInterface messageInte
final List messages = new LinkedList<>();
for (ValidIdRange validIdRange : messageInterface.validIdRanges()) {
if (validIdRange.min() > validIdRange.max()) {
- messages.add(createError(messageInterface, "Minimum id value (%d) cannot be greater than the maximum value (%d).",
- validIdRange.min(), validIdRange.max()));
+ messages.add(
+ createError(messageInterface, "Minimum id value (%d) cannot be greater than the maximum value (%d).",
+ validIdRange.min(), validIdRange.max()));
} else {
final Map processed = getProcessed(messageInterface);
for (Entry entry : processed.entrySet()) {
final ValidIdRange vid = entry.getKey();
if (overlap(validIdRange, vid)) {
- messages.add(createError(messageInterface, "@ValidIdRange min/max (%d/%d) overlap the range (%d/%d) on '%s'.",
+ messages.add(createError(messageInterface,
+ "@ValidIdRange min/max (%d/%d) overlap the range (%d/%d) on '%s'.",
validIdRange.min(), validIdRange.max(), vid.min(), vid.max(), entry.getValue().name()));
}
}
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/MessageFormatPart.java b/processor/src/main/java/org/jboss/logging/processor/validation/MessageFormatPart.java
index c31e6f5..efdfa3a 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/MessageFormatPart.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/MessageFormatPart.java
@@ -70,18 +70,19 @@ public int position() {
@Override
public String part() {
return originalFormat;
- /** Should use something like this when
- final StringBuilder result = new StringBuilder("{");
- if (index >= 0) {
- result.append(index);
- }
- if (formatType != null) {
- result.append(",").append(formatType);
- }
- if (formatStyle != null) {
- result.append(",").append(formatStyle);
- }
- return result.append("}").toString();
+ /**
+ * Should use something like this when
+ * final StringBuilder result = new StringBuilder("{");
+ * if (index >= 0) {
+ * result.append(index);
+ * }
+ * if (formatType != null) {
+ * result.append(",").append(formatType);
+ * }
+ * if (formatStyle != null) {
+ * result.append(",").append(formatStyle);
+ * }
+ * return result.append("}").toString();
**/
}
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/MessageFormatValidator.java b/processor/src/main/java/org/jboss/logging/processor/validation/MessageFormatValidator.java
index ca69236..1baca42 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/MessageFormatValidator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/MessageFormatValidator.java
@@ -43,7 +43,6 @@ class MessageFormatValidator extends AbstractFormatValidator {
private boolean valid;
private final String format;
-
private MessageFormatValidator(final String format) {
super();
this.format = format;
@@ -118,8 +117,10 @@ private void parameterCheck(final Object... parameters) {
private void parameterCheck(final int parameterCount) {
if (argumentCount != parameterCount) {
valid = false;
- setSummaryMessage("Invalid parameter count. Required: %d provided %d for format '%s'.", argumentCount, parameterCount, format);
- setDetailMessage("Required %d parameters, but %d were provided for format %s.", argumentCount, parameterCount, format);
+ setSummaryMessage("Invalid parameter count. Required: %d provided %d for format '%s'.", argumentCount,
+ parameterCount, format);
+ setDetailMessage("Required %d parameters, but %d were provided for format %s.", argumentCount, parameterCount,
+ format);
}
}
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/MessageIdValidator.java b/processor/src/main/java/org/jboss/logging/processor/validation/MessageIdValidator.java
index 4e4a7d6..27c2547 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/MessageIdValidator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/MessageIdValidator.java
@@ -73,7 +73,8 @@ public Collection validate(final MessageInterface messageInte
ranges.append(", ");
}
}
- messages.add(createError(messageMethod, "Message id %d on method %s is not within the valid range: %s", id, messageMethod.name(), ranges.toString()));
+ messages.add(createError(messageMethod, "Message id %d on method %s is not within the valid range: %s",
+ id, messageMethod.name(), ranges.toString()));
}
}
final String projectCode = messageInterface.projectCode();
@@ -83,8 +84,12 @@ public Collection validate(final MessageInterface messageInte
final MessageMethod previousMethod = usedMessageIds.get(key);
// Allow methods with the same name to use the same id, like INHERIT does
if (!previousMethod.name().equals(messageMethod.name())) {
- messages.add(createError(previousMethod, "Message id %s is not unique for messageMethod %s with project code %s.", id, previousMethod.name(), projectCode));
- messages.add(createError(messageMethod, "Message id %s is not unique for messageMethod %s with project code %s.", id, messageMethod.name(), projectCode));
+ messages.add(createError(previousMethod,
+ "Message id %s is not unique for messageMethod %s with project code %s.", id,
+ previousMethod.name(), projectCode));
+ messages.add(createError(messageMethod,
+ "Message id %s is not unique for messageMethod %s with project code %s.", id,
+ messageMethod.name(), projectCode));
}
} else {
usedMessageIds.put(key, messageMethod);
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/PropertyValidator.java b/processor/src/main/java/org/jboss/logging/processor/validation/PropertyValidator.java
index 398bada..4c80feb 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/PropertyValidator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/PropertyValidator.java
@@ -31,6 +31,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
+
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.AnnotationValue;
@@ -68,14 +69,16 @@
* @author James R. Perkins
*/
class PropertyValidator {
- private static final List> VALIDATING_ANNOTATIONS = Arrays.asList(Properties.class, Property.class, Fields.class, Field.class);
+ private static final List> VALIDATING_ANNOTATIONS = Arrays.asList(Properties.class,
+ Property.class, Fields.class, Field.class);
private final Elements elements;
private final Types types;
private final MessageMethod method;
private final TypeMirror resultType;
private final Collection messages;
- private PropertyValidator(final ProcessingEnvironment processingEnv, final MessageMethod method, final TypeMirror resultType, final Collection messages) {
+ private PropertyValidator(final ProcessingEnvironment processingEnv, final MessageMethod method,
+ final TypeMirror resultType, final Collection messages) {
elements = processingEnv.getElementUtils();
types = processingEnv.getTypeUtils();
this.method = method;
@@ -91,8 +94,10 @@ private PropertyValidator(final ProcessingEnvironment processingEnv, final Messa
*
* @return a collection of validation messages
*/
- static Collection validate(final ProcessingEnvironment processingEnv, final MessageMethod messageMethod) {
- boolean continueValidation = !(messageMethod.parametersAnnotatedWith(Field.class).isEmpty() && messageMethod.parametersAnnotatedWith(Property.class).isEmpty());
+ static Collection validate(final ProcessingEnvironment processingEnv,
+ final MessageMethod messageMethod) {
+ boolean continueValidation = !(messageMethod.parametersAnnotatedWith(Field.class).isEmpty()
+ && messageMethod.parametersAnnotatedWith(Property.class).isEmpty());
for (Class extends Annotation> annotation : VALIDATING_ANNOTATIONS) {
if (messageMethod.isAnnotatedWith(annotation)) {
continueValidation = true;
@@ -131,7 +136,8 @@ private void validate() {
}
for (Element element : ElementFilter.fieldsIn(elements.getAllMembers(e))) {
if (element.getModifiers().contains(Modifier.PUBLIC) && !element.getModifiers().contains(Modifier.FINAL)) {
- final Set types = fields.computeIfAbsent(element.getSimpleName().toString(), (key -> new HashSet<>()));
+ final Set types = fields.computeIfAbsent(element.getSimpleName().toString(),
+ (key -> new HashSet<>()));
types.add(element.asType());
}
}
@@ -144,7 +150,8 @@ private void validate() {
final Set propertyTypes = fields.get(resolveFieldName(parameter));
final TypeMirror valueType = parameter.asType();
if (!assignablePropertyFound(valueType, propertyTypes)) {
- messages.add(createError(parameter, "No target field found in %s with name %s with type %s.", resultType, parameter.targetName(), valueType));
+ messages.add(createError(parameter, "No target field found in %s with name %s with type %s.", resultType,
+ parameter.targetName(), valueType));
}
validateCommonAnnotation(parameter, Field.class);
}
@@ -153,7 +160,8 @@ private void validate() {
final Set propertyTypes = methods.get(resolveSetterName(parameter));
final TypeMirror valueType = parameter.asType();
if (!assignablePropertyFound(valueType, propertyTypes)) {
- messages.add(createError(parameter, "No method found in %s with signature %s(%s).", resultType, parameter.targetName(), valueType));
+ messages.add(createError(parameter, "No method found in %s with signature %s(%s).", resultType,
+ parameter.targetName(), valueType));
}
validateCommonAnnotation(parameter, Property.class);
}
@@ -175,7 +183,8 @@ private void validateCommonAnnotation(final Parameter parameter, final Class e
final AnnotationValue attributeValue = entry.getValue();
if (!"name".contentEquals(attribute.getSimpleName())) {
messages.add(createError(parameter, annotationMirror, attributeValue,
- "Default values are not allowed for parameters annotated with @%s. %s", annotation.getName(), annotationMirror));
+ "Default values are not allowed for parameters annotated with @%s. %s", annotation.getName(),
+ annotationMirror));
}
}
}
@@ -187,9 +196,11 @@ private void validateAnnotation(final AnnotationMirror annotationMirror, final M
final Map extends ExecutableElement, ? extends AnnotationValue> map = annotationMirror.getElementValues();
final int size = map.size();
if (size < 2) {
- messages.add(createError(method, annotationMirror, "The name attribute and at least one default value are required: %s", annotationMirror));
+ messages.add(createError(method, annotationMirror,
+ "The name attribute and at least one default value are required: %s", annotationMirror));
} else if (size > 2) {
- messages.add(createError(method, annotationMirror, "Only the name attribute and one default attribute are allowed to be defined: %s", annotationMirror));
+ messages.add(createError(method, annotationMirror,
+ "Only the name attribute and one default attribute are allowed to be defined: %s", annotationMirror));
} else {
// Look for the name attribute and a single value
String name = null;
@@ -210,11 +221,13 @@ private void validateAnnotation(final AnnotationMirror annotationMirror, final M
} else {
final Set propertyTypes = properties.get(name);
if (propertyTypes == null) {
- messages.add(createError(method, annotationMirror, value, "Could not find property %s on %s.", name, resultType));
+ messages.add(createError(method, annotationMirror, value, "Could not find property %s on %s.", name,
+ resultType));
} else {
final TypeMirror defaultValueType = value.accept(ValueTypeAnnotationValueVisitor.INSTANCE, elements);
if (!assignablePropertyFound(defaultValueType, propertyTypes)) {
- messages.add(createError(method, annotationMirror, value, "Expected property with type %s found with type %s",
+ messages.add(createError(method, annotationMirror, value,
+ "Expected property with type %s found with type %s",
defaultValueType, propertyTypes));
}
}
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/StringFormatPart.java b/processor/src/main/java/org/jboss/logging/processor/validation/StringFormatPart.java
index f949e09..b162af8 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/StringFormatPart.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/StringFormatPart.java
@@ -19,7 +19,6 @@
package org.jboss.logging.processor.validation;
-
import java.util.Collections;
import java.util.DuplicateFormatFlagsException;
import java.util.IllegalFormatPrecisionException;
@@ -172,19 +171,21 @@ private void initIndex(final String s) throws IllegalArgumentException {
/**
* Initializes the flags based on the string.
*
- * Will set the {@link org.jboss.logging.processor.validation.StringFormatPart#index} to {@code -1} if the {@link Flag#PREVIOUS} flag is found.
+ * Will set the {@link org.jboss.logging.processor.validation.StringFormatPart#index} to {@code -1} if the
+ * {@link Flag#PREVIOUS} flag is found.
*
* @param s the flags in string form.
*
* @throws java.util.DuplicateFormatFlagsException
- * if the flag is specified more than once.
+ * if the flag is specified more than once.
*/
private void initFlags(final String s) throws DuplicateFormatFlagsException {
final char[] chars = s.toCharArray();
for (char c : chars) {
final Flag flag = Flag.parse(c);
if (flags.contains(flag)) {
- throw new DuplicateFormatFlagsException(String.format("Duplicate %s flag found. Current flags: %s", flag, flags));
+ throw new DuplicateFormatFlagsException(
+ String.format("Duplicate %s flag found. Current flags: %s", flag, flags));
}
flags.add(flag);
}
@@ -299,7 +300,8 @@ public enum Flag {
/**
* The result should use a conversion-dependent alternate form.
*
- * Works on conversions {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#OCTAL_INTEGER}, {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#HEX_INTEGER}, all floating points
+ * Works on conversions {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#OCTAL_INTEGER},
+ * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#HEX_INTEGER}, all floating points
* and most general conversions depending on the definition of {@link java.util.Formattable}.
*/
CONVERSION_DEPENDENT_ALTERNATE('#'),
@@ -307,9 +309,13 @@ public enum Flag {
/**
* The result will always include a sign.
*
- * Works on all floating points, {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL_INTEGER}, {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#OCTAL_INTEGER},
- * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#HEX_INTEGER} when applied to {@link java.math.BigInteger} or
- * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL_INTEGER} when applied to {@code byte}, {@link Byte}, {@code short}, {@link Short},
+ * Works on all floating points,
+ * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL_INTEGER},
+ * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#OCTAL_INTEGER},
+ * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#HEX_INTEGER} when applied to
+ * {@link java.math.BigInteger} or
+ * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL_INTEGER} when applied to
+ * {@code byte}, {@link Byte}, {@code short}, {@link Short},
* {@code int}, {@link Integer}, {@code long} and {@link Long}.
*/
INCLUDE_SIGN('+'),
@@ -317,9 +323,13 @@ public enum Flag {
/**
* The result will include a leading space for positive values.
*
- * Works on all floating points, {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL_INTEGER}, {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#OCTAL_INTEGER},
- * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#HEX_INTEGER} when applied to {@link java.math.BigInteger} or
- * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL_INTEGER} when applied to {@code byte}, {@link Byte}, {@code short}, {@link Short},
+ * Works on all floating points,
+ * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL_INTEGER},
+ * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#OCTAL_INTEGER},
+ * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#HEX_INTEGER} when applied to
+ * {@link java.math.BigInteger} or
+ * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL_INTEGER} when applied to
+ * {@code byte}, {@link Byte}, {@code short}, {@link Short},
* {@code int}, {@link Integer}, {@code long} and {@link Long}.
*/
SPACE_FOR_POSITIVE_VALUES(' '),
@@ -334,19 +344,28 @@ public enum Flag {
/**
* The result will include locale-specific grouping separators.
*
- * Works only on {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL_INTEGER} integrals and {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#SCIENTIFIC_NOTATION},
- * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL} and {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#SCIENTIFIC_NOTATION_OR_DECIMAL} floating points.
+ * Works only on {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL_INTEGER} integrals
+ * and {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#SCIENTIFIC_NOTATION},
+ * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL} and
+ * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#SCIENTIFIC_NOTATION_OR_DECIMAL} floating
+ * points.
*/
LOCALE_GROUPING_SEPARATOR(','),
/**
* The result will enclose negative numbers in parentheses.
*
- * Works only on {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL_INTEGER}, {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#OCTAL_INTEGER},
- * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#HEX_INTEGER} when applied to {@link java.math.BigInteger} or
- * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL_INTEGER} when applied to {@code byte}, {@link Byte}, {@code short}, {@link Short},
- * {@code int}, {@link Integer}, {@code long} and {@link Long} integrals and {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#SCIENTIFIC_NOTATION},
- * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL} and {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#SCIENTIFIC_NOTATION_OR_DECIMAL} floating points.
+ * Works only on {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL_INTEGER},
+ * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#OCTAL_INTEGER},
+ * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#HEX_INTEGER} when applied to
+ * {@link java.math.BigInteger} or
+ * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL_INTEGER} when applied to
+ * {@code byte}, {@link Byte}, {@code short}, {@link Short},
+ * {@code int}, {@link Integer}, {@code long} and {@link Long} integrals and
+ * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#SCIENTIFIC_NOTATION},
+ * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#DECIMAL} and
+ * {@link org.jboss.logging.processor.validation.StringFormatPart.Conversion#SCIENTIFIC_NOTATION_OR_DECIMAL} floating
+ * points.
*/
PARENTHESES_FOR_NEGATIVES('('),
@@ -377,7 +396,7 @@ public String toString() {
* @return the corresponding flag for the character.
*
* @throws java.util.UnknownFormatFlagsException
- * if the flag is invalid.
+ * if the flag is invalid.
*/
public static Flag parse(final char c) throws UnknownFormatFlagsException {
for (Flag flag : Flag.values()) {
@@ -535,7 +554,6 @@ public boolean isLineSeparator() {
}
};
-
private final char conversion;
/**
* @code true} for the case should be ignored, otherwise {@code false}
@@ -654,7 +672,7 @@ public String toString() {
* @return the conversion descriptor.
*
* @throws java.util.UnknownFormatConversionException
- * if the character is not a valid conversion format.
+ * if the character is not a valid conversion format.
*/
public static Conversion fromChar(final char c) throws UnknownFormatConversionException {
for (Conversion conversion : Conversion.values()) {
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/StringFormatValidator.java b/processor/src/main/java/org/jboss/logging/processor/validation/StringFormatValidator.java
index 326ef20..0bebd20 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/StringFormatValidator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/StringFormatValidator.java
@@ -140,15 +140,23 @@ public static StringFormatValidator withTranslation(final String format, final S
final StringFormatPart translationPart = translationIter.next();
if (initPart.conversion() != translationPart.conversion()) {
translationResult.valid = false;
- translationResult.setDetailMessage("The translated message format (%s) does not match the initial message format (%s).", translationFormat, format);
- translationResult.setSummaryMessage("The translated message format (%s) does not match the initial message format (%s).", translationFormat, format);
+ translationResult.setDetailMessage(
+ "The translated message format (%s) does not match the initial message format (%s).",
+ translationFormat, format);
+ translationResult.setSummaryMessage(
+ "The translated message format (%s) does not match the initial message format (%s).",
+ translationFormat, format);
break;
}
}
} else {
translationResult.valid = false;
- translationResult.setDetailMessage("The translated message format (%s) does not match the initial message format (%s).", translationFormat, format);
- translationResult.setSummaryMessage("The translated message format (%s) does not match the initial message format (%s).", translationFormat, format);
+ translationResult.setDetailMessage(
+ "The translated message format (%s) does not match the initial message format (%s).", translationFormat,
+ format);
+ translationResult.setSummaryMessage(
+ "The translated message format (%s) does not match the initial message format (%s).", translationFormat,
+ format);
}
return translationResult;
@@ -217,7 +225,9 @@ private void validate() {
if (!format.equalsIgnoreCase(asFormat())) {
valid = false;
setSummaryMessage("Formats don't match. Internal error: %s Reconstructed: %s", format, asFormat());
- setDetailMessage("The original is '%s' and the reconstructed format is '%s'. This is likely an internal error and should be reported.", format, asFormat());
+ setDetailMessage(
+ "The original is '%s' and the reconstructed format is '%s'. This is likely an internal error and should be reported.",
+ format, asFormat());
} else {
// Create a multimap to hold the parameter values for sorting
final Map> paramMap = new TreeMap<>();
@@ -295,8 +305,10 @@ private void validate() {
String.format(format, params.toArray());
} catch (final IllegalFormatException e) {
valid = false;
- setSummaryMessage("Invalid format for '%s' with parameters '%s'. java.util.Formatter Error: %s", format, paramMap, e.getMessage());
- setDetailMessage("Format '%s' with parameters '%s' is invalid. StringFormatValidator: %s", format, paramMap, this);
+ setSummaryMessage("Invalid format for '%s' with parameters '%s'. java.util.Formatter Error: %s", format,
+ paramMap, e.getMessage());
+ setDetailMessage("Format '%s' with parameters '%s' is invalid. StringFormatValidator: %s", format, paramMap,
+ this);
}
}
}
@@ -309,7 +321,8 @@ private void validate(final Object... parameters) {
final int paramCount = (parameters == null ? 0 : parameters.length);
if (argumentCount != paramCount) {
valid = false;
- setSummaryMessage("Parameter lengths do not match. Format (%s) requires %d arguments, supplied %d.", format, argumentCount, paramCount);
+ setSummaryMessage("Parameter lengths do not match. Format (%s) requires %d arguments, supplied %d.", format,
+ argumentCount, paramCount);
}
// Create a parameter list based on the parameters passed
if (valid) {
@@ -317,8 +330,10 @@ private void validate(final Object... parameters) {
String.format(format, parameters);
} catch (final IllegalFormatException e) {
valid = false;
- setSummaryMessage("Invalid format for '%s' with parameters '%s'. java.util.Formatter Error: %s", format, Arrays.toString(parameters), e.getMessage());
- setDetailMessage("Format '%s' with parameters '%s' is invalid. StringFormatValidator: %s", format, Arrays.toString(parameters), this);
+ setSummaryMessage("Invalid format for '%s' with parameters '%s'. java.util.Formatter Error: %s", format,
+ Arrays.toString(parameters), e.getMessage());
+ setDetailMessage("Format '%s' with parameters '%s' is invalid. StringFormatValidator: %s", format,
+ Arrays.toString(parameters), this);
}
}
}
@@ -410,7 +425,6 @@ private void init() {
}
}
-
/**
* Checks text to make sure we don't have extra garbage.
*
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/ValidationMessageFactory.java b/processor/src/main/java/org/jboss/logging/processor/validation/ValidationMessageFactory.java
index ea37052..611a7bd 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/ValidationMessageFactory.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/ValidationMessageFactory.java
@@ -45,19 +45,23 @@ public static ValidationMessage createError(final Element element, final String
return new ValidationErrorMessage(element, String.format(format, args), null, null);
}
- public static ValidationMessage createError(final Element element, final AnnotationMirror annotationMirror, final String message) {
+ public static ValidationMessage createError(final Element element, final AnnotationMirror annotationMirror,
+ final String message) {
return new ValidationErrorMessage(element, message, annotationMirror, null);
}
- public static ValidationMessage createError(final Element element, final AnnotationMirror annotationMirror, final String format, final Object... args) {
+ public static ValidationMessage createError(final Element element, final AnnotationMirror annotationMirror,
+ final String format, final Object... args) {
return new ValidationErrorMessage(element, String.format(format, args), annotationMirror, null);
}
- public static ValidationMessage createError(final Element element, final AnnotationMirror annotationMirror, final AnnotationValue annotationValue, final String message) {
+ public static ValidationMessage createError(final Element element, final AnnotationMirror annotationMirror,
+ final AnnotationValue annotationValue, final String message) {
return new ValidationErrorMessage(element, message, annotationMirror, annotationValue);
}
- public static ValidationMessage createError(final Element element, final AnnotationMirror annotationMirror, final AnnotationValue annotationValue, final String format, final Object... args) {
+ public static ValidationMessage createError(final Element element, final AnnotationMirror annotationMirror,
+ final AnnotationValue annotationValue, final String format, final Object... args) {
return new ValidationErrorMessage(element, String.format(format, args), annotationMirror, annotationValue);
}
@@ -75,7 +79,8 @@ private static abstract class AbstractValidationMessage implements ValidationMes
private final AnnotationMirror annotationMirror;
private final AnnotationValue annotationValue;
- AbstractValidationMessage(final Element element, final String message, final AnnotationMirror annotationMirror, final AnnotationValue annotationValue) {
+ AbstractValidationMessage(final Element element, final String message, final AnnotationMirror annotationMirror,
+ final AnnotationValue annotationValue) {
this.element = element;
this.message = message;
this.annotationMirror = annotationMirror;
@@ -105,7 +110,8 @@ public AnnotationValue getAnnotationValue() {
private static class ValidationErrorMessage extends AbstractValidationMessage {
- private ValidationErrorMessage(final Element element, final String message, final AnnotationMirror annotationMirror, final AnnotationValue annotationValue) {
+ private ValidationErrorMessage(final Element element, final String message, final AnnotationMirror annotationMirror,
+ final AnnotationValue annotationValue) {
super(element, message, annotationMirror, annotationValue);
}
@@ -117,7 +123,8 @@ public Type type() {
private static class ValidationWarningMessage extends AbstractValidationMessage {
- private ValidationWarningMessage(final Element element, final String message, final AnnotationMirror annotationMirror, final AnnotationValue annotationValue) {
+ private ValidationWarningMessage(final Element element, final String message, final AnnotationMirror annotationMirror,
+ final AnnotationValue annotationValue) {
super(element, message, annotationMirror, annotationValue);
}
diff --git a/processor/src/main/java/org/jboss/logging/processor/validation/Validator.java b/processor/src/main/java/org/jboss/logging/processor/validation/Validator.java
index f82efa6..e8d7f58 100644
--- a/processor/src/main/java/org/jboss/logging/processor/validation/Validator.java
+++ b/processor/src/main/java/org/jboss/logging/processor/validation/Validator.java
@@ -36,6 +36,7 @@
import java.util.TreeMap;
import java.util.function.BiFunction;
import java.util.function.Function;
+
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.Element;
import javax.lang.model.element.TypeElement;
@@ -115,7 +116,8 @@ public final Collection validate(final MessageInterface messa
messages.addAll(validateLogger(messageMethods));
locale = messageInterface.getAnnotation(MessageLogger.class).rootLocale();
} else {
- messages.add(createError(messageInterface, "Message interface %s is not a message bundle or message logger.", messageInterface.name()));
+ messages.add(createError(messageInterface, "Message interface %s is not a message bundle or message logger.",
+ messageInterface.name()));
}
// Check the locale is in the list of available locales
@@ -135,7 +137,8 @@ public final Collection validate(final MessageInterface messa
*
* @return a collection of validation messages.
*/
- private Collection validateCommon(final MessageInterface messageInterface, final Set messageMethods) {
+ private Collection validateCommon(final MessageInterface messageInterface,
+ final Set messageMethods) {
final List messages = new ArrayList<>();
final Map methodNames = new HashMap<>();
@@ -151,14 +154,16 @@ private Collection validateCommon(final MessageInterface mess
}
final MessageMethod.Message message = messageMethod.message();
if (message == null) {
- messages.add(createError(messageMethod, "All message bundles and message logger message methods must have or inherit a message."));
+ messages.add(createError(messageMethod,
+ "All message bundles and message logger message methods must have or inherit a message."));
continue;
}
// Check the message id
if (message.hasId()) {
// Make sure the message id is greater than 0
if (message.id() < 0) {
- messages.add(createError(messageMethod, "Message id %d is invalid. Must be greater than 0 or inherit another valid id.", message.id()));
+ messages.add(createError(messageMethod,
+ "Message id %d is invalid. Must be greater than 0 or inherit another valid id.", message.id()));
} else {
messages.addAll(messageIdValidator.validate(messageInterface, messageMethod));
}
@@ -167,7 +172,9 @@ private Collection validateCommon(final MessageInterface mess
if (formatValidator.isValid()) {
final int paramCount = messageMethod.formatParameterCount();
if (messageMethod.formatParameterCount() != formatValidator.argumentCount()) {
- messages.add(createError(messageMethod, "Parameter count does not match for format '%s'. Required: %d Provided: %d", formatValidator.format(), formatValidator.argumentCount(), paramCount));
+ messages.add(createError(messageMethod,
+ "Parameter count does not match for format '%s'. Required: %d Provided: %d",
+ formatValidator.format(), formatValidator.argumentCount(), paramCount));
}
final Map positions = new TreeMap<>();
boolean validatePositions = false;
@@ -183,7 +190,8 @@ private Collection validateCommon(final MessageInterface mess
final Transform[] transforms = pos.transform();
if (transforms != null && transforms.length > 0) {
if (pos.value().length != transforms.length) {
- messages.add(createError(parameter, "Positional parameters with transforms must have an equal number of positions and transforms."));
+ messages.add(createError(parameter,
+ "Positional parameters with transforms must have an equal number of positions and transforms."));
} else {
for (Transform transform : transforms) {
validateTransform(messages, parameter, transform);
@@ -194,12 +202,14 @@ private Collection validateCommon(final MessageInterface mess
final Set usedPositions = new HashSet<>();
for (int position : pos.value()) {
if (usedPositions.contains(position)) {
- messages.add(createError(parameter, "Position '%d' already used for this parameter.", position));
+ messages.add(
+ createError(parameter, "Position '%d' already used for this parameter.", position));
} else {
usedPositions.add(position);
}
if (positions.containsKey(position)) {
- messages.add(createError(parameter, "Position '%d' already defined on parameter '%s'", position, positions.get(position).name()));
+ messages.add(createError(parameter, "Position '%d' already defined on parameter '%s'", position,
+ positions.get(position).name()));
} else {
positions.put(position, parameter);
}
@@ -209,10 +219,12 @@ private Collection validateCommon(final MessageInterface mess
// Validate the @Suppressed parameter is on a message bundle, the return type is an exception and the parameter is an exception
if (parameter.isAnnotatedWith(Suppressed.class)) {
if (!messageMethod.returnType().isThrowable()) {
- messages.add(createError(messageMethod, "The @Suppressed parameter annotation can only be used with message bundle methods that return an exception."));
+ messages.add(createError(messageMethod,
+ "The @Suppressed parameter annotation can only be used with message bundle methods that return an exception."));
}
if (!isTypeAssignableFrom(parameter, Throwable.class)) {
- messages.add(createError(parameter, "The parameter annotated with @Suppressed must be assignable to a Throwable type."));
+ messages.add(createError(parameter,
+ "The parameter annotated with @Suppressed must be assignable to a Throwable type."));
}
}
}
@@ -221,7 +233,8 @@ private Collection validateCommon(final MessageInterface mess
for (int i = 0; i < messageMethod.formatParameterCount(); i++) {
final int positionIndex = i + 1;
if (!positions.containsKey(positionIndex)) {
- messages.add(createError(messageMethod, "Missing parameter with position '%d' defined.", positionIndex));
+ messages.add(
+ createError(messageMethod, "Missing parameter with position '%d' defined.", positionIndex));
}
}
}
@@ -247,23 +260,30 @@ private Collection validateCommon(final MessageInterface mess
return messages;
}
- private void validateTransform(final List messages, final Parameter parameter, final Transform transform) {
+ private void validateTransform(final List messages, final Parameter parameter,
+ final Transform transform) {
final List transformTypes = Arrays.asList(transform.value());
// If annotated with @Transform, must be an Object, primitives are not allowed
if (parameter.isPrimitive()) {
messages.add(createError(parameter, "Parameters annotated with @Transform cannot be primitives."));
} else if (transformTypes.contains(TransformType.GET_CLASS) && transformTypes.contains(TransformType.SIZE)) {
- messages.add(createError(parameter, "Transform type '%s' not allowed with type '%s'", TransformType.GET_CLASS, TransformType.SIZE));
+ messages.add(createError(parameter, "Transform type '%s' not allowed with type '%s'", TransformType.GET_CLASS,
+ TransformType.SIZE));
} else if (transformTypes.contains(TransformType.HASH_CODE) && transformTypes.contains(TransformType.SIZE)) {
- messages.add(createError(parameter, "Transform type '%s' not allowed with type '%s'", TransformType.HASH_CODE, TransformType.SIZE));
+ messages.add(createError(parameter, "Transform type '%s' not allowed with type '%s'", TransformType.HASH_CODE,
+ TransformType.SIZE));
} else if (transformTypes.contains(TransformType.IDENTITY_HASH_CODE) && transformTypes.contains(TransformType.SIZE)) {
- messages.add(createError(parameter, "Transform type '%s' not allowed with type '%s'", TransformType.IDENTITY_HASH_CODE, TransformType.SIZE));
- } else if (transformTypes.contains(TransformType.IDENTITY_HASH_CODE) && transformTypes.contains(TransformType.HASH_CODE)) {
- messages.add(createError(parameter, "Transform type '%s' not allowed with type '%s'", TransformType.IDENTITY_HASH_CODE, TransformType.HASH_CODE));
+ messages.add(createError(parameter, "Transform type '%s' not allowed with type '%s'",
+ TransformType.IDENTITY_HASH_CODE, TransformType.SIZE));
+ } else if (transformTypes.contains(TransformType.IDENTITY_HASH_CODE)
+ && transformTypes.contains(TransformType.HASH_CODE)) {
+ messages.add(createError(parameter, "Transform type '%s' not allowed with type '%s'",
+ TransformType.IDENTITY_HASH_CODE, TransformType.HASH_CODE));
} else if (transformTypes.contains(TransformType.SIZE)) {
if (!(parameter.isArray() || parameter.isVarArgs() || parameter.isSubtypeOf(Map.class) ||
parameter.isSubtypeOf(Collection.class) || parameter.isSubtypeOf(CharSequence.class))) {
- messages.add(createError(parameter, "Invalid type (%s) for %s. Must be an array, %s, %s or %s.", parameter.asType(),
+ messages.add(createError(parameter, "Invalid type (%s) for %s. Must be an array, %s, %s or %s.",
+ parameter.asType(),
TransformType.SIZE, Collection.class.getName(), Map.class.getName(), CharSequence.class.getName()));
}
}
@@ -284,7 +304,9 @@ private Collection validateParameters(final MessageMethod mes
}
if (parameter.isAnnotatedWith(LoggingClass.class)) {
if (!parameter.isSameAs(Class.class)) {
- messages.add(createError(parameter, "Parameter %s annotated with @LoggingClass on method %s must be of type %s.", parameter.name(), messageMethod.name(), Class.class.getName()));
+ messages.add(
+ createError(parameter, "Parameter %s annotated with @LoggingClass on method %s must be of type %s.",
+ parameter.name(), messageMethod.name(), Class.class.getName()));
}
}
if (parameter.isAnnotatedWith(Producer.class)) {
@@ -317,11 +339,13 @@ private Collection validateParameters(final MessageMethod mes
final TypeMirror returnType = typeArgs.get(2);
final TypeMirror first = typeArgs.get(0);
final TypeMirror second = typeArgs.get(1);
- if (!isTypeAssignableFrom(first, String.class) && !types.isSubtype(first, ElementHelper.toType(elements, Throwable.class))) {
+ if (!isTypeAssignableFrom(first, String.class)
+ && !types.isSubtype(first, ElementHelper.toType(elements, Throwable.class))) {
messages.add(createError(parameter, "The first type type parameter for %s " +
"must be assignable to a String or a super type of a Throwable.", parameter.asType()));
}
- if (!isTypeAssignableFrom(second, String.class) && !types.isSubtype(second, ElementHelper.toType(elements, Throwable.class))) {
+ if (!isTypeAssignableFrom(second, String.class)
+ && !types.isSubtype(second, ElementHelper.toType(elements, Throwable.class))) {
messages.add(createError(parameter, "The second type parameter for %s " +
"must be assignable to a String or a super type of a Throwable.", parameter.asType()));
}
@@ -331,12 +355,16 @@ private Collection validateParameters(final MessageMethod mes
}
if (messageMethod.hasCause()) {
// Make sure the cause parameter can be assigned to the cause parameter for the BiFunction
- if (types.isSubtype(first, ElementHelper.toType(elements, Throwable.class)) && !isTypeAssignableFrom(messageMethod.cause().asType(), first)) {
- messages.add(createError(parameter, "The first parameter type, %s, of the BiFunction must be assignable to the cause %s.",
+ if (types.isSubtype(first, ElementHelper.toType(elements, Throwable.class))
+ && !isTypeAssignableFrom(messageMethod.cause().asType(), first)) {
+ messages.add(createError(parameter,
+ "The first parameter type, %s, of the BiFunction must be assignable to the cause %s.",
first, messageMethod.cause().asType()));
}
- if (types.isSubtype(second, ElementHelper.toType(elements, Throwable.class)) && !isTypeAssignableFrom(messageMethod.cause().asType(), second)) {
- messages.add(createError(parameter, "The second parameter type, %s, of the BiFunction must be assignable to the cause %s.",
+ if (types.isSubtype(second, ElementHelper.toType(elements, Throwable.class))
+ && !isTypeAssignableFrom(messageMethod.cause().asType(), second)) {
+ messages.add(createError(parameter,
+ "The second parameter type, %s, of the BiFunction must be assignable to the cause %s.",
second, messageMethod.cause().asType()));
}
} else {
@@ -345,9 +373,9 @@ private Collection validateParameters(final MessageMethod mes
}
} else {
messages.add(createError(parameter, "The type parameters could not be validated for the " +
- "function. The first and second type arguments of the function must be a String " +
- "or a super type of Throwable. The third type parameter must be the same as or " +
- "a super type of %s.",
+ "function. The first and second type arguments of the function must be a String " +
+ "or a super type of Throwable. The third type parameter must be the same as or " +
+ "a super type of %s.",
requiredReturnType));
}
} else {
@@ -364,23 +392,29 @@ private Collection validateParameters(final MessageMethod mes
if (parameter.isAnnotatedWith(TransformException.class)) {
if (!messageMethod.returnType().isThrowable()) {
- messages.add(createError(messageMethod, "A parameter annotated with @%s can only be on bundle methods which return a Throwable type.", TransformException.class
- .getSimpleName()));
+ messages.add(createError(messageMethod,
+ "A parameter annotated with @%s can only be on bundle methods which return a Throwable type.",
+ TransformException.class
+ .getSimpleName()));
} else {
if (transformExceptionFound) {
- messages.add(createError(messageMethod, "Only one parameter annotated with @%s can be used", TransformException.class
- .getSimpleName()));
+ messages.add(createError(messageMethod, "Only one parameter annotated with @%s can be used",
+ TransformException.class
+ .getSimpleName()));
}
transformExceptionFound = true;
if (!isTypeAssignableFrom(parameter.asType(), Throwable.class)) {
- messages.add(createError(parameter, "The parameter annotated with @%s must be a subclass of Throwable", TransformException.class
- .getSimpleName()));
+ messages.add(createError(parameter, "The parameter annotated with @%s must be a subclass of Throwable",
+ TransformException.class
+ .getSimpleName()));
}
// Ensure the suggested exceptions are sub-types of the return type
- final List suggested = ElementHelper.getClassArrayAnnotationValue(parameter, TransformException.class, "value");
+ final List suggested = ElementHelper.getClassArrayAnnotationValue(parameter,
+ TransformException.class, "value");
for (TypeMirror suggestion : suggested) {
if (!types.isAssignable(suggestion, parameter.asType())) {
- messages.add(createError(parameter, "The suggested return type of %s is not assignable to %s", suggestion, parameter.asType()));
+ messages.add(createError(parameter, "The suggested return type of %s is not assignable to %s",
+ suggestion, parameter.asType()));
}
}
}
@@ -411,56 +445,72 @@ private Collection validateBundleMethod(final MessageMethod m
final TypeMirror returnTypeMirror = returnType.asType();
final TypeMirror resolvedReturnType = returnType.resolvedType();
if (returnTypeMirror.getKind() == TypeKind.VOID || returnTypeMirror.getKind().isPrimitive()) {
- messages.add(createError(messageMethod, "Message bundle messageMethod %s has an invalid return type. Cannot be void or a primitive.", messageMethod.name()));
+ messages.add(createError(messageMethod,
+ "Message bundle messageMethod %s has an invalid return type. Cannot be void or a primitive.",
+ messageMethod.name()));
} else if (returnType.isThrowable()) {
final ThrowableType throwableReturnType = returnType.throwableReturnType();
if (throwableReturnType.useConstructionParameters()) {
// Check for a matching constructor
final Signature signature = messageMethod.getAnnotation(Signature.class);
if (signature != null) {
- final List args = ElementHelper.getClassArrayAnnotationValue(messageMethod, Signature.class, "value");
+ final List args = ElementHelper.getClassArrayAnnotationValue(messageMethod, Signature.class,
+ "value");
// Validate the constructor exists
if (!ElementHelper.hasConstructor(types, returnType, args)) {
- messages.add(createError(messageMethod, "Could not find constructor for %s with arguments %s", messageMethod.asType(), args));
+ messages.add(createError(messageMethod, "Could not find constructor for %s with arguments %s",
+ messageMethod.asType(), args));
}
final int messageIndex = signature.messageIndex();
// Note that the messageIndex is required and must be 0 or greater
if (messageIndex < 0) {
- messages.add(createError(messageMethod, "A messageIndex of 0 or greater is required. Value %d is invalid.", messageIndex));
+ messages.add(createError(messageMethod,
+ "A messageIndex of 0 or greater is required. Value %d is invalid.", messageIndex));
}
}
// Validate the construct type is valid
if (messageMethod.isAnnotatedWith(ConstructType.class)) {
- final TypeElement constructTypeValue = ElementHelper.getClassAnnotationValue(messageMethod, ConstructType.class);
+ final TypeElement constructTypeValue = ElementHelper.getClassAnnotationValue(messageMethod,
+ ConstructType.class);
// Shouldn't be null
if (constructTypeValue == null) {
messages.add(createError(messageMethod, "Class not defined for the ConstructType"));
} else {
if (!types.isAssignable(constructTypeValue.asType(), returnType.asType())) {
- messages.add(createError(messageMethod, "The requested type %s can not be assigned to %s.", constructTypeValue.asType(), returnType.asType()));
+ messages.add(createError(messageMethod, "The requested type %s can not be assigned to %s.",
+ constructTypeValue.asType(), returnType.asType()));
}
}
}
- } else if (!throwableReturnType.useConstructionParameters() && !messageMethod.parametersAnnotatedWith(Param.class).isEmpty()) {
- messages.add(createError(messageMethod, "MessageMethod does not have an usable constructor for the return type %s.", returnType.name()));
+ } else if (!throwableReturnType.useConstructionParameters()
+ && !messageMethod.parametersAnnotatedWith(Param.class).isEmpty()) {
+ messages.add(createError(messageMethod,
+ "MessageMethod does not have an usable constructor for the return type %s.", returnType.name()));
} else {
- final boolean hasMessageConstructor = (throwableReturnType.hasStringAndThrowableConstructor() || throwableReturnType.hasThrowableAndStringConstructor() ||
+ final boolean hasMessageConstructor = (throwableReturnType.hasStringAndThrowableConstructor()
+ || throwableReturnType.hasThrowableAndStringConstructor() ||
throwableReturnType.hasStringConstructor());
- final boolean usableConstructor = (throwableReturnType.hasDefaultConstructor() || throwableReturnType.hasStringAndThrowableConstructor() ||
- throwableReturnType.hasStringConstructor() || throwableReturnType.hasThrowableAndStringConstructor() || throwableReturnType.hasThrowableConstructor());
+ final boolean usableConstructor = (throwableReturnType.hasDefaultConstructor()
+ || throwableReturnType.hasStringAndThrowableConstructor() ||
+ throwableReturnType.hasStringConstructor() || throwableReturnType.hasThrowableAndStringConstructor()
+ || throwableReturnType.hasThrowableConstructor());
if (!messageMethod.parametersAnnotatedWith(Producer.class).isEmpty()) {
if (messageMethod.isAnnotatedWith(ConstructType.class)) {
- messages.add(createError(messageMethod, "Method annotated with %s cannot have a parameter annotated with %s.",
+ messages.add(createError(messageMethod,
+ "Method annotated with %s cannot have a parameter annotated with %s.",
ConstructType.class.getName(), Producer.class.getName()));
}
final TypeMirror erasure = types.erasure(resolvedReturnType);
if (!isTypeAssignableFrom(erasure, Throwable.class)) {
- messages.add(createError(messageMethod, "The return type must be a super class of a java.lang.Throwable"));
+ messages.add(
+ createError(messageMethod, "The return type must be a super class of a java.lang.Throwable"));
}
} else if (!usableConstructor) {
- messages.add(createError(messageMethod, "MessageMethod does not have an usable constructor for the return type %s.", returnType.name()));
+ messages.add(createError(messageMethod,
+ "MessageMethod does not have an usable constructor for the return type %s.", returnType.name()));
} else if (!hasMessageConstructor) { // Check to see if there is no message constructor
- messages.add(createWarning(messageMethod, "The message cannot be set via the throwable constructor and will be ignored."));
+ messages.add(createWarning(messageMethod,
+ "The message cannot be set via the throwable constructor and will be ignored."));
}
}
} else {
@@ -470,7 +520,8 @@ private Collection validateBundleMethod(final MessageMethod m
"returns a String or a subtype of Throwable.", messageMethod.name(), returnTypeMirror));
}
if (messageMethod.isAnnotatedWith(ConstructType.class)) {
- messages.add(createError(messageMethod, "ConstructType annotation requires a throwable or supplier which produces a throwable return type"));
+ messages.add(createError(messageMethod,
+ "ConstructType annotation requires a throwable or supplier which produces a throwable return type"));
}
}
return messages;
diff --git a/processor/src/test/java/org/jboss/logging/processor/generated/MethodMessageConstants.java b/processor/src/test/java/org/jboss/logging/processor/generated/MethodMessageConstants.java
index a9918e9..79d8abd 100644
--- a/processor/src/test/java/org/jboss/logging/processor/generated/MethodMessageConstants.java
+++ b/processor/src/test/java/org/jboss/logging/processor/generated/MethodMessageConstants.java
@@ -147,7 +147,7 @@ public interface MethodMessageConstants {
})
TypeException multiField();
- @SuppressWarnings({"InstanceVariableMayNotBeInitialized", "unused"})
+ @SuppressWarnings({ "InstanceVariableMayNotBeInitialized", "unused" })
class TypeException extends RuntimeException {
public Class> type;
public Object value;
diff --git a/processor/src/test/java/org/jboss/logging/processor/generated/SignatureMessages.java b/processor/src/test/java/org/jboss/logging/processor/generated/SignatureMessages.java
index 0daed9a..1bff52d 100644
--- a/processor/src/test/java/org/jboss/logging/processor/generated/SignatureMessages.java
+++ b/processor/src/test/java/org/jboss/logging/processor/generated/SignatureMessages.java
@@ -44,7 +44,7 @@ public interface SignatureMessages {
RedirectException redirect(@Cause Throwable cause, @Param int responseCode, @Param String location);
- @Signature({String.class, String.class})
+ @Signature({ String.class, String.class })
RedirectException redirect(@Cause Throwable cause, @Param String location);
@Message(TEST_MSG)
@@ -57,7 +57,7 @@ public interface SignatureMessages {
InvalidTextException invalidText(@Cause Throwable cause, @Param String text);
- @Signature(causeIndex = 1, messageIndex = 3, value = {int.class, Throwable.class, String.class, String.class})
+ @Signature(causeIndex = 1, messageIndex = 3, value = { int.class, Throwable.class, String.class, String.class })
InvalidTextException invalidText(@Param int position, @Cause Throwable cause, @Param String text);
@SuppressWarnings("unused")
diff --git a/processor/src/test/java/org/jboss/logging/processor/generated/TransformLogger.java b/processor/src/test/java/org/jboss/logging/processor/generated/TransformLogger.java
index 9637d55..40017f6 100644
--- a/processor/src/test/java/org/jboss/logging/processor/generated/TransformLogger.java
+++ b/processor/src/test/java/org/jboss/logging/processor/generated/TransformLogger.java
@@ -49,19 +49,19 @@ public interface TransformLogger {
// getClass().hashCode();
@LogMessage
@Message(HASH_CODE_MSG)
- void logClassHashCode(@Transform({TransformType.GET_CLASS, TransformType.HASH_CODE}) String s);
+ void logClassHashCode(@Transform({ TransformType.GET_CLASS, TransformType.HASH_CODE }) String s);
@LogMessage(useThreadContext = true)
- void logClassHashCode(@Transform({TransformType.GET_CLASS, TransformType.HASH_CODE}) Collection c);
+ void logClassHashCode(@Transform({ TransformType.GET_CLASS, TransformType.HASH_CODE }) Collection c);
@LogMessage
- void logClassHashCode(@Transform({TransformType.GET_CLASS, TransformType.HASH_CODE}) String... array);
+ void logClassHashCode(@Transform({ TransformType.GET_CLASS, TransformType.HASH_CODE }) String... array);
@LogMessage
- void logClassHashCode(@Transform({TransformType.GET_CLASS, TransformType.HASH_CODE}) Object[] array);
+ void logClassHashCode(@Transform({ TransformType.GET_CLASS, TransformType.HASH_CODE }) Object[] array);
@LogMessage
- void logClassHashCode(@Transform({TransformType.GET_CLASS, TransformType.HASH_CODE}) Map map);
+ void logClassHashCode(@Transform({ TransformType.GET_CLASS, TransformType.HASH_CODE }) Map map);
// hashCode()
@LogMessage
@@ -83,19 +83,21 @@ public interface TransformLogger {
// System.identityHashCode(getClass())
@LogMessage
@Message(IDENTITY_HASH_CODE_MSG)
- void logClassIdentityHashCode(@Transform({TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE}) String s);
+ void logClassIdentityHashCode(@Transform({ TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE }) String s);
@LogMessage
- void logClassIdentityHashCode(@Transform({TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE}) Collection c);
+ void logClassIdentityHashCode(
+ @Transform({ TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE }) Collection c);
@LogMessage
- void logClassIdentityHashCode(@Transform({TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE}) String... array);
+ void logClassIdentityHashCode(@Transform({ TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE }) String... array);
@LogMessage
- void logClassIdentityHashCode(@Transform({TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE}) Object[] array);
+ void logClassIdentityHashCode(@Transform({ TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE }) Object[] array);
@LogMessage
- void logClassIdentityHashCode(@Transform({TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE}) Map map);
+ void logClassIdentityHashCode(
+ @Transform({ TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE }) Map map);
// System.identityHashCode()
@LogMessage
@@ -119,7 +121,6 @@ public interface TransformLogger {
@Message(GET_CLASS_MSG)
void logObjectClass(@Transform(TransformType.GET_CLASS) String s);
-
@LogMessage
void logObjectClass(@Transform(TransformType.GET_CLASS) String... array);
@@ -145,12 +146,18 @@ public interface TransformLogger {
// Position tests
String POS_MSG_1 = "size %d hashCode %d identityHashCode %d";
+
@LogMessage
@Message(POS_MSG_1)
- void posTest1(@Pos(value = {2, 3}, transform = {@Transform(TransformType.HASH_CODE), @Transform(TransformType.IDENTITY_HASH_CODE)}) String msg1, @Pos(value = 1, transform = @Transform(TransformType.SIZE)) String msg2);
+ void posTest1(
+ @Pos(value = { 2, 3 }, transform = { @Transform(TransformType.HASH_CODE),
+ @Transform(TransformType.IDENTITY_HASH_CODE) }) String msg1,
+ @Pos(value = 1, transform = @Transform(TransformType.SIZE)) String msg2);
String POS_MSG_2 = "size %d s1=%s s2=%s getClass() %s";
+
@LogMessage
@Message(POS_MSG_2)
- void posTest2(@Pos(value = 4, transform = @Transform(TransformType.GET_CLASS)) Object type, @Pos(value = 1, transform = @Transform(TransformType.SIZE)) String msg, @Pos(2) String s1, @Pos(3) String s2);
+ void posTest2(@Pos(value = 4, transform = @Transform(TransformType.GET_CLASS)) Object type,
+ @Pos(value = 1, transform = @Transform(TransformType.SIZE)) String msg, @Pos(2) String s1, @Pos(3) String s2);
}
diff --git a/processor/src/test/java/org/jboss/logging/processor/generated/TransformMessages.java b/processor/src/test/java/org/jboss/logging/processor/generated/TransformMessages.java
index 6c80b3c..a35a26d 100644
--- a/processor/src/test/java/org/jboss/logging/processor/generated/TransformMessages.java
+++ b/processor/src/test/java/org/jboss/logging/processor/generated/TransformMessages.java
@@ -47,15 +47,15 @@ public interface TransformMessages {
// getClass().hashCode();
@Message(HASH_CODE_MSG)
- String msgClassHashCode(@Transform({TransformType.GET_CLASS, TransformType.HASH_CODE}) String s);
+ String msgClassHashCode(@Transform({ TransformType.GET_CLASS, TransformType.HASH_CODE }) String s);
- String msgClassHashCode(@Transform({TransformType.GET_CLASS, TransformType.HASH_CODE}) Collection c);
+ String msgClassHashCode(@Transform({ TransformType.GET_CLASS, TransformType.HASH_CODE }) Collection c);
- String msgClassHashCode(@Transform({TransformType.GET_CLASS, TransformType.HASH_CODE}) String... array);
+ String msgClassHashCode(@Transform({ TransformType.GET_CLASS, TransformType.HASH_CODE }) String... array);
- String msgClassHashCode(@Transform({TransformType.GET_CLASS, TransformType.HASH_CODE}) Object[] array);
+ String msgClassHashCode(@Transform({ TransformType.GET_CLASS, TransformType.HASH_CODE }) Object[] array);
- String msgClassHashCode(@Transform({TransformType.GET_CLASS, TransformType.HASH_CODE}) Map map);
+ String msgClassHashCode(@Transform({ TransformType.GET_CLASS, TransformType.HASH_CODE }) Map map);
// hashCode()
@Message(HASH_CODE_MSG)
@@ -71,15 +71,17 @@ public interface TransformMessages {
// System.identityHashCode(getClass())
@Message(IDENTITY_HASH_CODE_MSG)
- String msgClassIdentityHashCode(@Transform({TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE}) String s);
+ String msgClassIdentityHashCode(@Transform({ TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE }) String s);
- String msgClassIdentityHashCode(@Transform({TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE}) Collection c);
+ String msgClassIdentityHashCode(
+ @Transform({ TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE }) Collection c);
- String msgClassIdentityHashCode(@Transform({TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE}) String... array);
+ String msgClassIdentityHashCode(@Transform({ TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE }) String... array);
- String msgClassIdentityHashCode(@Transform({TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE}) Object[] array);
+ String msgClassIdentityHashCode(@Transform({ TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE }) Object[] array);
- String msgClassIdentityHashCode(@Transform({TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE}) Map map);
+ String msgClassIdentityHashCode(
+ @Transform({ TransformType.GET_CLASS, TransformType.IDENTITY_HASH_CODE }) Map map);
// System.identityHashCode()
@Message(IDENTITY_HASH_CODE_MSG)
@@ -97,7 +99,6 @@ public interface TransformMessages {
@Message(GET_CLASS_MSG)
String msgObjectClass(@Transform(TransformType.GET_CLASS) String s);
-
String msgObjectClass(@Transform(TransformType.GET_CLASS) String... array);
String msgObjectClass(@Transform(TransformType.GET_CLASS) Object[] array);
@@ -116,10 +117,16 @@ public interface TransformMessages {
// Position tests
String POS_MSG_1 = "size %d hashCode %d identityHashCode %d";
+
@Message(POS_MSG_1)
- String posTest1(@Pos(value = {2, 3}, transform = {@Transform(TransformType.HASH_CODE), @Transform(TransformType.IDENTITY_HASH_CODE)}) String msg1, @Pos(value = 1, transform = @Transform(TransformType.SIZE)) String msg2);
+ String posTest1(
+ @Pos(value = { 2, 3 }, transform = { @Transform(TransformType.HASH_CODE),
+ @Transform(TransformType.IDENTITY_HASH_CODE) }) String msg1,
+ @Pos(value = 1, transform = @Transform(TransformType.SIZE)) String msg2);
String POS_MSG_2 = "size %d s1=%s s2=%s getClass() %s";
+
@Message(POS_MSG_2)
- String posTest2(@Pos(value = 4, transform = @Transform(TransformType.GET_CLASS)) Object type, @Pos(value = 1, transform = @Transform(TransformType.SIZE)) String msg, @Pos(2) String s1, @Pos(3) String s2);
+ String posTest2(@Pos(value = 4, transform = @Transform(TransformType.GET_CLASS)) Object type,
+ @Pos(value = 1, transform = @Transform(TransformType.SIZE)) String msg, @Pos(2) String s1, @Pos(3) String s2);
}
diff --git a/processor/src/test/java/org/jboss/logging/processor/generated/ValidLogger.java b/processor/src/test/java/org/jboss/logging/processor/generated/ValidLogger.java
index 8003fe1..f1e5436 100644
--- a/processor/src/test/java/org/jboss/logging/processor/generated/ValidLogger.java
+++ b/processor/src/test/java/org/jboss/logging/processor/generated/ValidLogger.java
@@ -104,7 +104,7 @@ public interface ValidLogger {
void expensiveLog(Supplier error);
@LogMessage(level = Level.ERROR)
- @Message( "Error: %s")
+ @Message("Error: %s")
void expensiveLogArray(Supplier