Skip to content

Commit

Permalink
Fix test to pass with Java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
slachiewicz committed Jan 21, 2024
1 parent ca75834 commit 9fa5aa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/java/org/codehaus/mojo/build/TestCreateMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ public void testMessageFormat()
mojo.execute();

String rev = mojo.getRevision();

// https://bugs.openjdk.org/browse/JDK-8284840 from Java 20 date format changed
assertTrue( "Revision '" + rev + "' has wrong format.",
rev.matches( "^At (\\d{1,2}:?){3} (AM|PM) on \\w{3} \\d{1,2}, \\d{4}, there was a disturbance in the Force on planet 7." ) );
rev.matches( "^At (\\d{1,2}:?){3}([  \\u202F])(AM|PM) on \\w{3} \\d{1,2}, \\d{4}, there was a disturbance in the Force on planet 7." ) );

}
finally
Expand Down

0 comments on commit 9fa5aa2

Please sign in to comment.