From 99e67b151d074854016fac3fa48a056b98c2c7b7 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Tue, 1 Sep 2009 19:46:20 +0000 Subject: [PATCH] o Enabled access to non-public methods git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@810194 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/maven/plugin/coreit/ExpressionUtil.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-expression/src/main/java/org/apache/maven/plugin/coreit/ExpressionUtil.java b/its/core-it-support/core-it-plugins/maven-it-plugin-expression/src/main/java/org/apache/maven/plugin/coreit/ExpressionUtil.java index 9f32f8b04e..004c03aa7d 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-expression/src/main/java/org/apache/maven/plugin/coreit/ExpressionUtil.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-expression/src/main/java/org/apache/maven/plugin/coreit/ExpressionUtil.java @@ -161,6 +161,7 @@ class ExpressionUtil try { Method method = type.getMethod( property, NO_PARAMS ); + method.setAccessible( true ); value = method.invoke( context, NO_ARGS ); } catch ( NoSuchMethodException e ) @@ -169,6 +170,7 @@ class ExpressionUtil { String name = "get" + Character.toUpperCase( property.charAt( 0 ) ) + property.substring( 1 ); Method method = type.getMethod( name, NO_PARAMS ); + method.setAccessible( true ); value = method.invoke( context, NO_ARGS ); } catch ( NoSuchMethodException e1 ) @@ -177,6 +179,7 @@ class ExpressionUtil { String name = "is" + Character.toUpperCase( property.charAt( 0 ) ) + property.substring( 1 ); Method method = type.getMethod( name, NO_PARAMS ); + method.setAccessible( true ); value = method.invoke( context, NO_ARGS ); } catch ( NoSuchMethodException e2 ) @@ -192,6 +195,7 @@ class ExpressionUtil { method = type.getMethod( "get", OBJECT_PARAM ); } + method.setAccessible( true ); value = method.invoke( context, new Object[] { property } ); } catch ( NoSuchMethodException e3 ) @@ -199,6 +203,7 @@ class ExpressionUtil try { Field field = type.getField( property ); + field.setAccessible( true ); value = field.get( context ); } catch ( NoSuchFieldException e4 )