changeset 1085:723dc85eb157

Fix the test failure on JDK 6 due to Javac Filer's inability to read the resource back.
author shade
date Mon, 12 Jan 2015 23:41:06 +0300
parents b99ec1daf32d
children d15ebde32b25
files jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGenerator.java
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGenerator.java	Mon Jan 12 22:28:37 2015 +0300
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGenerator.java	Mon Jan 12 23:41:06 2015 +0300
@@ -167,6 +167,8 @@
                 }
             } catch (IOException e) {
                 // Expected in most cases, move on.
+            } catch (UnsupportedOperationException e) {
+                destination.printWarning("Unable to read the existing benchmark list, because of UnsupportedOperationException. Run on JDK 7 or higher.");
             }
 
             // Generate new benchmark entries, potentially overwriting the previous lines