On Thu, 12 Jan 2023 21:47:28 GMT, Maurizio Cimadamore
wrote:
> Ok - I thought false negative was the thing to absolutely avoid - and that
> was the no. 1 concern.
You're right. I think at the time I reasoned that it would be unusual enough
for the type of an expression to start as an
On Thu, 12 Jan 2023 19:12:27 GMT, Archie L. Cobbs wrote:
>> Uhm. Turns out I probably did not understand the filter correctly, and now
>> I'm more dubious about what it actually does. Say you have this hierarchy:
>>
>>
>> interface A { }
>> class B {
>> B() {
>> A a = (A)this;
> This PR adds a new lint warning category `this-escape`.
>
> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to
> allow the JDK to continue to compile with `-Xlint:all`.
>
> A 'this' escape warning is generated for a constructor `A()` in a class `A`
> when the
This PR implements _JEP 413: Code Snippets in Java API Documentation_ for
[java.text.ChoiceFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/ChoiceFormat.html).
Code examples using ... blocks are replaced with the @ snippet
syntax where applicable.
-
On Thu, 12 Jan 2023 22:21:39 GMT, Justin Lu wrote:
>> This PR implements JEP 413: Code Snippets in Java API Documentation for
>> _[java.util.TimeZone](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/TimeZone.html)_.
>>
>> Code examples using ... blocks are replaced
On Thu, 12 Jan 2023 20:57:49 GMT, Jesper Wilhelmsson
wrote:
> Forwardport JDK 20 -> JDK 21
This pull request has now been integrated.
Changeset: 98870472
Author:Jesper Wilhelmsson
URL:
https://git.openjdk.org/jdk/commit/98870472282a76be14acb2dfba483c97359dabba
Stats: 12 lines
> This PR implements JEP 413: Code Snippets in Java API Documentation for
> _[java.util.TimeZone](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/TimeZone.html)_.
>
> Code examples using ... blocks are replaced with the @ snippet
> syntax where applicable.
Justin Lu
On Thu, 12 Jan 2023 21:30:00 GMT, Justin Lu wrote:
>> This PR implements JEP 413: Code Snippets in Java API Documentation for
>> _[java.util.TimeZone](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/TimeZone.html)_.
>>
>> Code examples using ... blocks are replaced
On Thu, 12 Jan 2023 21:28:12 GMT, Archie L. Cobbs wrote:
>> My point is about who puts ThisRef in the set to begin with. It seems to me
>> that ThisRef is put there at the start of a method analysis. After which,
>> there's several code points where we say "if there's a direct ThisRef in the
On Thu, 12 Jan 2023 19:01:10 GMT, Maurizio Cimadamore
wrote:
>> The code you quoted has nothing specifically to do with method invocations.
>> This code is simply handing the evaluation of the expressions `this` and
>> `super`. For example, `this` could just be a parameter we're passing to
On Thu, 12 Jan 2023 21:08:12 GMT, Naoto Sato wrote:
>> Justin Lu has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Move link to separate lines
>
> src/java.base/share/classes/java/util/TimeZone.java line 313:
>
>> 311: * This method
> This PR implements JEP 413: Code Snippets in Java API Documentation for
> _[java.util.TimeZone](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/TimeZone.html)_.
>
> Code examples using ... blocks are replaced with the @ snippet
> syntax where applicable.
Justin Lu
On Wed, 11 Jan 2023 17:12:39 GMT, Justin Lu wrote:
> In [JDK-4368016](https://bugs.openjdk.org/browse/JDK-4368016)
> **TimeZone.setDefaultZone()** was updated so that
>
> _TimeZone.java [will] not cause an NPE. If getSystemTimeZoneID()
> can't determine the time zone from java.home and
On Wed, 11 Jan 2023 23:41:46 GMT, Justin Lu wrote:
> This PR implements JEP 413: Code Snippets in Java API Documentation for
> _[java.util.TimeZone](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/TimeZone.html)_.
>
> Code examples using ... blocks are replaced with
On Thu, 12 Jan 2023 19:24:50 GMT, Archie L. Cobbs wrote:
>> This patch passes all tests:
>>
>>
>> diff --git
>> a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java
>>
>> b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java
>> index
On Thu, 12 Jan 2023 18:48:25 GMT, Maurizio Cimadamore
wrote:
>>> I guess what I'm thinking about:
>>
>> No leak is possible in that example.
>> * `new Foo()` creates an instance of `Foo` (not a subclass of `Foo`)
>> therefore `m()` is not overridden
>> * Any subclass of `Foo` that may exist
Forwardport JDK 20 -> JDK 21
-
Commit messages:
- Merge remote-tracking branch 'jdk20/master' into Merge_jdk20
- 8299918: Update Xcode11.3.1-MacOSX10.15 devkit at Oracle
- 8299034: Runtime::exec clarification of inherited environment
- 8299439:
On Wed, 11 Jan 2023 17:12:39 GMT, Justin Lu wrote:
> In [JDK-4368016](https://bugs.openjdk.org/browse/JDK-4368016)
> **TimeZone.setDefaultZone()** was updated so that
>
> _TimeZone.java [will] not cause an NPE. If getSystemTimeZoneID()
> can't determine the time zone from java.home and
On Thu, 12 Jan 2023 18:40:38 GMT, Maurizio Cimadamore
wrote:
>> This patch:
>>
>>
>> diff --git a/make/test/BuildMicrobenchmark.gmk
>> b/make/test/BuildMicrobenchmark.gmk
>> index 1c89328a388..7c3f0293edc 100644
>> --- a/make/test/BuildMicrobenchmark.gmk
>> +++
On Wed, 11 Jan 2023 17:12:39 GMT, Justin Lu wrote:
> In [JDK-4368016](https://bugs.openjdk.org/browse/JDK-4368016)
> **TimeZone.setDefaultZone()** was updated so that
>
> _TimeZone.java [will] not cause an NPE. If getSystemTimeZoneID()
> can't determine the time zone from java.home and
On Wed, 11 Jan 2023 10:47:03 GMT, Raffaello Giulietti
wrote:
> This change transforms a O(n^2) path to O(n) when prepending zero padding to
> decimal outputs, where n is the length of the padding.
This pull request has now been integrated.
Changeset: 33412c10
Author:Raffaello Giulietti
On Wed, 11 Jan 2023 17:34:13 GMT, Naoto Sato wrote:
>> In [JDK-4368016](https://bugs.openjdk.org/browse/JDK-4368016)
>> **TimeZone.setDefaultZone()** was updated so that
>>
>> _TimeZone.java [will] not cause an NPE. If getSystemTimeZoneID()
>> can't determine the time zone from java.home and
On Wed, 11 Jan 2023 17:12:39 GMT, Justin Lu wrote:
> In [JDK-4368016](https://bugs.openjdk.org/browse/JDK-4368016)
> **TimeZone.setDefaultZone()** was updated so that
>
> _TimeZone.java [will] not cause an NPE. If getSystemTimeZoneID()
> can't determine the time zone from java.home and
In [JDK-4368016](https://bugs.openjdk.org/browse/JDK-4368016)
**TimeZone.setDefaultZone()** was updated so that
_TimeZone.java [will] not cause an NPE. If getSystemTimeZoneID()
can't determine the time zone from java.home and user.region properties,
it returns GMT._
This change updates the
This PR implements JEP 413: Code Snippets in Java API Documentation for
_[java.util.TimeZone](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/TimeZone.html)_.
Code examples using ... blocks are replaced with the @ snippet
syntax where applicable.
-
Commit
On Thu, 12 Jan 2023 17:40:36 GMT, Maurizio Cimadamore
wrote:
> But the filtering will end up dropping the expression Ref on the floor,
> right? (because B and A are unrelated).
Ah, I see what you mean.
Here's a more complete example:
public class CastLeak {
public CastLeak() {
On Thu, 12 Jan 2023 15:31:03 GMT, Raffaello Giulietti
wrote:
>> This change transforms a O(n^2) path to O(n) when prepending zero padding to
>> decimal outputs, where n is the length of the padding.
>
> Raffaello Giulietti has updated the pull request incrementally with one
> additional
>
> ZipFile.isSignatureRelated currently returns true for paths such as the
> following:
>
>
> META-INF/libraries/org.bouncycastle:bcprov-jdk15on:jar-1.70/META-INF/BC2048KE.DSA
>
I found a couple more call sites of SignatureFileVerifier.isBlockOrSF which
incorrectly treat [SF,DSA,RSA,EC] files as
On Thu, 12 Jan 2023 17:33:48 GMT, Archie L. Cobbs wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java
>> line 875:
>>
>>> 873: // Reference to this?
>>> 874: if (tree.name == names._this || tree.name == names._super) {
>>> 875:
On Thu, 12 Jan 2023 17:29:22 GMT, Maurizio Cimadamore
wrote:
>> I put it there because of switch expressions and `yeild`... ?
>
> Well, yield can... yield a value - `case` doesn't. So I'm confused. Also
> because the variable is called `referenceExpressionNode` and `CASE` is not an
>
> This task is created to update the manual test groups.
Bill Huang has updated the pull request incrementally with one additional
commit since the last revision:
Removed performance tests from the jdk_core_manual group as they have been
covered in the client-atr test groups
-
On Thu, 12 Jan 2023 18:37:06 GMT, Archie L. Cobbs wrote:
>> I guess what I'm thinking about:
>>
>> class Foo {
>> private Foo() {
>> m(this);
>> }
>>
>> public void m() { ... } // overridable
>>
>> static Foo makeFoo() { return new Foo(); }
>> }
>
>> I guess
On Thu, 12 Jan 2023 18:18:38 GMT, Maurizio Cimadamore
wrote:
>> I can't seem to be able to run tests - I get failures in the build:
>>
>>
>> * For target support_test_micro_tools-classes__the.BUILD_INDIFY_batch:
>
> This patch:
>
>
> diff --git a/make/test/BuildMicrobenchmark.gmk
>
On Thu, 12 Jan 2023 16:40:33 GMT, Maurizio Cimadamore
wrote:
> I guess what I'm thinking about:
No leak is possible in that example.
* `new Foo()` creates an instance of `Foo` (not a subclass of `Foo`) therefore
`m()` is not overridden
* Any subclass of `Foo` that may exist in the outside
On Thu, 12 Jan 2023 18:11:01 GMT, Maurizio Cimadamore
wrote:
>> Same comment as previous: I don't quite know what I'm doing and I'm loathe
>> to break what is already working. Do you have a suggested patch?
>
> I can't seem to be able to run tests - I get failures in the build:
>
>
> * For
On Thu, 12 Jan 2023 12:28:12 GMT, Maurizio Cimadamore
wrote:
> This might also be related with the fact that we deal with return values in
> different ways than with e.g. values returned from a nested scope (where we
> just pop, and then copy all pending expression to the outer depth).
Yes,
On Thu, 12 Jan 2023 17:48:37 GMT, Archie L. Cobbs wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java
>> line 909:
>>
>>> 907:
>>> 908: // Check for implicit outer 'this' reference
>>> 909: if
On Thu, 12 Jan 2023 17:39:05 GMT, Vicente Romero wrote:
>> Archie L. Cobbs has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - Use the more appropriate Type comparison method Types.isSameType().
>> - Add some more comments to clarify how
On Thu, 12 Jan 2023 12:26:27 GMT, Maurizio Cimadamore
wrote:
> Do we really need a set for this?
There are surely other ways to model things. But I got myself really confused
trying to build more complicated models.
What I ended up with is this simple model that works:
* There is a set of
On Thu, 12 Jan 2023 12:17:32 GMT, Maurizio Cimadamore
wrote:
> There is a concept of push/popScope and then there's a separate concept of
> call stack (which is just a list of diagnostic position up to the point). I
> wonder if this could be better modeled by using a single class e.g.
>
On Thu, 12 Jan 2023 12:15:17 GMT, Maurizio Cimadamore
wrote:
>> Archie L. Cobbs has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - Use the more appropriate Type comparison method Types.isSameType().
>> - Add some more comments to
On Thu, 12 Jan 2023 11:09:35 GMT, Maurizio Cimadamore
wrote:
>> Archie L. Cobbs has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - Use the more appropriate Type comparison method Types.isSameType().
>> - Add some more comments to
On Thu, 12 Jan 2023 17:13:55 GMT, Archie L. Cobbs wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java
>> line 411:
>>
>>> 409: final boolean referenceExpressionNode;
>>> 410: switch (tree.getTag()) {
>>> 411: case CASE:
>>
>>
On Wed, 11 Jan 2023 03:30:03 GMT, Archie L. Cobbs wrote:
>> This PR adds a new lint warning category `this-escape`.
>>
>> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to
>> allow the JDK to continue to compile with `-Xlint:all`.
>>
>> A 'this' escape warning is
Fixing a regression caused by the fix to
[JDK-8298971](https://bugs.openjdk.org/browse/JDK-8298971). The previous fix
lacked the native part change on Windows.
-
Commit messages:
- 8300010: UnsatisfiedLinkError on calling System.console().readPassword() on
Windows
Changes:
On Thu, 12 Jan 2023 10:56:53 GMT, Maurizio Cimadamore
wrote:
>> Archie L. Cobbs has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - Use the more appropriate Type comparison method Types.isSameType().
>> - Add some more comments to
On Thu, 12 Jan 2023 10:48:49 GMT, Maurizio Cimadamore
wrote:
>> Archie L. Cobbs has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - Use the more appropriate Type comparison method Types.isSameType().
>> - Add some more comments to
On Thu, 12 Jan 2023 16:20:12 GMT, Archie L. Cobbs wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java
>> line 218:
>>
>>> 216: new TreeScanner() {
>>> 217:
>>> 218: private Lint lint = ThisEscapeAnalyzer.this.lint;
>>
>> On a first
On Thu, 12 Jan 2023 10:32:19 GMT, Maurizio Cimadamore
wrote:
> If we have a class with a private constructor and public static factory
> invoking said constructor, and the constructor makes this escape, isn't that
> an issue we should detect?
A static factory method will not create a
On Thu, 12 Jan 2023 10:25:27 GMT, Maurizio Cimadamore
wrote:
>> Archie L. Cobbs has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - Use the more appropriate Type comparison method Types.isSameType().
>> - Add some more comments to
On Thu, 12 Jan 2023 15:31:03 GMT, Raffaello Giulietti
wrote:
>> This change transforms a O(n^2) path to O(n) when prepending zero padding to
>> decimal outputs, where n is the length of the padding.
>
> Raffaello Giulietti has updated the pull request incrementally with one
> additional
On Thu, 12 Jan 2023 10:18:27 GMT, Maurizio Cimadamore
wrote:
>> Archie L. Cobbs has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - Use the more appropriate Type comparison method Types.isSameType().
>> - Add some more comments to
On Fri, 9 Dec 2022 06:53:31 GMT, Justin King wrote:
> Allow building OpenJDK with UBSan. Currently the build fails when optimizing
> the image due to lots of undefined behavior (it invokes the built JVM).
> Follow up PRs will either replace the undefined behavior with well defined
> behavior
On Wed, 11 Jan 2023 19:34:39 GMT, Raffaello Giulietti
wrote:
>> This change transforms a O(n^2) path to O(n) when prepending zero padding to
>> decimal outputs, where n is the length of the padding.
>
> Raffaello Giulietti has updated the pull request incrementally with one
> additional
> This change transforms a O(n^2) path to O(n) when prepending zero padding to
> decimal outputs, where n is the length of the padding.
Raffaello Giulietti has updated the pull request incrementally with one
additional commit since the last revision:
8299677: Formatter.format might take a
On Thu, 12 Jan 2023 15:10:19 GMT, Maurizio Cimadamore
wrote:
> Interesting example - I thought you might have been referring to a case where
> the class being analyzed was itself an exception.
Yes - although that example doesn't compile (oops!). Just replace `catch
(RuntimeException e)` with
On Thu, 12 Jan 2023 13:01:44 GMT, Maurizio Cimadamore
wrote:
>> Archie L. Cobbs has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - Use the more appropriate Type comparison method Types.isSameType().
>> - Add some more comments to
On Thu, 12 Jan 2023 14:59:12 GMT, Archie L. Cobbs wrote:
>>> * On the Java stack
>>> (a) The current 'this' instance
>>> (b) A method parameter
>>> (c) A local variable
>>> (d) A temporary value that is part of the current expression being
>>> evaluated
>>> (e) The return value from a
On Thu, 12 Jan 2023 09:57:00 GMT, Maurizio Cimadamore
wrote:
> I'm not sure what you mean by (1f). You mean this can be embedded in an
> exception being thrown? Is that different from (2)?
Yes, this would be a different case from any other that you'd have to handle in
the code if you wanted
On Wed, 11 Jan 2023 18:31:06 GMT, Roger Riggs wrote:
> The current description of Runtime.exec, ProcessBuilder.start, and
> ProcessBuilder.startPipeline identifies a minimum set of system dependent
> environment variables needed to launch a process and allows additional system
> dependent
On Wed, 11 Jan 2023 15:13:14 GMT, Claes Redestad wrote:
> This removes `MethodHandleNatives.getMembers`, which has fallen into disuse.
This pull request has now been integrated.
Changeset: 48c8fb39
Author:Claes Redestad
URL:
On Wed, 11 Jan 2023 15:13:14 GMT, Claes Redestad wrote:
> This removes `MethodHandleNatives.getMembers`, which has fallen into disuse.
Thanks for reviewing!
-
PR: https://git.openjdk.org/jdk/pull/11949
On Wed, 11 Jan 2023 03:30:03 GMT, Archie L. Cobbs wrote:
>> This PR adds a new lint warning category `this-escape`.
>>
>> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to
>> allow the JDK to continue to compile with `-Xlint:all`.
>>
>> A 'this' escape warning is
On Fri, 16 Dec 2022 18:22:24 GMT, Adam Sotona wrote:
>> This is root pull request with Classfile API implementation, tests and
>> benchmarks initial drop into JDK.
>>
>> Following pull requests consolidating JDK class files parsing, generating,
>> and transforming
>>
On Fri, 16 Dec 2022 18:22:24 GMT, Adam Sotona wrote:
>> This is root pull request with Classfile API implementation, tests and
>> benchmarks initial drop into JDK.
>>
>> Following pull requests consolidating JDK class files parsing, generating,
>> and transforming
>>
On Sat, 17 Dec 2022 06:39:48 GMT, Justin King wrote:
>> Allow building OpenJDK with UBSan. Currently the build fails when optimizing
>> the image due to lots of undefined behavior (it invokes the built JVM).
>> Follow up PRs will either replace the undefined behavior with well defined
>>
On Wed, 11 Jan 2023 19:34:39 GMT, Raffaello Giulietti
wrote:
>> This change transforms a O(n^2) path to O(n) when prepending zero padding to
>> decimal outputs, where n is the length of the padding.
>
> Raffaello Giulietti has updated the pull request incrementally with one
> additional
On Wed, 11 Jan 2023 03:30:03 GMT, Archie L. Cobbs wrote:
>> This PR adds a new lint warning category `this-escape`.
>>
>> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to
>> allow the JDK to continue to compile with `-Xlint:all`.
>>
>> A 'this' escape warning is
On Wed, 11 Jan 2023 19:34:39 GMT, Raffaello Giulietti
wrote:
>> This change transforms a O(n^2) path to O(n) when prepending zero padding to
>> decimal outputs, where n is the length of the padding.
>
> Raffaello Giulietti has updated the pull request incrementally with one
> additional
On Wed, 11 Jan 2023 03:30:03 GMT, Archie L. Cobbs wrote:
>> This PR adds a new lint warning category `this-escape`.
>>
>> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to
>> allow the JDK to continue to compile with `-Xlint:all`.
>>
>> A 'this' escape warning is
On Wed, 11 Jan 2023 19:34:39 GMT, Raffaello Giulietti
wrote:
>> This change transforms a O(n^2) path to O(n) when prepending zero padding to
>> decimal outputs, where n is the length of the padding.
>
> Raffaello Giulietti has updated the pull request incrementally with one
> additional
On Wed, 11 Jan 2023 19:34:39 GMT, Raffaello Giulietti
wrote:
>> This change transforms a O(n^2) path to O(n) when prepending zero padding to
>> decimal outputs, where n is the length of the padding.
>
> Raffaello Giulietti has updated the pull request incrementally with one
> additional
On Thu, 12 Jan 2023 02:14:10 GMT, Archie L. Cobbs wrote:
>>>
>>> D'oh, you're right. But if you made `returnMe()` static or private then the
>>> argument would still hold.
>>>
>>> > And, if the method is static, same story - you are passing ref3 somewhere
>>> > else, and ref3 potentially
> `java.util.concurrent.ConcurrentHashMap` is relatively old and has not been
> updated to reflect the current state of Java and can be modernized:
>
> * Add `@Serial` annotations
> * Seal classes and restrict subclassing for internal classes
> * Use pattern matching for instance
> * Remove
On Fri, 16 Dec 2022 18:22:24 GMT, Adam Sotona wrote:
>> **This pull request is not intended for immediate integration to JDK
>> mainline.**
>>
>> This is root pull request with Classfile API implementation, tests and
>> benchmarks initial drop into JDK.
>>
>> Following pull requests
On Tue, 10 Jan 2023 10:32:34 GMT, Per Minborg wrote:
> `java.util.concurrent.ConcurrentHashMap` is relatively old and has not been
> updated to reflect the current state of Java and can be modernized:
>
> * Add `@Serial` annotations
> * Seal classes and restrict subclassing for internal
On Wed, 11 Jan 2023 15:31:22 GMT, Per Minborg wrote:
>> Code in java.io contains many legacy constructs and semantics not
>> recommended including:
>>
>> * C-style array declaration
>> * Unnecessary visibility
>> * Redundant keywords in interfaces (e.g. public, static)
>> * Non-standard
On Wed, 11 Jan 2023 09:21:18 GMT, Christoph Langer wrote:
> Hi all,
>
> This pull request contains a backport of
> [JDK-8299439](https://bugs.openjdk.org/browse/JDK-8299439), commit
> [3b374c01](https://github.com/openjdk/jdk/commit/3b374c0153950ab193f3a188b57d3404b4ce2fe2)
> from the
On Wed, 11 Jan 2023 17:01:26 GMT, Naoto Sato wrote:
>> Hi all,
>>
>> This pull request contains a backport of
>> [JDK-8299439](https://bugs.openjdk.org/browse/JDK-8299439), commit
>> [3b374c01](https://github.com/openjdk/jdk/commit/3b374c0153950ab193f3a188b57d3404b4ce2fe2)
>> from the
79 matches
Mail list logo