No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long. 1.3KB

  1. #!/bin/sh
  2. # delete all classes
  3. rm -f *.class
  4. javac -version 2>&1
  5. # compile our annotation processor once
  6. javac
  7. echo 'these are the correct argument names, compiled with and without -parameters argument, compiling both classes in a single invocation:'
  8. javac -parameters -processor ParameterPrintingProcessor 2>&1 | head -n1
  9. rm Person.class PersonDao.class
  10. javac -processor ParameterPrintingProcessor 2>&1 | head -n1
  11. echo
  12. echo 'this shows expected missing parameter names when compiled in 2 steps, like in the case of libraries or multiple module projects, without -parameters:'
  13. rm Person.class PersonDao.class
  14. javac
  15. javac -processor ParameterPrintingProcessor 2>&1 | head -n1
  16. echo
  17. echo 'and finally the bug, same two step compilation as above, but -parameters passed into first step, shows shifted/incorrect parameter names:'
  18. rm Person.class PersonDao.class
  19. javac -parameters
  20. # below is the actual invocation of javac where the bug lives, somehow reads saved parameter names from step above incorrectly
  21. # they are saved correctly above, because you can read them at runtime correctly
  22. javac -processor ParameterPrintingProcessor 2>&1 | head -n1
  23. # clean up by deleting all classes
  24. rm -f *.class