Was any bug ever filed for this? I looked in JBS and I couldn't find anything that resembled the issue here.

Roman, since you don't have an account on JBS (bugs.openjdk.java.net), I'd suggest you file a bug via bugs.java.com. Bugs filed there do eventually get into JBS. (I believe it's difficult for submitters to track how this happens, but it does work.)

But earlier, you had said,

java.bugs.com you mean? Not long ago I reported a similar issue about core
libs and they recommended me to write to list directly, so that's why I
wrote directly here this time.

Who said that? That's strange. The preferred route for people who don't have JBS to submit bugs against the JDK is indeed bugs.java.com. Please contact us if it happens again.

Of course if you have questions or relevant issues to discuss, you're always welcome to come here or to other OpenJDK mailing lists.

s'marks



On 1/31/20 10:05 AM, Roman Leventov wrote:
I cannot create an issue because I'm not an OpenJDK process member.

Yes, the test constructs an invalid ZoneRules, the point is to demonstrate
that this is possible and IAE is not thrown upon construction. I don't
think this is a good principle for immutable classes. Once they are
constructed, their state must be verified to be correct.

On Fri, 31 Jan 2020 at 20:17, <naoto.s...@oracle.com> wrote:

I meant the JDK Bug System:

https://bugs.openjdk.java.net/

All the issues in the JDK is tracked here.

As to the issues themselves, you would want to specify
Arrays.asList(trans) in place for the 4th argument on ZoneRules.of(), so
that the transition happens on the transition day?

For 2), good catch for the missing 'i', we need a JBS issue for that to
fix it.

Naoto

On 1/31/20 6:08 AM, Roman Leventov wrote:
java.bugs.com <http://java.bugs.com> you mean? Not long ago I reported
a
similar issue about core libs and they recommended me to write to list
directly, so that's why I wrote directly here this time.

On Fri, 31 Jan 2020 at 16:57, <naoto.s...@oracle.com
<mailto:naoto.s...@oracle.com>> wrote:

     Hi Roman,

     Please file a JBS issue for this.

     Naoto

     On 1/29/20 9:56 PM, Roman Leventov wrote:
      > 1) ZoneRules.of() implies that transitionList is a superset of
      > standardOffsetTransitionList but doesn't check that. Then it's
     possible to
      > construct ZoneRules instances that don't work correctly:
      >      @Test
      >      public void zoneRulesTest() {
      >          LocalDateTime transitionDay = LocalDateTime.of(2020, 1,
     1, 2, 0);
      >          ZoneOffsetTransition trans = ZoneOffsetTransition.of(
      >                  transitionDay,
      >                  ZoneOffset.ofHours(1),
      >                  ZoneOffset.ofHours(2)
      >          );
      >          ZoneRules rules = ZoneRules.of(ZoneOffset.ofHours(1),
      > ZoneOffset.ofHours(1),
      >                  Arrays.asList(trans),
      >                  Collections.emptyList(),
Collections.emptyList());
      >
      >          Assert.assertEquals(ZoneOffset.ofHours(2),
rules.getOffset(
      >
     transitionDay.plusDays(7).toInstant(ZoneOffset.UTC)));
      >      }
      >
      > 2) Unrelated issue in java-time code: in
     ZoneOffsetTransitionRule, there is
      > a typo, some variables are called "timeDefnition" (missed "i")
     and it leaks
      > to public Javadoc.
      >


Reply via email to