( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0007484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.23234095600require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.23804124592include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.23804124592get_header( $name = ???, $args = ??? ).../single.php:10
60.23814124808locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.23814124904load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.23844125448require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.23864132856wp_head( ).../header.php:18
100.23864132856do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.23864133072WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.23864133072WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.23894136488wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.23894136488do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.23894136704WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.23894136704WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.23914138592twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.23934140112wp_style_add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.php:440
190.23934140112WP_Styles->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.wp-styles.php:245
200.23934140112WP_Dependencies->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../class-wp-styles.php:385
210.23934140112_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.23934146064wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.23944265600trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0007484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.23234095600require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.23804124592include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.23804124592get_header( $name = ???, $args = ??? ).../single.php:10
60.23814124808locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.23814124904load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.23844125448require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.23864132856wp_head( ).../header.php:18
100.23864132856do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.23864133072WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.23864133072WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.23894136488wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.23894136488do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.23894136704WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.23894136704WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.23914138592twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.28504266704wp_style_add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.php:444
190.28504266704WP_Styles->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.wp-styles.php:245
200.28504266704WP_Dependencies->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../class-wp-styles.php:385
210.28504266704_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.28504267024wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.28514267248trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

ant build java generics,ANT编译泛型

用ant编译java项目的,报泛型错误,但eclipse却没有报错;报错如下:

ScopeUtil.java:185: type parameters of <T>T cannot be determined; no unique maximal instance exists for type variable T with upper bounds boolean,java.lang.Object

代码如下 : 

public static final boolean isSuperAdmin() {
   return getSession(key_SuperAdmin);
}

@SuppressWarnings(“unchecked”)
public static final <T> T getSession(String name) {
ActionContext actionContext = ActionContext.getContext();
Map<String, Object> session = actionContext.getSession();
return (T) session.get(name);
}

经过分析,发现isSuperAdmin返回是boolean而getSession,返回是Boolean,既返回对象与返回类型的区别,所以在ant编译时出错;

把代码改一下就可以了:

public static final boolean isSuperAdmin() {
Boolean superAdmin = getSession(key_SuperAdmin);
return superAdmin == true;
}

One thought on “ant build java generics,ANT编译泛型”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.