- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在使用wildfly 10.1.0
, jdk 1.8
, dynamic web module 3.1
和java serverfaces 2.2
.
当我运行这个项目时,我得到以下堆栈跟踪。我已经检查过没有方法重写类的 final方法,如堆栈跟踪中所示。
我不确定是什么原因造成的,希望有人能帮助我。
16:30:44,786 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0028: Stopped deployment RGExtranet.war (runtime-name: RGExtranet.war) in 73ms
16:30:44,787 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of "RGExtranet.war" (runtime-name: "RGExtranet.war")
16:31:01,805 WARN [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry logkit-1.2.jar in /D:/wildfly-10.1.0.Final/standalone/deployments/RGExtranet.war/WEB-INF/lib/jacorb.jar does not point to a valid jar for a Class-Path reference.
16:31:01,806 WARN [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry avalon-framework-4.1.5.jar in /D:/wildfly-10.1.0.Final/standalone/deployments/RGExtranet.war/WEB-INF/lib/jacorb.jar does not point to a valid jar for a Class-Path reference.
16:31:01,806 WARN [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry concurrent-1.3.2.jar in /D:/wildfly-10.1.0.Final/standalone/deployments/RGExtranet.war/WEB-INF/lib/jacorb.jar does not point to a valid jar for a Class-Path reference.
16:31:01,806 WARN [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry antlr-2.7.2.jar in /D:/wildfly-10.1.0.Final/standalone/deployments/RGExtranet.war/WEB-INF/lib/jacorb.jar does not point to a valid jar for a Class-Path reference.
16:31:01,824 WARN [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry activation.jar in /D:/wildfly-10.1.0.Final/standalone/deployments/RGExtranet.war/WEB-INF/lib/mail.jar does not point to a valid jar for a Class-Path reference.
16:31:02,310 ERROR [org.jboss.as.jsf] (MSC service thread 1-4) WFLYJSF0002: Could not load JSF managed bean class: com.revguru.crs.web.general.vo.AmenityContainer
16:31:02,785 INFO [org.jboss.weld.deployer] (MSC service thread 1-4) WFLYWELD0003: Processing weld deployment RGExtranet.war
16:31:02,967 WARN [org.jboss.modules] (MSC service thread 1-6) Failed to define class org.richfaces.renderkit.OrderingComponentRendererBase in Module "deployment.RGExtranet.war:main" from Service Module Loader: java.lang.VerifyError: Failed to link org/richfaces/renderkit/OrderingComponentRendererBase (Module "deployment.RGExtranet.war:main" from Service Module Loader): class org.richfaces.renderkit.OrderingComponentRendererBase overrides final method encodeBegin.(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:446)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:274)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:78)
at org.jboss.modules.Module.loadModuleClass(Module.java:606)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:358)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:437)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:274)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:78)
at org.jboss.modules.Module.loadModuleClass(Module.java:606)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
at org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.loadClassInfoSet(ServletContainerInitializerDeploymentProcessor.java:259)
at org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.deploy(ServletContainerInitializerDeploymentProcessor.java:169)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
16:31:02,967 WARN [org.jboss.modules] (MSC service thread 1-6) Failed to define class org.richfaces.renderkit.ListShuttleRendererBase in Module "deployment.RGExtranet.war:main" from Service Module Loader: java.lang.VerifyError: Failed to link org/richfaces/renderkit/ListShuttleRendererBase (Module "deployment.RGExtranet.war:main" from Service Module Loader): Failed to link org/richfaces/renderkit/OrderingComponentRendererBase (Module "deployment.RGExtranet.war:main" from Service Module Loader): class org.richfaces.renderkit.OrderingComponentRendererBase overrides final method encodeBegin.(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:446)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:274)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:78)
at org.jboss.modules.Module.loadModuleClass(Module.java:606)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
at org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.loadClassInfoSet(ServletContainerInitializerDeploymentProcessor.java:259)
at org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.deploy(ServletContainerInitializerDeploymentProcessor.java:169)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
16:31:02,968 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."RGExtranet.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."RGExtranet.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "RGExtranet.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.VerifyError: Failed to link org/richfaces/renderkit/ListShuttleRendererBase (Module "deployment.RGExtranet.war:main" from Service Module Loader): Failed to link org/richfaces/renderkit/OrderingComponentRendererBase (Module "deployment.RGExtranet.war:main" from Service Module Loader): class org.richfaces.renderkit.OrderingComponentRendererBase overrides final method encodeBegin.(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:446)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:274)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:78)
at org.jboss.modules.Module.loadModuleClass(Module.java:606)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
at org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.loadClassInfoSet(ServletContainerInitializerDeploymentProcessor.java:259)
at org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.deploy(ServletContainerInitializerDeploymentProcessor.java:169)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
... 5 more
16:31:02,977 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) WFLYCTL0013: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"RGExtranet.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"RGExtranet.war\".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment \"RGExtranet.war\"
Caused by: java.lang.VerifyError: Failed to link org/richfaces/renderkit/ListShuttleRendererBase (Module \"deployment.RGExtranet.war:main\" from Service Module Loader): Failed to link org/richfaces/renderkit/OrderingComponentRendererBase (Module \"deployment.RGExtranet.war:main\" from Service Module Loader): class org.richfaces.renderkit.OrderingComponentRendererBase overrides final method encodeBegin.(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V"},
"WFLYCTL0412: Required services that are not installed:" => [
"jboss.deployment.unit.\"RGExtranet.war\".beanmanager",
"jboss.deployment.unit.\"RGExtranet.war\".INSTALL"
],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.deployment.unit.\"RGExtranet.war\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"RGExtranet.war\".beanmanager]",
"jboss.deployment.unit.\"RGExtranet.war\".batch.environment is missing [jboss.deployment.unit.\"RGExtranet.war\".beanmanager]"
]
}
16:31:02,997 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0016: Replaced deployment "RGExtranet.war" with deployment "RGExtranet.war"
16:31:02,997 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."RGExtranet.war".INSTALL
service jboss.deployment.unit."RGExtranet.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."RGExtranet.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "RGExtranet.war"
service jboss.deployment.unit."RGWeb.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."RGWeb.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "RGWeb.war"
我正在使用的库列表:
antlr-2.7.7.jar
aopalliance.jar
artemis-commons-1.1.0.wildfly-011.jar
asm-3.3.1.jar"/>
asm-attrs.jar
avalon-framework-4.1.4.jar
axis-1.4.jar
batik-awt-util-1.6-1.jar
batik-ext-1.6-1.jar
batik-gui-util-1.6-1.jar
batik-util-1.6-1.jar
c3p0-0.9.5.2.jar
cdi-api-1.1.jar
cglib-2.2.jar
classmate-1.3.0.jar
commons-beanutils-1.7.0.jar
commons-cli-1.2.jar
commons-codec-1.3.jar
commons-collections-3.2.1.jar
commons-dbcp-1.2.2.jar
commons-digester-1.6.jar
commons-discovery-0.2.jar
commons-el-1.0.jar"
commons-email-1.0.jar
commons-fileupload-1.0.jar
commons-httpclient-3.1.jar
commons-io-1.3.2.jar
commons-lang-2.3.jar
commons-logging.jar
commons-net-2.0.jar
commons-pool-1.3.jar
commons-validator-1.3.1.jar
cssparser-0.9.18.jar
dom4j-1.6.1.jar
ehcache-2.10.3.jar
el-api-2.2.jar
geolatte-geom-1.0.6.jar
geronimo-jta_1.1_spec-1.1.1.jar
groovy-all-2.4.7.jar
guava-18.0.jar
hibernate-annotations.jar"
hibernate-c3p0-5.2.6.Final.jar
hibernate-commons-annotations-5.0.1.Final.jar
hibernate-core-5.2.6.Final.jar
hibernate-ehcache-5.2.6.Final.jar
hibernate-entitymanager-5.0.7.Final.jar
hibernate-infinispan-5.2.6.Final-tests.jar
hibernate-infinispan-5.2.6.Final.jar"/>
hibernate-jbosscache2.jar
hibernate-jmx-3.5.2-final.jar
hibernate-jpa-2.1-api-1.0.0.Final.jar
hibernate-osgi-5.2.6.Final.jar
hibernate-proxool-5.2.6.Final.jar
hibernate-spatial-5.2.6.Final.jar
hibernate-validator-5.2.3.Final.jar
hornetq-commons-2.4.7.Final.jar
infinispan-commons-8.1.0.Final.jar
infinispan-core-8.2.5.Final.jar
istack-commons-runtime-2.21.jar
istack-commons-tools-2.21.jar
iText-2.1.7.jar
iText-rtf-2.1.7.jar
jacorb.jar
jandex-2.0.3.Final.jar
jasperreports-3.6.0.jar
jasypt-1.5.jar
javassist-3.20.0-GA.jar
javax.faces-api-2.2.jar
javax.inject-1.jar
javax.persistence-2.1.0-rc1.jar
jaxrpc.jar
jboss-common-logging-log4j-2.0.4.GA.jar
jboss-faces.jar
jboss-interceptors-api_1.1
jboss-javaee.jar
jboss-jmx-4.3.0.GA_CP03.jar
jboss-logging-3.3.0.Final.jar
jboss-marshalling-osgi-1.4.10.Final.jar
jboss-transaction-api_1.1_spec-1.0.1.Final.jar"/>
jbosscache-core.jar
jbosscache-pojo.jar
jcip-annotations.jar
jfreechart-1.0.12.jar
jfreechart-1.0.12.jar
jgroups-3.6.7.Final.jar
jna-4.1.0.jar
jna-platform-4.1.0.jar
jsf-api-2.2.9.jar
jsf-facelets-1.1.15.B1.jar
jsf-impl-2.1.21.jar
jsr250-api-1.0.jar
jta.jar
jts-1.13.jar
jxl-2.6.jar
log4j1.2.17.jar
mail.jar
mchange-commons-java-0.2.11.jar
mysql-connector-java-5.1.10-bin.jar
org.osgi.compendium-4.3.1.jar
org.osgi.core-4.3.1.jar
oro-2.0.8.jar
persistence.jar
picketbox-commons-1.0.0.final.jar
poi-3.9.jar
poi-contrib-3.6.jar
poi-ooxml-3.9.ja
poi-ooxml-schemas-3.9.jar
poi-scratchpad-3.9.jar
postgresql-9.4-1200-jdbc41.jar
proxool-0.8.3.jar
quartz-2.2.1.jar
richfaces-a4j-4.5.17.Final.jar
richfaces-api-3.3.3.Final.jar
richfaces-core-4.5.17.Final.jar
richfaces-impl-3.3.4.Final.jar
richfaces-page-fragments-4.5.17.Final.jar
richfaces-rich-4.5.17.Final.jar
richfaces-ui-3.3.4.Final.jar
saaj.jar
sac-1.3.jar
servlet-api.jar
slf4j-api-1.7.7.jar
slf4j-simple-1.7.7.jar
spring-aop-4.3.5.RELEASE.jar
spring-aspects-4.3.5.RELEASE.jar
spring-beans-4.3.5.RELEASE.jar
spring-context-4.3.5.RELEASE.jar
spring-context-support-4.3.5.RELEASE.jar
spring-core-4.3.5.RELEASE.jar
spring-expression-4.3.5.RELEASE.jar
spring-instrument-4.3.5.RELEASE.jar
spring-instrument-tomcat-4.3.5.RELEASE.jar
spring-jdbc-4.3.5.RELEASE.jar
spring-jms-4.3.5.RELEASE.jar
spring-messaging-4.3.5.RELEASE.jar"
spring-orm-4.3.5.RELEASE.jar
spring-oxm-4.3.5.RELEASE.jar
spring-test-4.3.5.RELEASE.jar
spring-tx-4.3.5.RELEASE.jar
spring-web-4.3.5.RELEASE.jar
spring-webmvc-4.3.5.RELEASE.jar
spring-webmvc-portlet-4.3.5.RELEASE.jar
spring-websocket-4.3.5.RELEASE.jar
tomahawk-1.1.14-tlddoc.jar
tomahawk-1.1.14.jar
waffle-jna-1.7.jar
xml-apis-1.0.b2.jar
xmlParserAPIs-2.0.2.jar
javax.el-3.0.0.jar
javax.servlet-api-3.1.0..jar
最佳答案
在我的例子中,由于两个具有新旧版本的 jar 冲突而发生此错误
根据运行环境的jvm保存jar。
关于java - OrderingComponentRendererBase 重写 final方法encodeBegin。(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42039909/
关闭。这个问题需要更多 focused .它目前不接受答案。 想要改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 2 年前。 Improve this q
1.final final修饰类,说明这个类不能被继承,是以个顶级类。 final修饰变量,说明这个变量是常量。 final修饰方法,表示这个方法不能被重写,不过可以冲在final方法。 比如有个
我喜欢使用 -Wsuggest-final-types 编译我的代码和 -Wsuggest-final-methods以便在可能使用 final 关键字以允许编译器更积极地优化的机会时收到警告。 不过
我在 Java 8 中有一个异步操作,它返回一个 onError 回调或一个 onSuccess 回调。如果操作成功与否,我需要在我的方法内部返回。所以我返回一个 boolean 值来说明这个信息。我
我正在阅读一些内容,需要对最终类和方法进行一些说明。我的理解是,将一个类声明为 final 会阻止该类被扩展。因此,是否有必要将最终类中的方法声明为最终的?在我看来,如果类不能扩展,则没有必要将方法声
有什么区别 try { // action A } catch(Exception e) { // action B } finally { // action C }
这个程序是我类(class)的最终作业,我无法弄清楚为什么我收到错误“从内部类引用的局部变量必须是最终的或有效的最终”。该程序正在运行并发线程来对# 数组进行排序,然后找到该数组的高值和低值。当我在没
C++11 added final. 终于! 我了解 final 做了两件事: 使类不可继承。 使类中的(虚拟)函数不可覆盖(在派生类中)。 这两者似乎是相互独立的。但以以下为例: class Foo
我想使用具有多个提交按钮的react-final-form构建表单,其中每个提交按钮在表单中设置不同的值。本质上,我想创建一个在呈现的HTML中看起来像这样的表单: Are you over 1
我想知道什么时候应该对变量和(或)方法使用静态、最终、静态最终参数。据我了解: final:类似于c++中的const参数。它基本上意味着值(或在方法中 - 返回值)不会改变。 静态:这意味着值(或方
我正在做一个编程类(class)项目,用于 400 行矩阵本身的矩阵乘法。我让它以顺序模式工作,该项目的目标是编写并行实现。 我有以下代码,当然,当我尝试引用内部类中的计数器 j 时,我收到一个关于
也许这是简单的问题,但我找不到答案。 声明为final的经典变量是否包含与非final变量不同的内存段? 最佳答案 我想说,谈到局部变量,基于 this answer 是不行的。 : The trut
考虑以下代码: #include class B { virtual void f() { std::cout << "Base" << '\n'; } }; class D
这个问题已经有答案了: java: Is it possible to set a lambda expression for an array of Buttons is a for loop? I
考虑这个代码片段 public class ConstantFolding { static final int number1 = 5; static final int numbe
我确定在内部类中访问的变量应该声明为final 或有效final。但在下面的情况下我很困惑。不知道是不是我理解错了。 public class MyClass { private boolea
我必须将一个 java.sql.Connection 对象传递给一个匿名内部类,这意味着我必须对它进行 final 引用。但是,我担心任何资源泄漏。 public static String foo(
我收到 SonarQube 错误:“强烈建议在此方法实现结束时调用 super.finalize(),以防父实现也必须释放一些系统资源。” 但我发现 Object 类没有实现 finalize方法。
我一般认为资源清理是在 finally block 中完成的, 最近我在一个类中发现了这个特定的代码片段,它覆盖了 Object 类'finalize()方法。 protected void fina
让我们在父类中使用这个方法: public void calculateSum(int a, final int b) { } 子类有: public void calculateSum(int a,
我是一名优秀的程序员,十分优秀!