From e43c5722c5375fa5bd2b46bef714a472dc97b6c7b9ecaefb49e9dd9b4b69a555 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 2 May 2023 20:54:25 +0000 Subject: [PATCH 1/2] Accepting request 1084076 from home:urbic:branches:Java:packages - Update to version 1.13.0 * See CHANGELOG.md - Switch to java source level 8 OBS-URL: https://build.opensuse.org/request/show/1084076 OBS-URL: https://build.opensuse.org/package/show/Java:packages/javapoet?expand=0&rev=4 --- javapoet-1.13.0.tar.gz | 3 +++ javapoet-1.7.0.tar.gz | 3 --- javapoet.changes | 7 +++++++ javapoet.spec | 9 ++++++--- 4 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 javapoet-1.13.0.tar.gz delete mode 100644 javapoet-1.7.0.tar.gz diff --git a/javapoet-1.13.0.tar.gz b/javapoet-1.13.0.tar.gz new file mode 100644 index 0000000..cd6ec9b --- /dev/null +++ b/javapoet-1.13.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86af0c8907734645197f25028ac07983b40b4948a58ea2b29e3376e66b85f8e2 +size 89919 diff --git a/javapoet-1.7.0.tar.gz b/javapoet-1.7.0.tar.gz deleted file mode 100644 index 977648e..0000000 --- a/javapoet-1.7.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1632e64e80360fb3a52e53212cfdff5e623e55f461945704479de87bd92892dc -size 71670 diff --git a/javapoet.changes b/javapoet.changes index 092cdcb..26c949f 100644 --- a/javapoet.changes +++ b/javapoet.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Apr 20 04:25:06 UTC 2023 - Anton Shvetz + +- Update to version 1.13.0 + * See CHANGELOG.md +- Switch to java source level 8 + ------------------------------------------------------------------- Fri May 3 14:55:20 UTC 2019 - Fridrich Strba diff --git a/javapoet.spec b/javapoet.spec index 3d30fd9..adc2497 100644 --- a/javapoet.spec +++ b/javapoet.spec @@ -1,7 +1,7 @@ # # spec file for package javapoet # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: javapoet -Version: 1.7.0 +Version: 1.13.0 Release: 0 Summary: A Java API for generating .java source files License: Apache-2.0 @@ -43,12 +43,15 @@ This package contains javadoc for %{name}. %setup -q -n %{name}-%{name}-%{version} %pom_remove_plugin :maven-checkstyle-plugin +%pom_remove_dep org.codehaus.plexus:plexus-compiler-javac-errorprone +%pom_remove_dep com.google.errorprone:error_prone_core +%pom_xpath_remove pom:compilerId %{mvn_file} : %{name} %build # skip tests due to missing test dependencies -%{mvn_build} -f -- -Dsource=7 +%{mvn_build} -f -- -Dsource=8 %install %mvn_install From 7ab24f64a73379e9a719ac1e800fe099c7f9dffc3decad8c0a5f41df0e22a824 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 3 May 2023 11:56:43 +0000 Subject: [PATCH 2/2] Accepting request 1084235 from home:urbic:branches:Java:packages Fill changelog according to upstream CHANGELOG.md - Update to version 1.13.0 * Changes in JavaPoet 1.13.0 (2020-06-18) + New: Add support for explicit receiver parameters. + Fix: Don't copy parameter annotations when creating a ParameterSpec. * Changes in JavaPoet 1.12.1 (2020-01-20) + Fix: Ignore parameter annotations in MethodSpec.overriding(). * JavaPoet 1.12.0 (2020-01-09) + New: Add JavaFile.writeToPath() and JavaFile.writeToFile() methods that return paths to the generated file as Path and File respectively. + New: Add TypeSpec.alwaysQualify() API to avoid clashes involving nested type names. + New: Add overloads accepting CodeBlocks to MethodSpec's control flow methods. + New: Make list fields of all Builder types mutable. + New: Add CodeBlock.clear(). + New: Allow passing a custom Charset to JavaFile.writeTo(). + New: Improved performance of ClassName.simpleNames() by memoizing results. + New: Significant performance improvements for CodeWriter.resolve() as all nested simple names of a TypeSpec get pre-computed. + New: Add TypeName.Builder.setName() to allow overriding names passed in the constructor. + New: Add TypeName.canonicalName(). + Fix: Use \\R instead of \n as line separator in CodeWriter.emitAndIndent(). + Fix: Copy originating elements in TypeSpec.toBuilder(). + Fix: Ensure trailing newlines in Javadocs and method bodies. + Fix: Copy annotations when creating a ParameterSpec from a VariableElement. + Fix: Properly handle classes located in empty packages in ClassName. + Fix: Only allow final modifier on a ParameterSpec. + Fix: Use fully-qualified names for type names that are masked by type variable names. * Changes in JavaPoet 1.11.1 (2018-05-16) + Fix: JavaPoet 1.11 had a regression where TypeName.get() would throw on error types, masking other errors in an annotation processing round. This is fixed with a test to prevent future regressions! * Changes in JavaPoet 1.11.0 (2018-04-29) + New: Support TYPE_USE annotations on each enclosing ClassName. + New: Work around a compiler bug in TypeName.get(TypeElement). There was a problem getting an element's kind when building from source ABIs. * Changes in JavaPoet 1.10.0 (2018-01-27) + JavaPoet now requires Java 8 or newer. + New: $Z as an optional newline (zero-width space) if a line may exceed 100 chars. + New: CodeBlock.join() and CodeBlock.joining() let you join codeblocks by delimiters. + New: Add CodeBlock.Builder.isEmpty(). + New: addStatement(CodeBlock) overloads for CodeBlock and MethodSpec. + Fix: Include annotations when emitting type variables. + Fix: Use the right imports for annotated type parameters. + Fix: Don't incorrectly escape classnames that start with $. * Changes in JavaPoet 1.9.0 (2017-05-13) + Fix: Don't emit incorrect code when the declared type's signature references another type with the same simple name. + Fix: Support anonymous inner classes in ClassName.get(). + New: MethodSpec.Builder.addNamedCode() and TypeSpec.anonymousClassBuilder(CodeBlock). * Changes in JavaPoet 1.8.0 (2016-11-09) + New: Basic support for line wrapping. Use $W to insert a Wrappable Whitespace character. It'll emit either a single space or a newline with appropriate indentation. + New: Named arguments in CodeBlock. These are intended to make larger code snippets easier to read. + New: addJavadoc(CodeBlock) overloads for TypeSpec, MethodSpec, and FieldSpec. + New: MethodSpec.addComment() makes it easy to add a // single-line comment. + New: ClassName.getReflectionName() returns a string like java.util.Map$Entry. + Fix: Always write UTF-8. Previously JavaPoet would use the system default charset which was potentially inconsistent across environments. + Fix: Permit (constant) fields to be defined in annotation types. - Switch to java source level 8 - Initial packaging of javapoet 1.7.0 OBS-URL: https://build.opensuse.org/request/show/1084235 OBS-URL: https://build.opensuse.org/package/show/Java:packages/javapoet?expand=0&rev=5 --- javapoet.changes | 83 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/javapoet.changes b/javapoet.changes index 26c949f..c92bf9a 100644 --- a/javapoet.changes +++ b/javapoet.changes @@ -2,7 +2,88 @@ Thu Apr 20 04:25:06 UTC 2023 - Anton Shvetz - Update to version 1.13.0 - * See CHANGELOG.md + * Changes in JavaPoet 1.13.0 (2020-06-18) + + New: Add support for explicit receiver parameters. + + Fix: Don't copy parameter annotations when creating a + ParameterSpec. + * Changes in JavaPoet 1.12.1 (2020-01-20) + + Fix: Ignore parameter annotations in MethodSpec.overriding(). + * JavaPoet 1.12.0 (2020-01-09) + + New: Add JavaFile.writeToPath() and JavaFile.writeToFile() + methods that return paths to the generated file as Path and + File respectively. + + New: Add TypeSpec.alwaysQualify() API to avoid clashes + involving nested type names. + + New: Add overloads accepting CodeBlocks to MethodSpec's + control flow methods. + + New: Make list fields of all Builder types mutable. + + New: Add CodeBlock.clear(). + + New: Allow passing a custom Charset to JavaFile.writeTo(). + + New: Improved performance of ClassName.simpleNames() by + memoizing results. + + New: Significant performance improvements for + CodeWriter.resolve() as all nested simple names of a TypeSpec + get pre-computed. + + New: Add TypeName.Builder.setName() to allow overriding names + passed in the constructor. + + New: Add TypeName.canonicalName(). + + Fix: Use \\R instead of \n as line separator in + CodeWriter.emitAndIndent(). + + Fix: Copy originating elements in TypeSpec.toBuilder(). + + Fix: Ensure trailing newlines in Javadocs and method bodies. + + Fix: Copy annotations when creating a ParameterSpec from a + VariableElement. + + Fix: Properly handle classes located in empty packages in + ClassName. + + Fix: Only allow final modifier on a ParameterSpec. + + Fix: Use fully-qualified names for type names that are masked + by type variable names. + * Changes in JavaPoet 1.11.1 (2018-05-16) + + Fix: JavaPoet 1.11 had a regression where TypeName.get() + would throw on error types, masking other errors in an + annotation processing round. This is fixed with a test to + prevent future regressions! + * Changes in JavaPoet 1.11.0 (2018-04-29) + + New: Support TYPE_USE annotations on each enclosing + ClassName. + + New: Work around a compiler bug in TypeName.get(TypeElement). + There was a problem getting an element's kind when building + from source ABIs. + * Changes in JavaPoet 1.10.0 (2018-01-27) + + JavaPoet now requires Java 8 or newer. + + New: $Z as an optional newline (zero-width space) if a line + may exceed 100 chars. + + New: CodeBlock.join() and CodeBlock.joining() let you join + codeblocks by delimiters. + + New: Add CodeBlock.Builder.isEmpty(). + + New: addStatement(CodeBlock) overloads for CodeBlock and + MethodSpec. + + Fix: Include annotations when emitting type variables. + + Fix: Use the right imports for annotated type parameters. + + Fix: Don't incorrectly escape classnames that start with $. + * Changes in JavaPoet 1.9.0 (2017-05-13) + + Fix: Don't emit incorrect code when the declared type's + signature references another type with the same simple name. + + Fix: Support anonymous inner classes in ClassName.get(). + + New: MethodSpec.Builder.addNamedCode() and + TypeSpec.anonymousClassBuilder(CodeBlock). + * Changes in JavaPoet 1.8.0 (2016-11-09) + + New: Basic support for line wrapping. Use $W to insert a + Wrappable Whitespace character. It'll emit either a single + space or a newline with appropriate indentation. + + New: Named arguments in CodeBlock. These are intended to make + larger code snippets easier to read. + + New: addJavadoc(CodeBlock) overloads for TypeSpec, + MethodSpec, and FieldSpec. + + New: MethodSpec.addComment() makes it easy to add a // + single-line comment. + + New: ClassName.getReflectionName() returns a string like + java.util.Map$Entry. + + Fix: Always write UTF-8. Previously JavaPoet would use the + system default charset which was potentially inconsistent + across environments. + + Fix: Permit (constant) fields to be defined in annotation + types. - Switch to java source level 8 -------------------------------------------------------------------