java-13 Questions

5

Solved

I'm trying to initialize two variables with an enhanced switch statement: int num = //something boolean val1; String val2; val1, val2 = switch(num) { case 0 -> (true, "zero!"); case 1 ->...
Selfmortification asked 12/2, 2020 at 0:1

1

Solved

we are using Jess, which is a rules engine, written in Java. It has become pretty old and most of it is written using Java 1.5 and lower language features. Now, we are using this for many years and...
Panamerican asked 2/2, 2023 at 14:18

3

Solved

I'm starting a new Spring 5 project with Java 14. It compiled, but gave me a warning: OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely...
Agglomerate asked 14/4, 2020 at 15:42

2

Solved

Java 13 is coming, so I started studying its new features, one of which is text blocks. I wrote a simple program public final class Example { public static void main(String[] args) { final Stri...
Lesslie asked 9/9, 2019 at 11:35

1

Solved

Accidentally I have stumbled into a change in Java 15 that I was not aware of. Suppose I have a very simple question: what is the size of an array of 3 integers? For this, I use JOL. The code is fa...
Illnatured asked 13/7, 2020 at 15:29

2

Solved

I'm wanting to create a schedule that wraps around week by week. Because the schedule is the same from one week to the next, the only information I need to store is the day of the week, and the ti...
Condescend asked 26/4, 2020 at 12:13

1

Solved

This question is strongly related to Change private static final field using Java reflection. There, it was asked, how to change a private static final variable. However, the answers on that que...
Pianoforte asked 10/4, 2020 at 13:58

1

Solved

UPDATE Throughout comments it turned out that the approach for benchmark I taken was incorrect, therefore results were misleading. After correcting my approach (as in accepted answer) results are ...
Bisulfate asked 10/2, 2020 at 16:37

2

Solved

Reading the JAVA 13 SE specification, I found in chapter 5, section 5.1.7. Boxing Conversion the following guarantee: If the value p being boxed is the result of evaluating a constant expressio...
Candace asked 1/1, 2020 at 19:11

2

Solved

I'm using Java 13 (13.0.1.hs-adpt) and I enabled the preview language features (mainly because of text blocks). My code is properly annotated with @SuppressWarnings("preview") wherever relevant, b...
Aubervilliers asked 24/11, 2019 at 16:42

1

I am currently using SonarQube Community Edition version 7.7 on Java 8 JDK using Maven, Iwant to start evaluating OpenJDK 13 . Sonarqube doesn't support OpenJDK 13
Balanchine asked 9/10, 2019 at 19:42

4

Solved

Java 13 introduced the yield keyword for the switch expressions. How can I use it and what's the difference between a default return or break value?
Bostick asked 22/9, 2019 at 12:17

2

Solved

I'm trying to create Java module project with Java-13 and Maven. My pom.xml is: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http:...
Bermudez asked 5/11, 2019 at 11:48

1

Solved

Since Java 11, a PREVIEW-MODE on the Java Compiler and Runtime can be enabled. It allows to preview new features. (JEP 12) java --enable-preview How can I detect from within Java whether the JVM...
Aerology asked 10/10, 2019 at 16:3

2

Solved

I am creating a spring-boot application, which is running and performing well with openJdk12. The application: https://github.com/jactor-rises/jactor-persistence I am looking for how to set it up ...
Soprano asked 12/10, 2019 at 17:37

1

Solved

All the documentation I've been able to find mentions the 'jre/lib/ext' folder but such does not exist on my JRE 13 installation. I guess somewhere between Java 8 (where I can see the jars in jre...

2

Files.isHidden(Path.of("c:\\")) returns true on Windows 10, JDK 13 but returns false on JDK 12 same machine. Anyone know why this is?
Anemochore asked 30/9, 2019 at 13:32

1

Solved

I'm using a switch expression¹ in Java 12 to convert a string to a HTTP method: static Optional<RequestMethod> parseRequestMethod(String methodStr) { return Optional.ofNullable( switch (me...
Skillful asked 28/6, 2019 at 12:24
1

© 2022 - 2024 — McMap. All rights reserved.