-
Notifications
You must be signed in to change notification settings - Fork 384
Fix sporadic error with detection of instantiable subtypes #10204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
axeluhl
wants to merge
21
commits into
gwtproject:main
Choose a base branch
from
SAP:issue-10181-clean
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
3b7a305
fixing issue #10181: don't call setInstantiable(...) for class still …
axeluhl 9f02515
issue-10181: working towards a test case for reproduction
axeluhl a8e6fe3
issue-10181: fixed test case for recursive graph instantiability
axeluhl 024b688
issue-10181: trying to replicate the type graph leading to a 20% erro…
axeluhl 13923af
issue-10181: reproduced the problem by replacing UUID by String;
axeluhl 48c7bc7
issue-10181: simplified type graph slightly
axeluhl e861951
issue-10181: successful test for serializability of recursive test graph
axeluhl 4e2d092
issue-10181: added an unserializable subclass to the recursive graph
axeluhl 452be57
issue-10181: reproducing multiple setInstantiable calls for same TIC
axeluhl bf1d9aa
issue-10181: stripped-down failing test case
axeluhl 1d43061
issue-10181: streamlined test case
axeluhl 90a639b
issue-10181: start type analysis from A; remove unused getters/setters
axeluhl 67816ee
issue-10181: added simplified version of recursive type graph plus tests
axeluhl 8ab92da
issue-10181: fixed import order again in SerializableTypeOracleBuilde…
axeluhl 9f9ce55
Merge branch 'gwtproject:main' into issue-10181-clean
axeluhl a309d4d
issue-10181: revert .classpath changes to keep diff minimal
axeluhl fb9ced5
Merge commit 'd67edbb8cd22b4c9a7e57badce8ea9a2c61555a8' into issue-10…
axeluhl ad6dce0
issue-10181: added copyright headers to comply with checkstyles rules
axeluhl 5bd0b3e
Merge remote-tracking branch 'githubsap/issue-10181-clean' into issue…
axeluhl 5d73cb7
issue-10181: fixed checkstyle warnings
axeluhl a0ca1da
issue-10181: updated copyright header ("GWT project authors")
axeluhl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
...st/com/google/gwt/user/rebind/rpc/testcases/client/RecursiveTypeGraphInstantiability.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| /* | ||
| * Copyright 2025 Google Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
| * use this file except in compliance with the License. You may obtain a copy of | ||
| * the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| * License for the specific language governing permissions and limitations under | ||
| * the License. | ||
| */ | ||
| package com.google.gwt.user.rebind.rpc.testcases.client; | ||
|
|
||
| import com.google.gwt.user.client.rpc.IsSerializable; | ||
|
|
||
| public interface RecursiveTypeGraphInstantiability extends IsSerializable { | ||
| /** | ||
| * Not serializable; interface only. | ||
| */ | ||
| interface A extends IsSerializable { | ||
| } | ||
|
|
||
| /** | ||
| * Not serializable; interface only, the second interface implemented by {@link B}. | ||
| */ | ||
| interface D extends IsSerializable { | ||
| } | ||
|
|
||
| /** | ||
| * Default-serializable, but with back-reference to A for which the question of instantiable subtypes | ||
| * depends on the serializability of this class. The reference to {@link C} which | ||
| * has a back-reference to {@link B} and B being its only subtypes candidate | ||
| * helps reproduce issue 10181. | ||
| */ | ||
| class B implements A, D { | ||
| A a; | ||
| B b; | ||
| C c; | ||
| } | ||
|
|
||
| /** | ||
| * Default-serializable with back-reference to B through D, a different interface, triggering another | ||
| * descent through checkSubtypes, finding an already "done" TIC for {@link B} with | ||
| * {@code instantiable==false}. Being "done", it is used to decide instantiability of the only | ||
| * subclass candidate of {@link D}, which is {@link B}, resulting in {@code false} for | ||
| * the instantiability of {@link D}, and thus of {@link C}, and thus of {@link B}, causing | ||
| * the test case to fail prior to a fix for issue 10181. | ||
| */ | ||
| class C implements IsSerializable { | ||
| D d; | ||
| } | ||
|
|
||
| A getA(); | ||
| } |
43 changes: 43 additions & 0 deletions
43
...gle/gwt/user/rebind/rpc/testcases/client/SimplifiedRecursiveTypeGraphInstantiability.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /* | ||
| * Copyright 2025 Google Inc. | ||
|
axeluhl marked this conversation as resolved.
Outdated
|
||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
| * use this file except in compliance with the License. You may obtain a copy of | ||
| * the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| * License for the specific language governing permissions and limitations under | ||
| * the License. | ||
| */ | ||
| package com.google.gwt.user.rebind.rpc.testcases.client; | ||
|
|
||
| import com.google.gwt.user.client.rpc.IsSerializable; | ||
|
|
||
| public interface SimplifiedRecursiveTypeGraphInstantiability extends IsSerializable { | ||
| /** | ||
| * Not serializable; interface only. | ||
| */ | ||
| interface A extends IsSerializable { | ||
| } | ||
|
|
||
| /** | ||
| * Default serializable, but with back-reference to B for which the question of instantiable | ||
| * subtypes depends on the serializability of this class. The reference to {@link C} which has a | ||
| * back-reference to {@link A} and B being its only subtypes candidate helps reproduce issue | ||
| * 10181. | ||
| */ | ||
| class B implements A { | ||
| B b; | ||
| C c; | ||
| } | ||
|
axeluhl marked this conversation as resolved.
|
||
|
|
||
| class C implements IsSerializable { | ||
| A A; | ||
| } | ||
|
|
||
| A getA(); | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.