简体   繁体   English

ThreeTen-Backport实现与JSR-310的反向移植?

[英]ThreeTen-Backport implementation vs. backport of JSR-310?

Note: this is not a duplicate of Comparing ThreeTen backport to JSR-310 . 注意:这不是将ThreeTen backport与JSR-310进行比较的副本 My question is more specific. 我的问题更具体。

In my company, I'm trying to get DevOps to OK the use of ThreeTen-Backport for refactoring legacy code (which because of deployment constraints with WebLogic 10.3.6.0 we can't upgrade from Java 6 and can't use any version of JodaTime beyond version 1.2.1). 在我的公司中,我试图让DevOps可以使用ThreeTen-Backport重构遗留代码(由于WebLogic 10.3.6.0的部署限制,我们不能从Java 6升级,也不能使用任何版本的Java JodaTime版本1.2.1之后)。

I can see DevOps having an issue with this statement on ThreeTen-Backport's Github page: 我可以在ThreeTen-Backport的Github页面上看到DevOps对此声明有疑问:

The backport is NOT an implementation of JSR-310, as that would require jumping through lots of unnecessary hoops. 反向端口不是 JSR-310 的实现 ,因为这将需要跳过很多不必要的箍。 Instead, this is a simple backport intended to allow users to quickly use the JSR-310 API on Java SE 6 and 7. 相反,这是一个简单的反向移植,旨在允许用户在Java SE 6和7上快速使用JSR-310 API。

When they ask me what "Not an implementation" means, I need to be able to explain it to them. 当他们问我“不是实现”是什么意思时,我需要能够向他们解释。 However, the word implementation can have a wide semantic range, and I'm not sure exactly what is meant by that myself. 然而,这个词的实现可以有多种语义范围,我不知道究竟是什么这意味着我自己。

So my question is, in contexts like this, what is meant by implementation vs. backport ? 所以我的问题是,在这种情况下, 实现反向移植是什么意思? Since JSR-310 is a backport and not an implementation, is there a counter example of something that I could use, that is an implementation of something else, in the same sense that ThreeTen-Backport is not an implementation of JSR-310? 由于JSR-310是一个补丁包,而不是执行,是没有办法,我可以使用,这别的东西的实现,在相同的意义上,ThreeTen -反向移植是不是 JSR-310的实现的一些反例? What would an actual implementation of JSR-310 for Java 6 look like if such a thing existed, and how would it be different from ThreeTen-Backport? 如果存在这样的事情,那么Java 6的JSR-310的实际实现将是什么样子,它与ThreeTen-Backport有何不同?

JSR 310: Date and Time API is a formal specification controlled by the Java Community Process (JCP) and with a whole heap of legalistic controls. JSR 310:日期和时间APIJava社区流程 (JCP)控制的正式规范,并带有大量法制控件。 An implementation of any JSR, including JSR-310, requires passing the testing kit and other hurdles. 任何JSR(包括JSR-310)的实现都需要通过测试套件和其他障碍。

In the case of JSR-310, the JSR is integrated into Java 8 itself , which means that it simply is not possible to implement the JSR independently. 对于JSR-310,JSR 集成在Java 8本身中 ,这意味着根本不可能独立实现JSR。 There is no testing kit for JSR-310 outside the JDK. JDK外部没有用于JSR-310的测试套件。 Thus no piece of code can implement JSR-310 outside the JDK itself. 因此,没有代码片段可以在JDK本身之外实现JSR-310。

Thus, ThreeTen-Backport is as close to an implementation of the JSR-310 specification without actually being an implementation, where "implementation" is with reference to the JSR-310 specification . 因此, ThreeTen-Backport与JSR-310规范的实现非常接近,而实际上不是实现,其中“实现”是指JSR-310规范

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM