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.

XMLBasedAjcTestCaseForJava15Only.java 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* *******************************************************************
  2. * Copyright (c) 2021 Contributors
  3. * All rights reserved.
  4. * This program and the accompanying materials are made available
  5. * under the terms of the Eclipse Public License v 2.0
  6. * which accompanies this distribution and is available at
  7. * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
  8. * ******************************************************************/
  9. package org.aspectj.testing;
  10. /**
  11. * Makes sure tests are running on the right level of JDK.
  12. *
  13. * @author Alexander Kriegisch
  14. */
  15. public abstract class XMLBasedAjcTestCaseForJava15Only extends XMLBasedAjcTestCase {
  16. @Override
  17. public void setUp() throws Exception {
  18. // Activate this block after upgrading to JDT Core Java 16
  19. throw new IllegalStateException(
  20. "These tests need a Java 15 level AspectJ compiler " +
  21. "(e.g. because they use version-specific preview features). " +
  22. "This compiler does not support preview features of a previous version anymore."
  23. );
  24. // Activate this block before upgrading to JDT Core Java 16
  25. /*
  26. if (!LangUtil.isVMGreaterOrEqual(15) || LangUtil.isVMGreaterOrEqual(16)) {
  27. throw new IllegalStateException(
  28. "These tests should be run on Java 15 only " +
  29. "(e.g. because they use version-specific preview features)"
  30. );
  31. }
  32. super.setUp();
  33. */
  34. }
  35. }