为什么getNested()是更好的方法?

时间:2020-06-11 08:43:40

标签: javascript

有两种方法可以达到相同的结果:

  • 10:41:42,972 INFO [org.jboss.as] (MSC service thread 1-7) JBAS015899: JBoss EAP 6.4.15.GA (AS 7.5.15.Final-redhat-3) starting 10:41:43,048 INFO [org.xnio] (MSC service thread 1-5) XNIO Version 3.0.16.GA-redhat-1 10:41:43,054 INFO [org.xnio.nio] (MSC service thread 1-5) XNIO NIO Implementation Version 3.0.16.GA-redhat-1 10:41:43,071 INFO [org.jboss.remoting] (MSC service thread 1-5) JBoss Remoting version 3.3.9.Final-redhat-1 10:42:00,484 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 36) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique. 10:42:00,501 INFO [org.jboss.as.security] (ServerService Thread Pool -- 38) JBAS013371: Activating Security Subsystem 10:42:00,506 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 43) JBAS011800: Activating Naming Subsystem 10:42:00,536 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 55) JBAS010280: Activating Infinispan subsystem. 10:42:00,521 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 58) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3) 10:42:00,548 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 34) JBAS015537: Activating WebServices Extension 10:42:00,573 INFO [org.jboss.as.jacorb] (ServerService Thread Pool -- 54) JBAS016300: Activating JacORB Subsystem 10:42:00,583 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 59) JBAS016200: Activating ConfigAdmin Subsystem 10:42:00,570 INFO [org.jboss.as.security] (MSC service thread 1-4) JBAS013370: Current PicketBox version=4.1.5.Final-redhat-1 10:42:00,594 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 47) JBAS012615: Activated the following JSF Implementations: [main, 1.2] 10:42:00,742 INFO [org.jboss.as.connector.logging] (MSC service thread 1-4) JBAS010408: Starting JCA Subsystem (IronJacamar 1.0.38.Final-redhat-3) 10:42:00,742 INFO [org.jboss.as.naming] (MSC service thread 1-3) JBAS011802: Starting Naming Service 10:42:00,744 INFO [org.jboss.as.mail.extension] (MSC service thread 1-6) JBAS015400: Bound mail session [java:jboss/mail/Default] 10:42:00,764 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 58) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.2) 10:42:00,869 INFO [org.jboss.jaxr] (MSC service thread 1-6) JBAS014000: Started JAXR subsystem, binding JAXR connection factory into JNDI as: java:jboss/jaxr/ConnectionFactory 10:42:01,181 INFO [org.apache.catalina.core] (MSC service thread 1-8) JBWEB001065: The native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 10:42:01,308 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-3) JBWEB003001: Coyote HTTP/1.1 initializing on : http-10.40.32.154:8080 10:42:01,344 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-3) JBWEB003000: Coyote HTTP/1.1 starting on: http-10.40.32.154:8080 10:42:01,378 INFO [org.jboss.ws.common.management] (MSC service thread 1-1) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.3.6.Final-redhat-1 10:42:01,367 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221000: live server is starting with configuration HornetQ Configuration (clustered=false,backup=false,sharedStore=true,journalDirectory=/app/jboss-eap-6.4/domain/servers/Server_1/data/messagingjournal,bindingsDirectory=/app/jboss-eap-6.4/domain/servers/Server_1/data/messagingbindings,largeMessagesDirectory=/app/jboss-eap-6.4/domain/servers/Server_1/data/messaginglargemessages,pagingDirectory=/app/jboss-eap-6.4/domain/servers/Server_1/data/messagingpaging) 10:42:01,381 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221006: Waiting to obtain live lock 10:42:01,410 INFO [org.jboss.as.jacorb] (MSC service thread 1-7) JBAS016330: CORBA ORB Service started 10:42:01,423 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221013: Using NIO Journal 10:42:01,479 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221034: Waiting to obtain live lock 10:42:01,479 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221035: Live Server Obtained live lock 10:42:01,759 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221020: Started Netty Acceptor version 3.6.10.Final-266dbdf 10.40.32.154:5445 for CORE protocol 10:42:01,765 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221020: Started Netty Acceptor version 3.6.10.Final-266dbdf 10.40.32.154:5455 for CORE protocol 10:42:01,768 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221007: Server is now live 10:42:01,768 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221001: HornetQ Server version 2.3.25.SP18 (2.3.25.SP18, 123) [a90888a3-643e-11ea-a637-39e0628d872d] 10:42:01,793 INFO [org.jboss.as.messaging] (ServerService Thread Pool -- 63) JBAS011601: Bound messaging object to jndi name java:/ConnectionFactory 10:42:01,802 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 64) HQ221003: trying to deploy queue jms.queue.DLQ 10:42:01,813 INFO [org.jboss.as.messaging] (ServerService Thread Pool -- 64) JBAS011601: Bound messaging object to jndi name java:/jms/queue/DLQ 10:42:01,814 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 62) HQ221003: trying to deploy queue jms.queue.ExpiryQueue 10:42:01,815 INFO [org.jboss.as.messaging] (ServerService Thread Pool -- 62) JBAS011601: Bound messaging object to jndi name java:/jms/queue/ExpiryQueue 10:42:01,816 INFO [org.jboss.as.messaging] (ServerService Thread Pool -- 61) JBAS011601: Bound messaging object to jndi name java:jboss/exported/jms/RemoteConnectionFactory 10:42:18,219 INFO [org.jboss.as.connector.deployment] (MSC service thread 1-1) JBAS010406: Registered connection factory java:/JmsXA 10:42:18,258 INFO [org.hornetq.ra] (MSC service thread 1-1) HornetQ resource adaptor started 10:42:18,259 INFO [org.jboss.as.connector.services.resourceadapters.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-1) IJ020002: Deployed: file://RaActivatorhornetq-ra 10:42:18,261 INFO [org.jboss.as.connector.deployment] (MSC service thread 1-1) JBAS010401: Bound JCA ConnectionFactory [java:/JmsXA] 10:42:35,425 INFO [org.jboss.as.jacorb] (MSC service thread 1-7) JBAS016328: CORBA Naming Service started 10:43:08,463 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 58) JBAS010403: Deploying JDBC-compliant driver class com.sap.db.jdbc.Driver (version 1.0) 10:43:08,469 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 58) JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 42.0) 10:43:08,473 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 58) JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 42.0) 10:43:08,477 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 58) JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 42.1) 10:43:08,480 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 58) JBAS010404: Deploying non-JDBC-compliant driver class com.edb.Driver (version 9.2) 10:43:08,526 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) JBAS010400: Bound data source [java:/JDBCDataSource1] 10:43:08,528 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010400: Bound data source [java:/JDBCDataSource2] 10:43:08,527 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on 10.40.32.154:4447 10:43:08,530 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "EAR.ear" (runtime-name: "EAR.ear") 10:43:09,129 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015973: Starting subdeployment (runtime-name: "War1.war") 10:43:09,130 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015973: Starting subdeployment (runtime-name: "War2.war") 10:43:09,425 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015852: Could not index class javax/mail/internet/MimeUtility$1NullInputStream.class at /content/EAR.ear/War1.war/WEB-INF/lib/webserviceclient-10.3.4.jar: java.io.EOFException at java.io.DataInputStream.readFully(DataInputStream.java:197) [rt.jar:1.8.0_242] at java.io.DataInputStream.readFully(DataInputStream.java:169) [rt.jar:1.8.0_242] at org.jboss.jandex.Indexer.verifyMagic(Indexer.java:441) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1] at org.jboss.jandex.Indexer.index(Indexer.java:697) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1] at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:100) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3] at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3] at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:177) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2064) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1987) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_242] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_242] at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_242] 10:43:09,437 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015852: Could not index class weblogic/utils/classloaders/ClasspathClassFinder$ZipFileWrapper.class at /content/EAR.ear/War1.war/WEB-INF/lib/webserviceclient-10.3.4.jar: java.io.EOFException at java.io.DataInputStream.readFully(DataInputStream.java:197) [rt.jar:1.8.0_242] at java.io.DataInputStream.readFully(DataInputStream.java:169) [rt.jar:1.8.0_242] at org.jboss.jandex.Indexer.verifyMagic(Indexer.java:441) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1] at org.jboss.jandex.Indexer.index(Indexer.java:697) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1] at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:100) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3] at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3] at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:177) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2064) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1987) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_242] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_242] at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_242] 10:43:09,456 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015852: Could not index class javax/mail/internet/MimeUtility$1NullInputStream.class at /content/EAR.ear/War2.war/WEB-INF/lib/webserviceclient-10.3.4.jar: java.io.EOFException at java.io.DataInputStream.readFully(DataInputStream.java:197) [rt.jar:1.8.0_242] at java.io.DataInputStream.readFully(DataInputStream.java:169) [rt.jar:1.8.0_242] at org.jboss.jandex.Indexer.verifyMagic(Indexer.java:441) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1] at org.jboss.jandex.Indexer.index(Indexer.java:697) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1] at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:100) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3] at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3] at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:177) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2064) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1987) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_242] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_242] at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_242] 10:43:09,465 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015852: Could not index class weblogic/utils/classloaders/ClasspathClassFinder$ZipFileWrapper.class at /content/EAR.ear/War2.war/WEB-INF/lib/webserviceclient-10.3.4.jar: java.io.EOFException at java.io.DataInputStream.readFully(DataInputStream.java:197) [rt.jar:1.8.0_242] at java.io.DataInputStream.readFully(DataInputStream.java:169) [rt.jar:1.8.0_242] at org.jboss.jandex.Indexer.verifyMagic(Indexer.java:441) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1] at org.jboss.jandex.Indexer.index(Indexer.java:697) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1] at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:100) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3] at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3] at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:177) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2064) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1987) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_242] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_242] at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_242] 10:43:10,977 INFO [org.jboss.web] (ServerService Thread Pool -- 71) JBAS018210: Register web context: /context1 10:43:10,977 INFO [org.jboss.web] (ServerService Thread Pool -- 72) JBAS018210: Register web context: /context2 10:43:11,001 INFO [org.apache.catalina.core] (ServerService Thread Pool -- 72) JBWEB001093: The listener com.sun.faces.config.ConfigureListener is already configured for this context, the duplicate definition has been ignored 10:43:11,005 INFO [org.apache.catalina.core] (ServerService Thread Pool -- 71) JBWEB001093: The listener com.sun.faces.config.ConfigureListener is already configured for this context, the duplicate definition has been ignored 10:43:28,235 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 72) **Initializing Mojarra 2.1.28.SP11** for context '/context1' 10:43:28,241 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 71) **Initializing Mojarra 2.1.28.SP11** for context '/context2' 10:43:28,759 INFO [org.hibernate.validator.internal.util.Version] (ServerService Thread Pool -- 71) HV000001: Hibernate Validator 4.3.3.Final-redhat-1 10:43:29,360 INFO [org.primefaces.webapp.PostConstructApplicationEventListener] (ServerService Thread Pool -- 71) **Running on PrimeFaces 4.0** 10:43:29,360 INFO [org.primefaces.webapp.PostConstructApplicationEventListener] (ServerService Thread Pool -- 72) Running on PrimeFaces 4.0 10:44:04,563 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015859: Deployed "EAR.ear" (runtime-name : "EAR.ear") 10:44:04,584 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.4.15.GA (AS 7.5.15.Final-redhat-3) started in 142266ms - Started 508 of 545
  • this.question.validation.scoring_type !== 'exactMatch'

_.getNested(this.get('question'), 'validation.scoring_type') !== 'exactMatch'的定义是:

getNested

涉及getNested的第二种方法更具防御性,任何人都可以对此进行详细说明吗?

0 个答案:

没有答案
相关问题