Skip to content
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

Can plugin handle multiple top-level classes in java? #425

Open
Arthurm1 opened this issue Apr 24, 2022 · 0 comments
Open

Can plugin handle multiple top-level classes in java? #425

Arthurm1 opened this issue Apr 24, 2022 · 0 comments

Comments

@Arthurm1
Copy link
Contributor

Arthurm1 commented Apr 24, 2022

I'm using the semanticdb java plugin to recompile the java.net.URL class in Java 17. Source code here

I get the semanticdb information attached below.

There doesn't appear to be any semanticdb info between lines 176 and 1712, so (in Metals) I can't get definitions on the code in that range.
One example is URLConnection on this line has no info.
There are a number of private variables that also don't have definitions.

This file is slightly unusual for java as there are 2 top-level classes defined. Only one of them public. The non-public one does have semanticdb.

Am I reading the semanticdb info wrong, or expecting too much from it or is the plugin foxed by multiple classes or something else?

I'm using version 0.7.4 of the plugin

temurin-jdk-17.0.1+12/java.base/java/net/URL.java
-------------------------------------------------------------------------------

Summary:
Schema => SemanticDB v4
Uri => temurin-jdk-17.0.1+12/java.base/java/net/URL.java
Text => non-empty
Language => Java
Symbols => 27 entries
Occurrences => 191 entries

Symbols:
java/net/URL# => final class URL extends Object with Serializable { +72 decls } <: java/lang/Object#, java/io/Serializable#
  Object => java/lang/Object#
  Serializable => java/io/Serializable#
java/net/UrlDeserializedState# => private[net] final class UrlDeserializedState extends Object { +16 decls } <: java/lang/Object#
  net => java/net/
  Object => java/lang/Object#
java/net/UrlDeserializedState#`<init>`(). => ctor <init>(private[<init>] unknown protocol: String, private[<init>] unknown host: String, private[<init>] unknown port: Int, private[<init>] unknown authority: String, private[<init>] unknown file: String, private[<init>] unknown ref: String, private[<init>] unknown hashCode: Int): Unit
  protocol => local0
  <init> => java/net/UrlDeserializedState#`<init>`().
  String => java/lang/String#
  host => local1
  port => local2
  Int => scala/Int#
  authority => local3
  file => local4
  ref => local5
  hashCode => local6
  Unit => scala/Unit#
java/net/UrlDeserializedState#authority. => private final field authority: String
  String => java/lang/String#
java/net/UrlDeserializedState#file. => private final field file: String
  String => java/lang/String#
java/net/UrlDeserializedState#getAuthority(). => private[UrlDeserializedState] method getAuthority(): String
  UrlDeserializedState => java/net/UrlDeserializedState#
  String => java/lang/String#
java/net/UrlDeserializedState#getFile(). => private[UrlDeserializedState] method getFile(): String
  UrlDeserializedState => java/net/UrlDeserializedState#
  String => java/lang/String#
java/net/UrlDeserializedState#getHashCode(). => private[UrlDeserializedState] method getHashCode(): Int
  UrlDeserializedState => java/net/UrlDeserializedState#
  Int => scala/Int#
java/net/UrlDeserializedState#getHost(). => private[UrlDeserializedState] method getHost(): String
  UrlDeserializedState => java/net/UrlDeserializedState#
  String => java/lang/String#
java/net/UrlDeserializedState#getPort(). => private[UrlDeserializedState] method getPort(): Int
  UrlDeserializedState => java/net/UrlDeserializedState#
  Int => scala/Int#
java/net/UrlDeserializedState#getProtocol(). => private[UrlDeserializedState] method getProtocol(): String
  UrlDeserializedState => java/net/UrlDeserializedState#
  String => java/lang/String#
java/net/UrlDeserializedState#getRef(). => private[UrlDeserializedState] method getRef(): String
  UrlDeserializedState => java/net/UrlDeserializedState#
  String => java/lang/String#
java/net/UrlDeserializedState#hashCode. => private final field hashCode: Int
  Int => scala/Int#
java/net/UrlDeserializedState#host. => private final field host: String
  String => java/lang/String#
java/net/UrlDeserializedState#port. => private final field port: Int
  Int => scala/Int#
java/net/UrlDeserializedState#protocol. => private final field protocol: String
  String => java/lang/String#
