Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qdox for openSUSE:Factory checked in at 2023-05-14 16:31:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qdox (Old) and /work/SRC/openSUSE:Factory/.qdox.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qdox" Sun May 14 16:31:36 2023 rev:28 rq:1086861 version:2.0.3 Changes: -------- --- /work/SRC/openSUSE:Factory/qdox/qdox.changes 2022-03-13 20:25:26.423674631 +0100 +++ /work/SRC/openSUSE:Factory/.qdox.new.1533/qdox.changes 2023-05-14 16:34:02.303869284 +0200 @@ -1,0 +2,12 @@ +Fri May 12 20:33:29 UTC 2023 - Fridrich Strba <[email protected]> + +- Update to version 2.0.3: + * Changes: + + Update documentation #41 + + interface should be ignored as modifier #115 + + add byaccj 1.15 binaries for Mac OS on aarch64 (#109) + + Correctly resolve types with SourceFolderLibrary (#105) + + #99 Seems QDox 2.0.1 has issue parsing parameters names named + "recordList" and "record" + +------------------------------------------------------------------- Old: ---- qdox-2.0.1-project.tar.bz2 New: ---- qdox-2.0.3-project.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qdox.spec ++++++ --- /var/tmp/diff_new_pack.Yrd0Gj/_old 2023-05-14 16:34:02.795871663 +0200 +++ /var/tmp/diff_new_pack.Yrd0Gj/_new 2023-05-14 16:34:02.803871701 +0200 @@ -1,7 +1,7 @@ # # spec file for package qdox # -# Copyright (c) 2022 SUSE LLC +# 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: qdox -Version: 2.0.1 +Version: 2.0.3 Release: 0 Summary: Tool to extract class/interface/method definitions from sources License: Apache-2.0 ++++++ qdox-2.0.1-project.tar.bz2 -> qdox-2.0.3-project.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qdox-2.0.1/.github/dependabot.yml new/qdox-2.0.3/.github/dependabot.yml --- old/qdox-2.0.1/.github/dependabot.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/qdox-2.0.3/.github/dependabot.yml 2022-10-13 17:32:42.000000000 +0200 @@ -0,0 +1,12 @@ +version: 2 +updates: + - package-ecosystem: "maven" + directory: "/" + schedule: + interval: "daily" + target-branch: "master" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + target-branch: "master" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qdox-2.0.1/.github/workflows/build.yml new/qdox-2.0.3/.github/workflows/build.yml --- old/qdox-2.0.1/.github/workflows/build.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/qdox-2.0.3/.github/workflows/build.yml 2022-10-13 17:32:42.000000000 +0200 @@ -0,0 +1,30 @@ +name: Java CI + +on: [ push ] + +jobs: + build: + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} + strategy: + matrix: + os: [ ubuntu-latest , windows-latest ] + java: [ 8, 11 ] + experimental: [ false ] + + steps: + - uses: actions/[email protected] + - uses: actions/[email protected] + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Set up JDK ${{ matrix.java }} + uses: actions/[email protected] + with: + java-version: ${{ matrix.java }} + distribution: adopt + - name: Build with mvn + run: | + mvn clean install diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qdox-2.0.1/.gitignore new/qdox-2.0.3/.gitignore --- old/qdox-2.0.1/.gitignore 2021-11-13 15:25:20.000000000 +0100 +++ new/qdox-2.0.3/.gitignore 2022-10-13 17:32:42.000000000 +0200 @@ -3,3 +3,4 @@ /target /.classpath /.settings +/.idea diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qdox-2.0.1/.travis.yml new/qdox-2.0.3/.travis.yml --- old/qdox-2.0.1/.travis.yml 2021-11-13 15:25:20.000000000 +0100 +++ new/qdox-2.0.3/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -language: java -jdk: - - openjdk8 - - openjdk11 -script: mvn clean verify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qdox-2.0.1/README.md new/qdox-2.0.3/README.md --- old/qdox-2.0.1/README.md 2021-11-13 15:25:20.000000000 +0100 +++ new/qdox-2.0.3/README.md 2022-10-13 17:32:42.000000000 +0200 @@ -2,8 +2,6 @@ ### Status -[](https://travis-ci.org/paul-hammant/qdox) - QDox is a high speed, small footprint parser for fully extracting class/interface/method definitions (including annotations, parameters, param names). It is designed to be used by active code generators or documentation tools. Not so relevant any more, but it also also processes JavaDoc @tags @@ -434,7 +432,7 @@ JavaParameter o = m.getParameters()[1]; String oName = o.getName(); // "objects" JavaType oType = o.getType(); // "java.lang.Object"; -boolean oArray = o.getType().isArray(); // true +boolean oArray = o.getJavaClass().isArray(); // true JavaMethod javaMethod = o.getParentMethod(); ``` Binary files old/qdox-2.0.1/bootstrap/yacc.macosx.aarch64 and new/qdox-2.0.3/bootstrap/yacc.macosx.aarch64 differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qdox-2.0.1/pom.xml new/qdox-2.0.3/pom.xml --- old/qdox-2.0.1/pom.xml 2021-11-13 15:25:20.000000000 +0100 +++ new/qdox-2.0.3/pom.xml 2022-10-13 17:32:42.000000000 +0200 @@ -10,7 +10,7 @@ <name>QDox</name> <groupId>com.thoughtworks.qdox</groupId> <artifactId>qdox</artifactId> - <version>2.0.1</version> + <version>2.0.3</version> <url>https://github.com/paul-hammant/qdox</url> <description> @@ -36,7 +36,7 @@ <connection>scm:git:https://github.com/paul-hammant/qdox.git</connection> <developerConnection>scm:git:ssh://[email protected]/paul-hammant/qdox.git</developerConnection> <url>https://github.com/paul-hammant/qdox</url> - <tag>qdox-2.0.1</tag> + <tag>qdox-2.0.3</tag> </scm> <developers> @@ -152,7 +152,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>2.3.2</version> + <version>3.3.0</version> <configuration> <archive> <manifestEntries> @@ -205,6 +205,20 @@ </rules> </configuration> </execution> + <execution> + <id>enforce-byaccj</id> + <goals> + <goal>enforce</goal> + </goals> + <configuration> + <rules> + <requireProperty> + <property>qdox.byaccj.executable</property> + <message>You can't run the build as BYacc/J is not available for ${os.name} (${os.arch})!</message> + </requireProperty> + </rules> + </configuration> + </execution> </executions> </plugin> <plugin> @@ -364,7 +378,7 @@ <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>4.12</version> + <version>4.13.2</version> <scope>test</scope> </dependency> <dependency> @@ -412,10 +426,23 @@ </properties> </profile> <profile> - <id>macosx</id> + <id>macosx-i386</id> + <activation> + <os> + <family>Mac</family> + <arch>i386</arch> + </os> + </activation> + <properties> + <qdox.byaccj.executable>${basedir}/bootstrap/yacc.macosx</qdox.byaccj.executable> + </properties> + </profile> + <profile> + <id>macosx-powerpc</id> <activation> <os> <family>Mac</family> + <arch>powerpc</arch> </os> </activation> <properties> @@ -423,6 +450,18 @@ </properties> </profile> <profile> + <id>macosx-aarch64</id> + <activation> + <os> + <family>Mac</family> + <arch>aarch64</arch> + </os> + </activation> + <properties> + <qdox.byaccj.executable>${basedir}/bootstrap/yacc.macosx.aarch64</qdox.byaccj.executable> + </properties> + </profile> + <profile> <id>windows</id> <activation> <os> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qdox-2.0.1/src/grammar/lexer.flex new/qdox-2.0.3/src/grammar/lexer.flex --- old/qdox-2.0.1/src/grammar/lexer.flex 2021-11-13 15:25:20.000000000 +0100 +++ new/qdox-2.0.3/src/grammar/lexer.flex 2022-10-13 17:32:42.000000000 +0200 @@ -239,7 +239,7 @@ <ANNOTATIONNOARG> { {WhiteSpace} { popState(); } } -<YYINITIAL, ANNOTATIONNOARG, ANNOTATIONTYPE, ENUM, NAME, RECORD, TYPE> { +<YYINITIAL, ANNOTATIONNOARG, ANNOTATIONTYPE, ENUM, NAME, TYPE> { "." { return Parser.DOT; } "..." { return Parser.DOTDOTDOT; } "," { return Parser.COMMA; } @@ -265,7 +265,6 @@ "implements" { return Parser.IMPLEMENTS; } "super" { return Parser.SUPER; } "new" { return Parser.NEW; } - "record" { return Parser.RECORD; } "sealed" { return Parser.SEALED; } "non-sealed" { return Parser.NON_SEALED; } "permits" { return Parser.PERMITS; } @@ -309,6 +308,13 @@ pushState(NAME); return Parser.ENUM; } + "record" / {WhiteSpace}+ {Id} { + markAnnotatedElementLine(); + classDepth++; + braceMode = CODEBLOCK; + pushState(NAME); + return Parser.RECORD; + } "@" { markAnnotatedElementLine(); pushState(ATANNOTATION); @@ -430,7 +436,7 @@ } } } -<ENUM, RECORD, TYPE> { +<ENUM, TYPE> { "default" { return Parser.DEFAULT; } } <ANNOTATIONTYPE> { @@ -441,7 +447,7 @@ {Id} / {WhiteSpace}* [;{(] { resetAnnotatedElementLine(); popState(); return Parser.IDENTIFIER; } {Id} { popState(); return Parser.IDENTIFIER; } } -<YYINITIAL, ANNOTATIONNOARG, ANNOTATIONTYPE, ENUM, MODULE, RECORD, TYPE> { +<YYINITIAL, ANNOTATIONNOARG, ANNOTATIONTYPE, ENUM, MODULE, TYPE> { {Id} { return Parser.IDENTIFIER; } } @@ -657,12 +663,12 @@ } } -<ASSIGNMENT, YYINITIAL, CODEBLOCK, PARENBLOCK, ENUM, ANNOTATIONTYPE, RECORD, TYPE> { +<ASSIGNMENT, YYINITIAL, CODEBLOCK, PARENBLOCK, ENUM, ANNOTATIONTYPE, TYPE> { "\"" { if (appendingToCodeBody) { codeBody.append('"'); } pushState(STRING); } \' { if (appendingToCodeBody) { codeBody.append('\''); } pushState(CHAR); } } -<ASSIGNMENT, YYINITIAL, CODEBLOCK, PARENBLOCK, ENUM, ANNOTATIONTYPE, ANNOTATION, ATANNOTATION, ARGUMENTS, RECORD, TYPE, NAME, MODULE > { +<ASSIGNMENT, YYINITIAL, CODEBLOCK, PARENBLOCK, ENUM, ANNOTATIONTYPE, ANNOTATION, ATANNOTATION, ARGUMENTS, TYPE, NAME, MODULE > { "//" { if (appendingToCodeBody) { codeBody.append("//"); } pushState(SINGLELINECOMMENT); } "/*" { if (appendingToCodeBody) { codeBody.append("/*"); } pushState(MULTILINECOMMENT); } "/**/" { if (appendingToCodeBody) { codeBody.append("/**/"); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qdox-2.0.1/src/main/java/com/thoughtworks/qdox/library/SourceFolderLibrary.java new/qdox-2.0.3/src/main/java/com/thoughtworks/qdox/library/SourceFolderLibrary.java --- old/qdox-2.0.1/src/main/java/com/thoughtworks/qdox/library/SourceFolderLibrary.java 2021-11-13 15:25:20.000000000 +0100 +++ new/qdox-2.0.3/src/main/java/com/thoughtworks/qdox/library/SourceFolderLibrary.java 2022-10-13 17:32:42.000000000 +0200 @@ -25,7 +25,6 @@ import java.net.MalformedURLException; import java.util.ArrayList; import java.util.Collection; -import java.util.Iterator; import java.util.LinkedList; import java.util.List; @@ -106,25 +105,11 @@ protected JavaClass resolveJavaClass( String className ) { JavaClass result = super.resolveJavaClass( className ); - for ( File sourceFolder : sourceFolders ) + String mainClassName = className.split( "\\$" )[0]; + File sourceFile = getSourceFile( mainClassName ); + if ( sourceFile != null ) { - String mainClassName = className.split( "\\$" )[0]; - File classFile = new File( sourceFolder, mainClassName.replace( '.', File.separatorChar ) + ".java" ); - if ( classFile.isFile() ) - { - try - { - JavaSource source = parse( new FileReader( classFile ), classFile.toURI().toURL() ).getSource(); - result = source.getClassByName( className ); - break; - } - catch ( FileNotFoundException e ) - { - } - catch ( MalformedURLException e ) - { - } - } + result = getClassFromSourceFile( sourceFile, className ); } return result; } @@ -138,15 +123,48 @@ protected boolean containsClassReference( String className ) { boolean result = super.containsClassReference( className ); - for ( Iterator<File> iterator = sourceFolders.iterator(); !result && iterator.hasNext(); ) + if ( !result ) { - File sourceFolder = (File) iterator.next(); String mainClassName = className.split( "\\$" )[0]; - File classFile = new File( sourceFolder, mainClassName.replace( '.', File.separatorChar ) + ".java" ); - - result = ( classFile.exists() && classFile.isFile() ); + File sourceFile = getSourceFile( mainClassName ); + if ( sourceFile != null ) + { + if ( mainClassName.equals( className ) ) { + result = true; + } else { + result = getClassFromSourceFile( sourceFile, className ) != null; + } + } } return result; } - + + private File getSourceFile( String mainClassName ) + { + for ( File sourceFolder : sourceFolders ) + { + File classFile = new File( sourceFolder, mainClassName.replace( '.', File.separatorChar ) + ".java" ); + if ( classFile.isFile() ) + { + return classFile; + } + } + return null; + } + + private JavaClass getClassFromSourceFile( File sourceFile, String className ) + { + try + { + JavaSource source = parse( new FileReader( sourceFile ), sourceFile.toURI().toURL() ).getSource(); + return source.getClassByName( className ); + } + catch ( FileNotFoundException e ) + { + } + catch ( MalformedURLException e ) + { + } + return null; + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qdox-2.0.1/src/main/java/com/thoughtworks/qdox/writer/impl/DefaultModelWriter.java new/qdox-2.0.3/src/main/java/com/thoughtworks/qdox/writer/impl/DefaultModelWriter.java --- old/qdox-2.0.1/src/main/java/com/thoughtworks/qdox/writer/impl/DefaultModelWriter.java 2021-11-13 15:25:20.000000000 +0100 +++ new/qdox-2.0.3/src/main/java/com/thoughtworks/qdox/writer/impl/DefaultModelWriter.java 2022-10-13 17:32:42.000000000 +0200 @@ -357,7 +357,9 @@ { for ( String modifier : modifiers ) { - if ( !modifier.startsWith( "p" ) ) + // interface is included as a modifier + // https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/reflect/Modifier.html#toString(int) + if ( !modifier.startsWith( "p" ) && !"interface".equals( modifier ) ) { buffer.write( modifier ); buffer.write( ' ' ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qdox-2.0.1/src/test/java/com/thoughtworks/qdox/JavaProjectBuilderTest.java new/qdox-2.0.3/src/test/java/com/thoughtworks/qdox/JavaProjectBuilderTest.java --- old/qdox-2.0.1/src/test/java/com/thoughtworks/qdox/JavaProjectBuilderTest.java 2021-11-13 15:25:20.000000000 +0100 +++ new/qdox-2.0.3/src/test/java/com/thoughtworks/qdox/JavaProjectBuilderTest.java 2022-10-13 17:32:42.000000000 +0200 @@ -623,6 +623,31 @@ assertNull("Shouldn't be able to get private methods", betterList.getMethodBySignature("myown", null, true)); } + public void testMethodsWithNonQualifiedTypesFromJavaLangCanBeRetrievedFromSourceFolderLibrary() { + builder.addSourceFolder( new File( "src/test/resources/issue104") ); + JavaClass testClass = builder.getClassByName("x.Test"); + assertNull(testClass.getMethodBySignature("test", null)); + JavaType argumentType = builder.getClassByName("java.lang.Integer"); + assertNotNull(testClass.getMethodBySignature("test", Collections.singletonList( argumentType ))); + } + + public void testMethodsWithNonQualifiedTypesFromJavaLangCanBeRetrievedFromSourceLibrary() { + String testSource = "" + + "package x;" + + "/**" + + " * @foo bar" + + " */" + + "class Test {" + + " public void test(Integer value) {}" + + "}"; + builder.addSource(new StringReader(testSource)); + + JavaClass testClass = builder.getClassByName("x.Test"); + assertNull(testClass.getMethodBySignature("test", null)); + JavaType argumentType = builder.getClassByName("java.lang.Integer"); + assertNotNull(testClass.getMethodBySignature("test", Collections.singletonList( argumentType ))); + } + public void testTagLineNumbersAndSourceInTags() { String jallaSource = "" + "package x;\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qdox-2.0.1/src/test/java/com/thoughtworks/qdox/RecordsTest.java new/qdox-2.0.3/src/test/java/com/thoughtworks/qdox/RecordsTest.java --- old/qdox-2.0.1/src/test/java/com/thoughtworks/qdox/RecordsTest.java 2021-11-13 15:25:20.000000000 +0100 +++ new/qdox-2.0.3/src/test/java/com/thoughtworks/qdox/RecordsTest.java 2022-10-13 17:32:42.000000000 +0200 @@ -138,4 +138,38 @@ + " @GreaterThanZero double width) { }"; builder.addSource( new StringReader(source) ); } + + @Test + public void withAnnotation() { + String source = "@Deprecated\n" + + "record Line(int lenght) { }"; + builder.addSource( new StringReader(source) ); + } + + + @Test + public void recordAsTypeAndIdentifiers() { + String source = "package record.record.record;\n" + + "\n" + + "public class record\n" + + "{\n" + + " private Object record;\n" + + " \n" + + " public record() {\n" + + " }\n" + + " \n" + + " private Object record(Object record) {\n" + + " return record;\n" + + " }\n" + + "}"; + builder.addSource( new StringReader(source) ); + } + + @Test + public void parametersContainingRecord() { + String source = "interface Example{\n" + + " void apply(Object recordList);" + + "}"; + builder.addSource( new StringReader(source) ); + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qdox-2.0.1/src/test/java/com/thoughtworks/qdox/library/SourceFolderLibraryTest.java new/qdox-2.0.3/src/test/java/com/thoughtworks/qdox/library/SourceFolderLibraryTest.java --- old/qdox-2.0.1/src/test/java/com/thoughtworks/qdox/library/SourceFolderLibraryTest.java 2021-11-13 15:25:20.000000000 +0100 +++ new/qdox-2.0.3/src/test/java/com/thoughtworks/qdox/library/SourceFolderLibraryTest.java 2022-10-13 17:32:42.000000000 +0200 @@ -1,14 +1,9 @@ package com.thoughtworks.qdox.library; -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; - import java.io.File; import java.io.StringReader; import java.util.Iterator; -import org.junit.Test; - import com.thoughtworks.qdox.model.JavaClass; import com.thoughtworks.qdox.model.JavaModule; import com.thoughtworks.qdox.model.JavaModuleDescriptor; @@ -17,6 +12,12 @@ import com.thoughtworks.qdox.model.JavaModuleDescriptor.JavaProvides; import com.thoughtworks.qdox.model.JavaModuleDescriptor.JavaRequires; import com.thoughtworks.qdox.model.JavaModuleDescriptor.JavaUses; +import org.junit.Test; + +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; public class SourceFolderLibraryTest { @@ -108,5 +109,13 @@ cls = classIter.next(); assertEquals( "Z3.Z4", cls.getFullyQualifiedName() ); } - + + @Test + public void testHasClassReference() { + library.addSourceFolder( new File("src/test/resources") ); + assertFalse( library.hasClassReference( "Integer" ) ); + assertTrue( library.hasClassReference( "com.thoughtworks.qdox.testdata.DefaultCtor" ) ); + // the following (non-existing) FQCN is called e.g. from TypeResolver + assertFalse( library.hasClassReference( "com.thoughtworks.qdox.testdata.DefaultCtor$Integer" ) ); + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qdox-2.0.1/src/test/java/com/thoughtworks/qdox/writer/impl/DefaultModelWriterTest.java new/qdox-2.0.3/src/test/java/com/thoughtworks/qdox/writer/impl/DefaultModelWriterTest.java --- old/qdox-2.0.1/src/test/java/com/thoughtworks/qdox/writer/impl/DefaultModelWriterTest.java 2021-11-13 15:25:20.000000000 +0100 +++ new/qdox-2.0.3/src/test/java/com/thoughtworks/qdox/writer/impl/DefaultModelWriterTest.java 2022-10-13 17:32:42.000000000 +0200 @@ -1,5 +1,7 @@ package com.thoughtworks.qdox.writer.impl; +import static org.hamcrest.CoreMatchers.startsWith; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -13,6 +15,8 @@ import org.junit.Before; import org.junit.Test; +import com.thoughtworks.qdox.library.ClassLibrary; +import com.thoughtworks.qdox.library.SortedClassLibraryBuilder; import com.thoughtworks.qdox.model.DocletTag; import com.thoughtworks.qdox.model.JavaAnnotatedElement; import com.thoughtworks.qdox.model.JavaAnnotation; @@ -542,4 +546,15 @@ modelWriter.writeModuleUses( uses ); assertEquals( "uses V.W;\n", modelWriter.toString() ); } + + @Test + public void interfaceModifier() + { + ClassLibrary classLibrary = new SortedClassLibraryBuilder() + .appendDefaultClassLoaders() + .getClassLibrary(); + + JavaClass clazz = classLibrary.getJavaClass( "java.util.Set" ); + assertThat( clazz.getCodeBlock(), startsWith( "public abstract interface Set" ) ); + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qdox-2.0.1/src/test/resources/issue104/x/Test.java new/qdox-2.0.3/src/test/resources/issue104/x/Test.java --- old/qdox-2.0.1/src/test/resources/issue104/x/Test.java 1970-01-01 01:00:00.000000000 +0100 +++ new/qdox-2.0.3/src/test/resources/issue104/x/Test.java 2022-10-13 17:32:43.000000000 +0200 @@ -0,0 +1,5 @@ +package x; + +class Test { + public void test(Integer value) {} +}; \ No newline at end of file ++++++ qdox-build.xml ++++++ --- /var/tmp/diff_new_pack.Yrd0Gj/_old 2023-05-14 16:34:03.207873655 +0200 +++ /var/tmp/diff_new_pack.Yrd0Gj/_new 2023-05-14 16:34:03.211873674 +0200 @@ -9,7 +9,7 @@ <property file="build.properties"/> <property name="project.artifactId" value="qdox"/> - <property name="project.version" value="2.0.1"/> + <property name="project.version" value="2.0.3"/> <property name="build.finalName" value="${project.artifactId}-${project.version}"/> <property name="build.dir" value="target"/>
