草庐IT

deprecate

全部标签

java - @deprecated 与 @Deprecated

这个问题在这里已经有了答案:HowtodeclareormarkaJavamethodasdeprecated?(6个回答)关闭8年前。我可以使用@Deprecated注释来弃用函数或类。但是在javadoc注释本身中有一个@deprecatedjavadoc标记,将类/函数标记为已弃用。@deprecatedjavadoc标签是否真的使类/函数被弃用了? 最佳答案 @Deprecated是编译器读取的注解,用于将方法标记为编译器已弃用,如果使用该方法,将生成弃用编译时警告。@deprecated是一个javadoc标记,用于提供有

java - Spring 启动 : SpringBootServletInitializer is deprecated

我正在尝试按照this将SpringBoot应用程序部署到JBoss.它运行良好,但SpringBootServletInitializer在1.4.0.RELEASE中已弃用。我应该使用哪一个?Maven依赖org.springframework.bootspring-boot-starter-parent1.4.0.RELEASEJava代码importorg.springframework.boot.SpringApplication;importorg.springframework.boot.autoconfigure.EnableAutoConfiguration;impo

java - @SuppressWarnings ("deprecation") 和 ("unused") 在 Java 中是什么意思?

我的Java或Android项目中的这些行是什么意思?@SuppressWarnings("deprecation")@SuppressWarnings("unused") 最佳答案 @SuppressWarnings注释禁用某些编译器警告。在这种情况下,关于已弃用代码("deprecation")和未使用的局部变量或未使用的私有(private)方法("unused")的警告。Thisarticleexplainsthepossiblevalues. 关于java-@SuppressW

android - OnGlobalLayoutListener : deprecation and compatibility

我必须使用OnGlobalLayoutListener对象,然后删除监听器,我遇到了不推荐使用的方法的问题,我使用以下代码解决了这个问题。protectedvoidonCreate(BundlesavedInstanceState){finalLinearLayoutllTotal=(LinearLayout)findViewById(R.id.mmc_ll);ViewTreeObservervto=llTotal.getViewTreeObserver();if(vto.isAlive()){vto.addOnGlobalLayoutListener(newOnGlobalLayou

php - 使用 PHP zip 扩展构建的 Docker 镜像显示 "bundled libzip is deprecated"警告

我有一个Dockerfile带有这样的构建命令:#installsomebaseextensionsRUNapt-getinstall-y\zlib1g-dev\zip\&&docker-php-ext-installzip我从构建输出中收到此警告:WARNING:Useofbundledlibzipisdeprecatedandwillberemoved.configure:WARNING:Somefeaturessuchasencryptionandbzip2arenotavailable.configure:WARNING:Usesystemlibraryand--with-li

node.js - express js错误: "express deprecated res.sendfile: Use res.sendFile instead"

设置路径的正确方法是什么?在我的应用程序中,我使用此代码设置发送文件的路径。app.get('/',function(req,res){//get,put,post,deleteres.sendfile(__dirname+'/client/views/index.html');});但它给出了这个错误:expressdeprecatedres.sendfile:Useres.sendFileinsteadserver.js:22:6可以指出这里的错误是什么。请 最佳答案 改变这个app.get('/',function(req,r

node.js - express js错误: "express deprecated res.sendfile: Use res.sendFile instead"

设置路径的正确方法是什么?在我的应用程序中,我使用此代码设置发送文件的路径。app.get('/',function(req,res){//get,put,post,deleteres.sendfile(__dirname+'/client/views/index.html');});但它给出了这个错误:expressdeprecatedres.sendfile:Useres.sendFileinsteadserver.js:22:6可以指出这里的错误是什么。请 最佳答案 改变这个app.get('/',function(req,r

java - 警告 : The method assertEquals from the type Assert is deprecated

由于方法Assert.assertEquals已被弃用,我们现在应该使用哪种方法?以下代码:Stringarg1="test";Stringarg2="me";Assert.assertEquals(arg1,arg2);给出以下警告:MultiplemarkersatthislineThemethodassertEquals(String,String)fromthetypeAssertisdeprecatedThetypeAssertisdeprecated 最佳答案 您正在使用junit.framework.Assert而不是

objective-c - 使用 respondsToSelector 时抑制 "' …' is deprecated"

我通过在运行时选择最新的API来支持10.4+:if([fileManagerrespondsToSelector:@selector(removeItemAtPath:error:)])[fileManagerremoveItemAtPath:downloadDirerror:NULL];else[fileManagerremoveFileAtPath:downloadDirhandler:nil];在这种情况下,10.5及更高版本将使用removeItemAtPath:error:,而10.4将使用removeFileAtPath:handler:。很好,但我仍然收到旧方法的编译器

iphone - presentModalViewController :Animated is deprecated in ios6

我将以下代码用于图像选择器。但是当我在模拟器中运行它时,我遇到了内存泄漏,并且我收到了关于presentModalViewcontroller:animated在iOS6中被弃用的警告。我也弃用了dismissModalViewController:animated。我正在使用SDK6.1。ImagePicker代码:-(void)showAlbum:(id)sender{imagePicker=[[UIImagePickerControlleralloc]init];imagePicker.delegate=self;imagePicker.allowsEditing=NO;imag