java/net/UrlDeserializedState#reconstituteUrlString(). => private[UrlDeserializedState] method reconstituteUrlString(): String
  UrlDeserializedState => java/net/UrlDeserializedState#
  String => java/lang/String#
java/net/UrlDeserializedState#ref. => private final field ref: String
  String => java/lang/String#
local0 => private[<init>] unknown protocol: String
  <init> => java/net/UrlDeserializedState#`<init>`().
  String => java/lang/String#
local1 => private[<init>] unknown host: String
  <init> => java/net/UrlDeserializedState#`<init>`().
  String => java/lang/String#
local2 => private[<init>] unknown port: Int
  <init> => java/net/UrlDeserializedState#`<init>`().
  Int => scala/Int#
local3 => private[<init>] unknown authority: String
  <init> => java/net/UrlDeserializedState#`<init>`().
  String => java/lang/String#
local4 => private[<init>] unknown file: String
  <init> => java/net/UrlDeserializedState#`<init>`().
  String => java/lang/String#
local5 => private[<init>] unknown ref: String
  <init> => java/net/UrlDeserializedState#`<init>`().
  String => java/lang/String#
local6 => private[<init>] unknown hashCode: Int
  <init> => java/net/UrlDeserializedState#`<init>`().
  Int => scala/Int#
local7 => private[reconstituteUrlString] unknown len: Int
  reconstituteUrlString => java/net/UrlDeserializedState#reconstituteUrlString().
  Int => scala/Int#
local8 => private[reconstituteUrlString] unknown result: StringBuilder
  reconstituteUrlString => java/net/UrlDeserializedState#reconstituteUrlString().
  StringBuilder => java/lang/StringBuilder#

