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

Add full JRE package list #186

Merged
merged 1 commit into from
Jul 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions java/gazelle/private/java/java.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,35 @@ func IsTestPath(dir string) bool {
return strings.Contains(dir, "/test/")
}

// This list was derived from a script along the lines of:
// for jmod in ${JAVA_HOME}; do unzip -l "${jmod}" 2>/dev/null; done | grep classes/ | awk '{print $4}' | sed -e 's#^classes/##' -e 's#\.class$##' | xargs -n1 dirname | sort | uniq | sed -e 's#/#.#g'
var stdlibPrefixes = []types.PackageName{
types.NewPackageName("com.sun.management"),
types.NewPackageName("com.sun.net.httpserver"),
types.NewPackageName("com.sun"),
types.NewPackageName("java"),
types.NewPackageName("javax.accessibility"),
types.NewPackageName("javax.annotation.processing"),
types.NewPackageName("javax.annotation.security"),
types.NewPackageName("javax.crypto"),
types.NewPackageName("javax.imageio"),
types.NewPackageName("javax.lang.model"),
types.NewPackageName("javax.management"),
types.NewPackageName("javax.naming"),
types.NewPackageName("javax.net"),
types.NewPackageName("javax.print"),
types.NewPackageName("javax.rmi.ssl"),
types.NewPackageName("javax.security"),
types.NewPackageName("javax.script"),
types.NewPackageName("javax.smartcardio"),
types.NewPackageName("javax.sound"),
types.NewPackageName("javax.sql"),
illicitonion marked this conversation as resolved.
Show resolved Hide resolved
types.NewPackageName("javax.swing"),
types.NewPackageName("javax.tools"),
types.NewPackageName("javax.transaction.xa"),
types.NewPackageName("javax.xml"),
types.NewPackageName("jdk"),
types.NewPackageName("netscape.javascript"),
types.NewPackageName("org.ietf.jgss"),
types.NewPackageName("org.jcp.xml.dsig.internal"),
types.NewPackageName("org.w3c.dom"),
types.NewPackageName("org.xml.sax"),
types.NewPackageName("sun"),
Expand Down