Navigation Menu

Skip to content

Commit

Permalink
8277422: tools/jar/JarEntryTime.java fails with modified time mismatch
Browse files Browse the repository at this point in the history
Reviewed-by: joehw, msheppar, naoto
  • Loading branch information
Lance Andersen committed Dec 2, 2021
1 parent 7c4ef3a commit ad1ff27
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions test/jdk/tools/jar/JarEntryTime.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -23,14 +23,15 @@

/**
* @test
* @bug 4225317 6969651
* @bug 4225317 6969651 8277422
* @modules jdk.jartool
* @summary Check extracted files have date as per those in the .jar file
*/

import java.io.File;
import java.io.PrintWriter;
import java.nio.file.attribute.FileTime;
import java.time.ZoneId;
import java.util.Date;
import java.util.TimeZone;
import java.util.spi.ToolProvider;
Expand Down Expand Up @@ -93,6 +94,14 @@ public static void realMain(String[] args) throws Throwable {
jarFile.delete();
testFile.delete();

var date = new Date();
var defZone = ZoneId.systemDefault();
if (defZone.getRules().getTransition(
date.toInstant().atZone(defZone).toLocalDateTime()) != null) {
System.out.println("At the offset transition. JarEntryTime test skipped.");
return;
}

/* Create a directory structure
* outer/
* inner/
Expand Down

5 comments on commit ad1ff27

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on ad1ff27 Mar 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on ad1ff27 Mar 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin the backport was successfully created on the branch GoeLin-backport-ad1ff27b in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit ad1ff27b from the openjdk/jdk repository.

The commit being backported was authored by Lance Andersen on 2 Dec 2021 and was reviewed by Joe Wang, Mark Sheppard and Naoto Sato.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-ad1ff27b:GoeLin-backport-ad1ff27b
$ git checkout GoeLin-backport-ad1ff27b
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-ad1ff27b

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on ad1ff27 Mar 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk11u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on ad1ff27 Mar 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin the backport was successfully created on the branch GoeLin-backport-ad1ff27b in my personal fork of openjdk/jdk11u-dev. To create a pull request with this backport targeting openjdk/jdk11u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit ad1ff27b from the openjdk/jdk repository.

The commit being backported was authored by Lance Andersen on 2 Dec 2021 and was reviewed by Joe Wang, Mark Sheppard and Naoto Sato.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk11u-dev:

$ git fetch https://github.com/openjdk-bots/jdk11u-dev GoeLin-backport-ad1ff27b:GoeLin-backport-ad1ff27b
$ git checkout GoeLin-backport-ad1ff27b
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk11u-dev GoeLin-backport-ad1ff27b

Please sign in to comment.