Occurrences:
[25:8..25:12): java => java/
[25:13..25:16): net => java/net/
[27:7..27:11): java => java/
[27:12..27:14): io => java/io/
[27:15..27:19): File => java/io/File#
[28:7..28:11): java => java/
[28:12..28:14): io => java/io/
[28:15..28:26): IOException => java/io/IOException#
[29:7..29:11): java => java/
[29:12..29:14): io => java/io/
[29:15..29:26): InputStream => java/io/InputStream#
[30:7..30:11): java => java/
[30:12..30:15): net => java/net/
[30:16..30:19): spi => java/net/spi/
[30:20..30:44): URLStreamHandlerProvider => java/net/spi/URLStreamHandlerProvider#
[31:7..31:11): java => java/
[31:12..31:15): nio => java/nio/
[31:16..31:20): file => java/nio/file/
[31:21..31:25): Path => java/nio/file/Path#
[32:7..32:11): java => java/
[32:12..32:20): security => java/security/
[32:21..32:37): AccessController => java/security/AccessController#
[33:7..33:11): java => java/
[33:12..33:20): security => java/security/
[33:21..33:37): PrivilegedAction => java/security/PrivilegedAction#
[34:7..34:11): java => java/
[34:12..34:16): util => java/util/
[34:17..34:26): Hashtable => java/util/Hashtable#
[35:7..35:11): java => java/
[35:12..35:14): io => java/io/
[35:15..35:37): InvalidObjectException => java/io/InvalidObjectException#
[36:7..36:11): java => java/
[36:12..36:14): io => java/io/
[36:15..36:36): ObjectStreamException => java/io/ObjectStreamException#
[37:7..37:11): java => java/
[37:12..37:14): io => java/io/
[37:15..37:32): ObjectStreamField => java/io/ObjectStreamField#
[38:7..38:11): java => java/
[38:12..38:14): io => java/io/
[38:15..38:32): ObjectInputStream => java/io/ObjectInputStream#
[38:33..38:41): GetField => java/io/ObjectInputStream#GetField#
[39:7..39:11): java => java/
[39:12..39:16): util => java/util/
[39:17..39:25): Iterator => java/util/Iterator#
[40:7..40:11): java => java/
[40:12..40:16): util => java/util/
[40:17..40:23): Locale => java/util/Locale#
[41:7..41:11): java => java/
[41:12..41:16): util => java/util/
[41:17..41:39): NoSuchElementException => java/util/NoSuchElementException#
[42:7..42:11): java => java/
[42:12..42:16): util => java/util/
[42:17..42:42): ServiceConfigurationError => java/util/ServiceConfigurationError#
[43:7..43:11): java => java/
[43:12..43:16): util => java/util/
[43:17..43:30): ServiceLoader => java/util/ServiceLoader#
[45:7..45:10): jdk => jdk/
[45:11..45:19): internal => jdk/internal/
[45:20..45:26): access => jdk/internal/access/
[45:27..45:43): JavaNetURLAccess => jdk/internal/access/JavaNetURLAccess#
[46:7..46:10): jdk => jdk/
[46:11..46:19): internal => jdk/internal/
[46:20..46:26): access => jdk/internal/access/
[46:27..46:40): SharedSecrets => jdk/internal/access/SharedSecrets#
[47:7..47:10): jdk => jdk/
[47:11..47:19): internal => jdk/internal/
[47:20..47:24): misc => jdk/internal/misc/
[47:25..47:27): VM => jdk/internal/misc/VM#
[48:7..48:10): sun => sun/
[48:11..48:14): net => sun/net/
[48:15..48:19): util => sun/net/util/
[48:20..48:33): IPAddressUtil => sun/net/util/IPAddressUtil#
[49:7..49:10): sun => sun/
[49:11..49:19): security => sun/security/
[49:20..49:24): util => sun/security/util/
[49:25..49:42): SecurityConstants => sun/security/util/SecurityConstants#
[50:7..50:10): sun => sun/
[50:11..50:19): security => sun/security/
[50:20..50:26): action => sun/security/action/
[50:27..50:44): GetPropertyAction => sun/security/action/GetPropertyAction#
[175:19..175:22): URL <= java/net/URL#
[175:34..175:38): java => java/
[175:39..175:41): io => java/io/
[175:42..175:54): Serializable => java/io/Serializable#
[1712:12..1712:32): UrlDeserializedState <= java/net/UrlDeserializedState#
[1713:18..1713:24): String => java/lang/String#
[1713:25..1713:33): protocol <= java/net/UrlDeserializedState#protocol.
[1714:18..1714:24): String => java/lang/String#
[1714:25..1714:29): host <= java/net/UrlDeserializedState#host.
[1715:22..1715:26): port <= java/net/UrlDeserializedState#port.
[1716:18..1716:24): String => java/lang/String#
[1716:25..1716:34): authority <= java/net/UrlDeserializedState#authority.
[1717:18..1717:24): String => java/lang/String#
[1717:25..1717:29): file <= java/net/UrlDeserializedState#file.
[1718:18..1718:24): String => java/lang/String#
[1718:25..1718:28): ref <= java/net/UrlDeserializedState#ref.
[1719:22..1719:30): hashCode <= java/net/UrlDeserializedState#hashCode.
[1721:11..1721:31): UrlDeserializedState <= java/net/UrlDeserializedState#`<init>`().
[1721:32..1721:38): String => java/lang/String#
[1721:39..1721:47): protocol <= local0
[1722:32..1722:38): String => java/lang/String#
[1722:39..1722:43): host <= local1
[1722:49..1722:53): port <= local2
[1723:32..1723:38): String => java/lang/String#
[1723:39..1723:48): authority <= local3
[1723:50..1723:56): String => java/lang/String#
[1723:57..1723:61): file <= local4
[1724:32..1724:38): String => java/lang/String#
[1724:39..1724:42): ref <= local5
[1724:48..1724:56): hashCode <= local6
[1725:13..1725:21): protocol => java/net/UrlDeserializedState#protocol.
[1725:24..1725:32): protocol => local0
[1726:13..1726:17): host => java/net/UrlDeserializedState#host.
[1726:20..1726:24): host => local1
[1727:13..1727:17): port => java/net/UrlDeserializedState#port.
[1727:20..1727:24): port => local2
[1728:13..1728:22): authority => java/net/UrlDeserializedState#authority.
[1728:25..1728:34): authority => local3
[1729:13..1729:17): file => java/net/UrlDeserializedState#file.
[1729:20..1729:24): file => local4
[1730:13..1730:16): ref => java/net/UrlDeserializedState#ref.
[1730:19..1730:22): ref => local5
[1731:13..1731:21): hashCode => java/net/UrlDeserializedState#hashCode.
[1731:24..1731:32): hashCode => local6
[1734:4..1734:10): String => java/lang/String#
[1734:11..1734:22): getProtocol <= java/net/UrlDeserializedState#getProtocol().
[1735:15..1735:23): protocol => java/net/UrlDeserializedState#protocol.
[1738:4..1738:10): String => java/lang/String#
[1738:11..1738:18): getHost <= java/net/UrlDeserializedState#getHost().
[1739:15..1739:19): host => java/net/UrlDeserializedState#host.
[1742:4..1742:10): String => java/lang/String#
[1742:11..1742:23): getAuthority <= java/net/UrlDeserializedState#getAuthority().
[1743:15..1743:24): authority => java/net/UrlDeserializedState#authority.
[1746:8..1746:15): getPort <= java/net/UrlDeserializedState#getPort().
[1747:15..1747:19): port => java/net/UrlDeserializedState#port.
[1750:4..1750:10): String => java/lang/String#
[1750:11..1750:18): getFile <= java/net/UrlDeserializedState#getFile().
[1751:15..1751:19): file => java/net/UrlDeserializedState#file.
[1754:4..1754:10): String => java/lang/String#
[1754:11..1754:17): getRef <= java/net/UrlDeserializedState#getRef().
[1755:15..1755:18): ref => java/net/UrlDeserializedState#ref.
[1758:8..1758:19): getHashCode <= java/net/UrlDeserializedState#getHashCode().
[1759:15..1759:23): hashCode => java/net/UrlDeserializedState#hashCode.
[1762:4..1762:10): String => java/lang/String#
[1762:11..1762:32): reconstituteUrlString <= java/net/UrlDeserializedState#reconstituteUrlString().
[1765:12..1765:15): len <= local7
[1765:18..1765:26): protocol => java/net/UrlDeserializedState#protocol.
[1765:27..1765:33): length => java/lang/String#length().
[1766:12..1766:21): authority => java/net/UrlDeserializedState#authority.
[1766:34..1766:43): authority => java/net/UrlDeserializedState#authority.
[1766:44..1766:51): isEmpty => java/lang/String#isEmpty().
[1767:12..1767:15): len => local7
[1767:23..1767:32): authority => java/net/UrlDeserializedState#authority.
[1767:33..1767:39): length => java/lang/String#length().
[1768:12..1768:16): file => java/net/UrlDeserializedState#file.
[1769:12..1769:15): len => local7
[1769:19..1769:23): file => java/net/UrlDeserializedState#file.
[1769:24..1769:30): length => java/lang/String#length().
[1771:12..1771:15): ref => java/net/UrlDeserializedState#ref.
[1772:12..1772:15): len => local7
[1772:23..1772:26): ref => java/net/UrlDeserializedState#ref.
[1772:27..1772:33): length => java/lang/String#length().
[1773:8..1773:21): StringBuilder => java/lang/StringBuilder#
[1773:22..1773:28): result <= local8
[1773:35..1773:48): StringBuilder => java/lang/StringBuilder#`<init>`(+1).
[1773:49..1773:52): len => local7
[1774:8..1774:14): result => local8
[1774:15..1774:21): append => java/lang/StringBuilder#append(+1).
[1774:22..1774:30): protocol => java/net/UrlDeserializedState#protocol.
[1775:8..1775:14): result => local8
[1775:15..1775:21): append => java/lang/StringBuilder#append(+1).
[1776:12..1776:21): authority => java/net/UrlDeserializedState#authority.
[1776:34..1776:43): authority => java/net/UrlDeserializedState#authority.
[1776:44..1776:51): isEmpty => java/lang/String#isEmpty().
[1777:12..1777:18): result => local8
[1777:19..1777:25): append => java/lang/StringBuilder#append(+1).
[1778:12..1778:18): result => local8
[1778:19..1778:25): append => java/lang/StringBuilder#append(+1).
[1778:26..1778:35): authority => java/net/UrlDeserializedState#authority.
[1780:12..1780:16): file => java/net/UrlDeserializedState#file.
[1781:12..1781:18): result => local8
[1781:19..1781:25): append => java/lang/StringBuilder#append(+1).
[1781:26..1781:30): file => java/net/UrlDeserializedState#file.
[1783:12..1783:15): ref => java/net/UrlDeserializedState#ref.
[1784:12..1784:18): result => local8
[1784:19..1784:25): append => java/lang/StringBuilder#append(+1).
[1785:12..1785:18): result => local8
[1785:19..1785:25): append => java/lang/StringBuilder#append(+1).
[1785:26..1785:29): ref => java/net/UrlDeserializedState#ref.
[1787:15..1787:21): result => local8
[1787:22..1787:30): toString => java/lang/StringBuilder#toString().
@linear linear bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants