Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to QDox 2.0-M5 #29

Open
puntogil opened this issue Feb 10, 2017 · 1 comment
Open

Update to QDox 2.0-M5 #29

puntogil opened this issue Feb 10, 2017 · 1 comment

Comments

@puntogil
Copy link

Hi
any plans to update QDox to 2.0-M5 ?

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.thoughtworks.paranamer.generator.OldQDoxParanamerTestCase
Tests run: 7, Failures: 0, Errors: 7, Skipped: 0, Time elapsed: 0.207 sec <<< FAILURE! - in com.thoughtworks.paranamer.generator.OldQDoxParanamerTestCase
testGenericClassGeneration(com.thoughtworks.paranamer.generator.OldQDoxParanamerTestCase)  Time elapsed: 0.103 sec  <<< ERROR!
java.io.FileNotFoundException: /builddir/build/BUILD/paranamer-cb6709646eed97c271d73f50ad750cc43c8e052a/paranamer-generator/./target/test-classes/com/thoughtworks/paranamer/generator/Monkey/Avocado.class (No such file or directory)
	at com.thoughtworks.paranamer.generator.OldQDoxParanamerTestCase.setUp(OldQDoxParanamerTestCase.java:54)
testGenerationWithInnerClass1(com.thoughtworks.paranamer.generator.OldQDoxParanamerTestCase)  Time elapsed: 0.008 sec  <<< ERROR!
java.io.FileNotFoundException: /builddir/build/BUILD/paranamer-cb6709646eed97c271d73f50ad750cc43c8e052a/paranamer-generator/./target/test-classes/com/thoughtworks/paranamer/generator/Monkey/Avocado.class (No such file or directory)
	at com.thoughtworks.paranamer.generator.OldQDoxParanamerTestCase.setUp(OldQDoxParanamerTestCase.java:54)
testGenerationWithInnerClass2(com.thoughtworks.paranamer.generator.OldQDoxParanamerTestCase)  Time elapsed: 0.008 sec  <<< ERROR!
java.io.FileNotFoundException: /builddir/build/BUILD/paranamer-cb6709646eed97c271d73f50ad750cc43c8e052a/paranamer-generator/./target/test-classes/com/thoughtworks/paranamer/generator/Monkey/Avocado.class (No such file or directory)
	at com.thoughtworks.paranamer.generator.OldQDoxParanamerTestCase.setUp(OldQDoxParanamerTestCase.java:54)
testSimpleClassGeneration(com.thoughtworks.paranamer.generator.OldQDoxParanamerTestCase)  Time elapsed: 0.007 sec  <<< ERROR!
java.io.FileNotFoundException: /builddir/build/BUILD/paranamer-cb6709646eed97c271d73f50ad750cc43c8e052a/paranamer-generator/./target/test-classes/com/thoughtworks/paranamer/generator/Monkey/Avocado.class (No such file or directory)
	at com.thoughtworks.paranamer.generator.OldQDoxParanamerTestCase.setUp(OldQDoxParanamerTestCase.java:54)
testGenerationWithClassMismatchingFilename(com.thoughtworks.paranamer.generator.OldQDoxParanamerTestCase)  Time elapsed: 0.007 sec  <<< ERROR!
java.io.FileNotFoundException: /builddir/build/BUILD/paranamer-cb6709646eed97c271d73f50ad750cc43c8e052a/paranamer-generator/./target/test-classes/com/thoughtworks/paranamer/generator/Monkey/Avocado.class (No such file or directory)
	at com.thoughtworks.paranamer.generator.OldQDoxParanamerTestCase.setUp(OldQDoxParanamerTestCase.java:54)
testGenerationWithMultipleClassesAtSameFile1(com.thoughtworks.paranamer.generator.OldQDoxParanamerTestCase)  Time elapsed: 0.01 sec  <<< ERROR!
java.io.FileNotFoundException: /builddir/build/BUILD/paranamer-cb6709646eed97c271d73f50ad750cc43c8e052a/paranamer-generator/./target/test-classes/com/thoughtworks/paranamer/generator/Monkey/Avocado.class (No such file or directory)
	at com.thoughtworks.paranamer.generator.OldQDoxParanamerTestCase.setUp(OldQDoxParanamerTestCase.java:54)
