Questions tagged [java-16]

Use this tag for questions specific to Java 16, which is version 16 of the Java platform, released on March 16, 2021. In most cases you should also specify the java tag.

This release is the Reference Implementation of version 16 of the Java SE Platform, as specified by JSR 391 in the Java Community Process.

124 questions
4
votes
1 answer

Regex \p{Cs} not matching symbol in Java 16

Does anyone know why the regex \p{Cs} does not match the symbol in Java 16? It used to match it in Java 11. Java 11 jshell | Welcome to JShell -- Version 11.0.7 | For an introduction type: /help intro jshell> import java.util.regex.* jshell>…
4
votes
2 answers

Using PowerMock in JDK 16

Java reflection is becoming more and more restricted: Up to Java 8 all operations are allowed Starting from Java 9 to 15 you are still able to perform the operations, but you will receive a warning From Java 16 and onwards the operations are…
rigon
  • 1,310
  • 4
  • 15
  • 37
4
votes
1 answer

On Deploying Spring boot web app at tomcat 9, getting error "Could not retrieve system property 'spring.xml.ignore'"

The spring-boot application is working fine with the integrated server but when I try to deploy it on tomcat9 getting the below error in /catalina.out 22-Jun-2021 15:05:38.148 INFO [http-nio-8080-exec-6] org.apache.jasper.servlet.TldScanner.scanJars…
Hrishi
  • 446
  • 3
  • 10
4
votes
1 answer

Java record serialization and repeated calls to canonical constructor

In this post about serializable records it is stated that Deserialization creates a new record object by invoking a record class’s canonical constructor, passing values deserialized from the stream as arguments to the canonical constructor. This is…
jf_
  • 3,099
  • 2
  • 13
  • 31
4
votes
1 answer

Java 11 Curve25519 Implementation doesn't behave as Signal's libary

In Java 11 a curve25519 built-in implementation was introduced. As I had no idea of this, and only discovered it recently, I was using a library from Signal. This was my code before I switched to Java 11's implementation: private final Curve25519…
Auties01
  • 29
  • 1
  • 9
4
votes
2 answers

SimpleDateFormat - format - Month September - JDK16

I have just upgraded Java from JDK-15 to JDK-16 and I see a problem while converting Date using SimpleDateFormat. September month alone while formatted using yyyy-MMM-dd is giving 4 characters instead of 3. Eg: 2021-Sep-11 is being shown as…
Reema
  • 587
  • 3
  • 12
  • 37
4
votes
1 answer

What annotation targets are applicable to Java records?

I have an annotation used for methods or fields defined like this: @Retention(RetentionPolicy.RUNTIME) @Target(value = {ElementType.METHOD, ElementType.FIELD}) public @interface NotColumn { } I wanted to prevent users from using this on a record…
sproketboy
  • 8,967
  • 18
  • 65
  • 95
4
votes
2 answers

Gradle Ktlint plugin fails on Java 16

After upgrading to Java 16 I am not able to make ktlint gradle plugin to work. It's throwing Execution failed for task ':runKtlintCheckOverMainSourceSet'. A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction …
Lukas
  • 13,606
  • 9
  • 31
  • 40
4
votes
1 answer

Why is the variable arity record component not inferred with custom constructor?

Trying out some code with record and record components. I was making use of the variable rarity components and was struck with a compile-time error over a custom constructor. public record Break(R record, String... notifications)…
Naman
  • 27,789
  • 26
  • 218
  • 353
3
votes
2 answers

org.openqa.selenium.interactions.MoveTargetOutOfBoundsException: move target out of bounds using Selenium Chrome and java.version: '16.0.2'

I am trying to click a link that is on a dropdown menu. This dropdown menu appears when I hover over a button. Right now, my test crashes with a MoveTargetOutOfBoundsException, which happens when I try to hover the button. When I open the page in my…
3
votes
1 answer

java ModuleLayer : ModuleLayer.Controller add methods don't work

I am using Netbeans 12.5 and java 16 In an Java Modular Project I have 2 Modules Modular-Testing(/*The Project Name*/) | |----Consumer(/*Module Name*/) | | |--classes(/*Folder Name*/) | |--main(/*package name*/) | …
Sync it
  • 1,180
  • 2
  • 11
  • 29
3
votes
1 answer

Minor question about Segmented Code Cache (http://openjdk.java.net/jeps/197)

I see that this JEP (http://openjdk.java.net/jeps/197) introduced 3 types of code caches. The most obvious one to me is -XX:NonNMethodCodeHeapSize. This is the one that deals with JVM internal data. What I do not understand is what is the difference…
Eugene
  • 117,005
  • 15
  • 201
  • 306
3
votes
1 answer

MacOS BigSur auto-scales Java16/Swing app window for 5K Retina display

Our interactive math-ed app is designed using Swing JFrames, and was developed for 2560p (Mac) and 1920p (Win) displays, i.e., using native pixel-coordinates for graphics output and mouse-input-processing. iMac Retina 5K testing -- BIG SURPRISE! The…
pbierre
  • 276
  • 1
  • 8
3
votes
2 answers

How to pass --illegal-access JVM argument to spring boot maven plugin

I have an application that runs just fine when running this from the command prompt : java -jar --illegal-access=permit target/Something.jar However, configuring my spring boot maven plugin in my pom.xml as such gives me the same error as if I ran…
Martin
  • 1,977
  • 5
  • 30
  • 67
3
votes
1 answer

Java 16 Annotation ElementType.RECORD_COMPONENT cannot be reflected

Using JDK 16, I declared two annotations: @Target({ ElementType.RECORD_COMPONENT}) @Retention(RetentionPolicy.RUNTIME) public @interface A {} @Target({ ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface B {} And I declared…
Hash Jang
  • 599
  • 3
  • 11
1 2
3
8 9