testGenerationWithMultipleClassesAtSameFile2(com.thoughtworks.paranamer.generator.OldQDoxParanamerTestCase)  Time elapsed: 0.038 sec  <<< ERROR!
java.io.FileNotFoundException: /builddir/build/BUILD/paranamer-cb6709646eed97c271d73f50ad750cc43c8e052a/paranamer-generator/./target/test-classes/com/thoughtworks/paranamer/generator/Monkey/Avocado.class (No such file or directory)
	at com.thoughtworks.paranamer.generator.OldQDoxParanamerTestCase.setUp(OldQDoxParanamerTestCase.java:54)
Running com.thoughtworks.paranamer.generator.QDoxParanamerTestCase
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec <<< FAILURE! - in com.thoughtworks.paranamer.generator.QDoxParanamerTestCase
testFoo(com.thoughtworks.paranamer.generator.QDoxParanamerTestCase)  Time elapsed: 0 sec  <<< ERROR!
java.io.FileNotFoundException: /builddir/build/BUILD/paranamer-cb6709646eed97c271d73f50ad750cc43c8e052a/paranamer-generator/./target/test-classes/com/thoughtworks/paranamer/generator/Monkey/Avocado.class (No such file or directory)
	at com.thoughtworks.paranamer.generator.QDoxParanamerTestCase.setUp(QDoxParanamerTestCase.java:54)
Results :
Tests in error: 
  OldQDoxParanamerTestCase.setUp:54 ? FileNotFound /builddir/build/BUILD/paranam...
  OldQDoxParanamerTestCase.setUp:54 ? FileNotFound /builddir/build/BUILD/paranam...
  OldQDoxParanamerTestCase.setUp:54 ? FileNotFound /builddir/build/BUILD/paranam...
  OldQDoxParanamerTestCase.setUp:54 ? FileNotFound /builddir/build/BUILD/paranam...
  OldQDoxParanamerTestCase.setUp:54 ? FileNotFound /builddir/build/BUILD/paranam...
  OldQDoxParanamerTestCase.setUp:54 ? FileNotFound /builddir/build/BUILD/paranam...
  OldQDoxParanamerTestCase.setUp:54 ? FileNotFound /builddir/build/BUILD/paranam...
  QDoxParanamerTestCase.setUp:54 ? FileNotFound /builddir/build/BUILD/paranamer-...
Tests run: 8, Failures: 0, Errors: 8, Skipped: 0
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Skipping ParaNamer Parent
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] ParaNamer Parent ................................... SUCCESS [  0.001 s]
[INFO] ParaNamer Generator ................................ FAILURE [  1.664 s]
[INFO] ParaNamer Maven plugin ............................. SKIPPED

thanks in advance

regards

@puntogil
Copy link
Author

Maybe this fix could help

--- a/paranamer-generator/src/java/com/thoughtworks/paranamer/generator/QdoxParanamerGenerator.java
+++ b/paranamer-generator/src/java/com/thoughtworks/paranamer/generator/QdoxParanamerGenerator.java
@@ -85,7 +85,7 @@ public class QdoxParanamerGenerator implements ParanamerGenerator {
         	content.append(addConstructors(javaClass.getConstructors()));
         	content.append(addMethods(javaClass.getMethods()));
             // TODO problem with inner classes
-            makeEnhancer().enhance(new File(outputPath, javaClass.getFullyQualifiedName().replace('.', File.separatorChar) + ".class"), content);
+            makeEnhancer().enhance(new File(outputPath, javaClass.getBinaryName().replace('.', File.separatorChar) + ".class"), content);
 
         }
     }
@@ -171,7 +171,7 @@ public class QdoxParanamerGenerator implements ParanamerGenerator {
         Iterator<JavaParameter> paramIter = parameters.iterator();
         while(paramIter.hasNext()) {
         	JavaParameter param = paramIter.next();
-        	sb.append(param.getType().getCanonicalName());
+        	sb.append(param.getType().getCanonicalName().replaceAll("\\[\\]", ""));
         	if(paramIter.hasNext())
         	{
         		sb.append(COMMA);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant