├── .gitignore ├── .jcheck └── conf ├── Makefile ├── README.md └── src ├── footer.html ├── guide ├── about-this-guide.md ├── backporting.md ├── building-the-jdk.md ├── cloning-the-jdk.md ├── code-conventions.md ├── code-owners.md ├── contributing-to-an-open-jdk-project.md ├── header.md ├── hotspot-development.md ├── introduction.md ├── jbs-jdk-bug-system.md ├── mailing-lists.md ├── making-a-change.md ├── project-maintenance.md ├── release-notes.md ├── reviewing-and-sponsoring-a-change.md ├── testing-the-jdk.md ├── the-jdk-release-process.md └── working-with-pull-requests.md ├── guidestyle.css ├── images ├── affects_versions.svg └── push-defer.png └── toc.conf /.gitignore: -------------------------------------------------------------------------------- 1 | # Generated files from make 2 | build/ 3 | mermaid-filter.err 4 | 5 | # MAC OS X Files 6 | .DS_Store 7 | 8 | # IntelliJ IDE Files 9 | .idea/ 10 | -------------------------------------------------------------------------------- /.jcheck/conf: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. 3 | ; DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | ; 5 | ; This code is free software; you can redistribute it and/or modify it 6 | ; under the terms of the GNU General Public License version 2 only, as 7 | ; published by the Free Software Foundation. 8 | ; 9 | ; This code is distributed in the hope that it will be useful, but WITHOUT 10 | ; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | ; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 | ; version 2 for more details (a copy is included in the LICENSE file that 13 | ; accompanied this code). 14 | ; 15 | ; You should have received a copy of the GNU General Public License version 16 | ; 2 along with this work; if not, write to the Free Software Foundation, 17 | ; Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 | ; 19 | ; Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 | ; or visit www.oracle.com if you need additional information or have any 21 | ; questions. 22 | ; 23 | 24 | [general] 25 | project=guide 26 | jbs=JDK 27 | 28 | [checks] 29 | error=author,committer,reviewers,whitespace,executable 30 | 31 | [census] 32 | version=0 33 | domain=openjdk.org 34 | 35 | [checks "whitespace"] 36 | files=.*\.md$|.*\.html$|.*\.css$|Makefile 37 | ignore-tabs=Makefile 38 | 39 | [checks "reviewers"] 40 | reviewers=1 41 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | default: all 2 | 3 | define NEWLINE 4 | 5 | 6 | endef 7 | 8 | TITLE := The OpenJDK Developers' Guide 9 | 10 | GUIDE_CHAPTERS := $(shell cat src/toc.conf) 11 | GUIDE_CHAPTER_FILES := $(addprefix src/guide/, $(GUIDE_CHAPTERS)) 12 | GUIDE_CONCATENATED := build/support/index.md 13 | GUIDE_FOOTER := build/support/footers/index.html 14 | GUIDE_IMAGE_FILES := $(shell ls src/images/*) 15 | GUIDE_UTF8 := build/support/utf-8/index.html 16 | GUIDE_RESULT := build/dist/index.html 17 | 18 | UTF8_HTML := $(patsubst build/dist/%.html, build/support/utf-8/%.html, $(GUIDE_RESULT)) 19 | 20 | FOUND_GUIDE_CHAPTERS := $(wildcard src/guide/*.md) 21 | ifneq ($(sort $(FOUND_GUIDE_CHAPTERS)), $(sort $(GUIDE_CHAPTER_FILES))) 22 | $(error "The guide chapters in src/guide do not match the chapters in src/toc.conf") 23 | endif 24 | 25 | ifneq ($(DEBUG_MAKE),) 26 | .SECONDARY: $(LEGACY_FOOTER) $(GUIDE_CONCATENATED) $(GUIDE_FOOTER) $(UTF8_HTML) 27 | endif 28 | 29 | MERMAID ?= $(shell command -v mermaid-filter 2> /dev/null) 30 | ifneq ($(MERMAID), ) 31 | MERMAID_FILTER := -F $(MERMAID) 32 | else 33 | $(info Notice: mermaid is not present; building without diagrams) 34 | MERMAID_FILTER := 35 | endif 36 | 37 | # Return the short form git hash for the last change to a file or set of files 38 | # $1: the name of the file or files to get the hash for 39 | GetHash = \ 40 | $(eval _shell_hash = $(shell git log -1 --pretty=format:"%h" -- $1)) \ 41 | $(if $(_shell_hash), \ 42 | $(_shell_hash), \ 43 | 0000000) 44 | 45 | # Generate a footer from the tempate in src/footer.html 46 | # $1: output file name 47 | # $2: git hash value 48 | # $3: relative file name 49 | GenerateFooter = \ 50 | sed -e 's@!git-commit-hash!@$(strip $2)@' -e 's@!source-file-name!@$(strip $3)@' src/footer.html > $1 51 | 52 | # Convert markdown to html by pandoc 53 | # $1: input markdown file 54 | # $2: output html file 55 | RunPandoc = \ 56 | pandoc $1 $(MERMAID_FILTER) --css guidestyle.css --strip-comments --standalone --toc --ascii --to html4 --title-prefix "$(TITLE)" --include-after-body=build/support/footers/$(notdir $2) > $2 57 | 58 | # Convert utf-8 html to latin-1 59 | # $1: input utf-8 file 60 | # $2: output latin-1 file 61 | ConvertToLatin1 = \ 62 | sed -e 's/ charset=utf-8//' $1 | iconv -f UTF-8 -t ISO-8859-1 > $2 63 | 64 | $(GUIDE_CONCATENATED): $(GUIDE_CHAPTER_FILES) 65 | rm -f $@.tmp 66 | mkdir -p build/support 67 | $(foreach s, $^, \ 68 | cat $s >> $@.tmp $(NEWLINE) \ 69 | printf "\n" >> $@.tmp $(NEWLINE) \ 70 | ) 71 | mv $@.tmp $@ 72 | 73 | $(GUIDE_FOOTER): $(GUIDE_CONCATENATED) 74 | mkdir -p build/support/footers 75 | $(call GenerateFooter, $@, $(call GetHash, $(GUIDE_CHAPTER_FILES)), src/guide) 76 | 77 | $(GUIDE_UTF8): $(GUIDE_CONCATENATED) $(GUIDE_FOOTER) 78 | mkdir -p build/support/utf-8 79 | $(call RunPandoc, $<, $@) 80 | 81 | build/dist/%.html: build/support/utf-8/%.html 82 | mkdir -p build/dist 83 | $(call ConvertToLatin1, $<, $@) 84 | 85 | build/dist/guidestyle.css: src/guidestyle.css 86 | mkdir -p build/dist 87 | cp $< $@ 88 | 89 | copyimages: 90 | mkdir -p build/dist 91 | cp $(GUIDE_IMAGE_FILES) build/dist 92 | 93 | all: $(GUIDE_RESULT) build/dist/guidestyle.css copyimages 94 | 95 | clean: 96 | rm -rf build 97 | rm -f mermaid-filter.err 98 | 99 | validate: build/dist/index.html 100 | tidy -q -ascii -asxhtml -n --doctype omit --tidy-mark n build/dist/index.html > /dev/null 101 | 102 | .PHONY: default all clean validate 103 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OpenJDK Developers' Guide 2 | 3 | This Project maintains the [OpenJDK Developers' Guide](https://openjdk.java.net/guide/). The goal of this guide is to answer questions that developers of the JDK might have around development process, tooling, standards, and so forth. The formal rules and processes are described in other documents, such as [JEP 1](https://openjdk.java.net/jeps/1) for the JDK Enhancement-Proposal & Roadmap Process, and [JEP 3](https://openjdk.java.net/jeps/3) for the JDK Release Process. This guide is meant to be a complement to such documents, with tutorials and examples for how to follow these rules and how to work together with the rest of the OpenJDK Community. 4 | 5 | There are many common use cases that aren't detailed in the formal process. This guide suggests how to work in such cases. 6 | 7 | ## Audience 8 | 9 | The target audience for this document is anyone in the OpenJDK Community who aims to contribute to the development of the JDK but is not yet familiar with the process. People who are already regular contributors will already know much of what this guide has to offer. Still, the Developers' Guide should work as a source of knowledge also for experienced contributors. Any descriptions in the Guide should thus be self-contained or have explicit references to any information that the reader is expected to already know. The information should also be structured in such a way that it's easy to find the details for any process, so that a reader who already knows the big picture can quickly find a particular detail that was forgotten. 10 | 11 | ## Contributing 12 | 13 | To engage in the development of the Developers' Guide itself, create a private fork and join the dedicated [guide-dev mail list](https://mail.openjdk.java.net/mailman/listinfo/guide-dev). 14 | 15 | ### Language in the Developers' Guide 16 | 17 | The OpenJDK Developers' Guide is written in American English. The Guide is meant to be an informal document. This is reflected in the language used. For instance, contractions are commonly used. 18 | 19 | When choosing what words to use, keep in mind that a large portion of the audience isn't native English speakers. Always try to keep the language easy to understand and avoid niche words and local terminology if possible. That said, the language must also be precise to avoid mixing up different concepts. For instance the git term `push` is only used when talking about pushes to a private clone of a Project repository. When talking about the Project repositories themselves we use the Skara term `integrate` since developers can't push directly to these repositories. 20 | 21 | ### Keywords and links 22 | 23 | All terms defined in the OpenJDK Bylaws are considered keywords, and should be capitalized. Company and organization names are also considered keywords and follow the same rules. A keyword should be linked to the definition of that term if the keyword is referring to the defined term. Additional words that build a noun phrase should be included in the link. 24 | 25 | E.g. The word **Project** is defined in the Bylaws, therefore when writing about OpenJDK Projects there should be a link and a capital **P**. However when writing about other projects no link is required and the case of **p** follow normal grammar rules. 26 | 27 | To clarify further, a few examples: 28 | 29 | * A [Project](https://openjdk.org/bylaws#project) may produce code. --- The word "Project" refers to an OpenJDK Project as defined in the Bylaws. 30 | * Y is an [OpenJDK Project](https://openjdk.org/bylaws#project). --- "OpenJDK Project" is a noun phrase and all of it should be included in the link. 31 | * The Project repository contains code. --- Here "Project repository" refers to the code repository, not the Project, but the Project is still an OpenJDK Project, so it's capitalized but has no link. 32 | * A [GitHub](https://github.com) project is a different thing. --- Not an OpenJDK Project, however GitHub is a keyword and is therefore correctly capitalized and has it's own link. If we were writing about a specific GitHub project then a link to that project would be appropriate. 33 | 34 | Section headers do not contain links since this mess with our ability to link to said sections. 35 | 36 | ### CSS formats 37 | 38 | There are styles defined in the file `src/guidestyle.css`. These styles should be used exactly for what they are intended for. No more, no less. Always use the correct style when writing words covered by these styles, never use the styles for anything else. The comments in `guidestyle.css` should be obvious enough to understand what the style should be used for. 39 | 40 | ## Building the Developers' Guide 41 | 42 | The project comes with a `Makefile`. Simply type `make` to generate HTML files from the source Markdown. The build requires the tools `pandoc`, `iconv`, and `perl` and assumes a POSIX environment. We recommend using at least pandoc 2.0. 43 | 44 | To generate the diagrams, you also need the `mermaid-filter` for pandoc. You can install this by running `npm install --global mermaid-filter --unsafe-perm=true`. 45 | 46 | The resulting HTML files in the `build` directory are exactly the files published on the [OpenJDK web server](https://openjdk.java.net/guide/). There is, however, a larger framework on the web server with fonts and CSS that is not part of this project. This means that the HTML files as they are generated will not look exactly the same as the final published version. Still they are hopefully good enough to proof read changes and see the layout in a browser. 47 | 48 | ## Todo 49 | 50 | The Developers' Guide is continuously updated and there are several parts still missing. This todo list isn't complete and there is no limitation on current work being tied to any item on this list. It's just a list of things that we know are missing or needs to be updated. The list isn't ordered in any way. 51 | 52 | * JEPs - When do I need one? - Working with JEPs 53 | * Add "stakeholders" for each section 54 | * Add references to current code conventions for Java, C++, Markdown, Makefiles 55 | * Text about adding an API 56 | * Text about adding a feature 57 | * Text about JCK 58 | * List JTReg `@key` conventions for different areas 59 | * Document best practices around TEST.properties usage. See [PR#30](https://github.com/openjdk/guide/pull/30#issuecomment-714589551) 60 | * How to work with the code in an IDE 61 | * Where to find JTReg bundles 62 | * How to run tests with your fork and how to navigate the test result ZIP 63 | * Logging in hotspot - available strategies, what is preferred and where, how to log in special conditions 64 | -------------------------------------------------------------------------------- /src/footer.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | File change revision: !git-commit-hash! - Revision history 4 |
-------------------------------------------------------------------------------- /src/guide/about-this-guide.md: -------------------------------------------------------------------------------- 1 | # About This Guide 2 | 3 | This guide is being maintained through the [OpenJDK Developers' Guide Project](https://openjdk.org/census#guide). The source repository is available at [GitHub](https://github.com/openjdk/guide). The revision hash at the bottom of this page refers to the last published commit. 4 | 5 | Comments and questions may be sent to [guide-dev@openjdk.org](mailto:guide-dev@openjdk.org). Please let us know if there's anything in the guide that isn't clear. 6 | 7 | ::: {.box} 8 | [To the top](#){.boxheader} 9 | ::: 10 | -------------------------------------------------------------------------------- /src/guide/backporting.md: -------------------------------------------------------------------------------- 1 | # Backporting 2 | 3 | ::: {.box} 4 | [Quick Links]{.boxheader} 5 | 6 | * [Push approval for JDK updates](https://openjdk.org/projects/jdk-updates/approval.html) 7 | * [Skara documentation on backports](https://wiki.openjdk.org/display/SKARA/Backports) 8 | ::: 9 | 10 | Development of the latest version of the JDK often results in bug fixes that might be interesting to include in some of the JDK Update releases still being maintained or in a feature release stabilization branch. Moving a fix from a more recent release train (e.g. JDK 21) to an older release train (e.g. JDK 17) is called *backporting*. 11 | 12 | The guideline for what to backport into a specific release will vary over the lifetime of that release. Initially more fixes are expected to be backported as new features and large changes introduced in a mainline release stabilize. Over time the focus will shift from stabilization to keeping it stable - the release will go into maintenance mode. This means that bug fixes that require larger disruptive changes are more likely to be made in mainline and backported to more recent release trains only, and not to older release trains. 13 | 14 | Over time it's likely that the code base will diverge between mainline and any given update release, and the cost of backporting will increase. The cost in this case is not only the effort needed to perform the actual backport, but also the cost inferred by bugs introduced by the backport. This should be taken into consideration when deciding if a change should be backported or not. For more details on how to reason around what to backport, [this email from JDK 8 Updates Project lead Andrew Haley](https://mail.openjdk.org/pipermail/jdk8u-dev/2020-June/012002.html) has some guidelines for JDK 8u. The reasoning in this mail is specific to JDK 8u, but will in general apply to any JDK release in maintenance mode. 15 | 16 | Any change that originally required a CSR will require a new CSR to be backported unless the backport was covered by the initial CSR. Changes to Java SE specifications cannot be made in an update release without a Java SE Maintenance Release. CSR-related issues affect interfaces and behavior and must be very carefully scrutinized. 17 | 18 | ## Backporting to a feature release stabilization branch 19 | 20 | During ramp down of a feature release there are two branches of the mainline repository in play, the release stabilization branch for the outgoing release, and the `master` branch where the next release is being developed. Any change going into the release stabilization branch is likely to be desired in `master` as well. When making a change intended for both the stabilization branch and `master`, you should always create your pull request targeting `master` first, and then, once the pull request is integrated, backport the resulting commit to the release stabilization branch. For bug fixes that are **only** applicable to the release stabilization branch, regular pull requests targeting the stabilization branch should be created. 21 | 22 | Please note that special rules applies during ramp down regarding what can and can't be included into the stabilization branch. See the [The JDK Release Process] for more information. 23 | 24 | ## Backporting multiple related changes 25 | 26 | Ideally fixes should not be backported until there has been enough time for any regressions or follow-on issues to have been identified. Then, when looking to backport a fix the developer should look for both [blocked by]{.jbs-value} and [causes]{.jbs-value} links in order to understand the complete set of fixes that should be backported. 27 | 28 | When backporting a number of changes that are dependent on each other, like a change with a tail of bug fixes, it can sometimes seem attractive to merge all those commits into a single change to avoid backporting a broken change. Please don't. The general recommendation is to backport each commit individually. There are several reasons for this recommendation. 29 | 30 | If, for instance, there are other changes between the original one and the followup fix(es) there may be a dependency on other changes that are unrelated to the issue itself. By merging the original change, the fix(es), and the unrelated changes to meet the dependency, a single very different change is created. It's unlikely that this change will match the description in the single JBS issue used for the merged backport. Backporting each commit individually will preserve the git history and make it easy to figure out what has actually been backported. 31 | 32 | Testing each individual change is more likely to find issues than just testing the single merged change. It's also easier and less error prone to use the `/backport` command on each commit instead of manually cherrypick and deal with the merges etc. 33 | 34 | And finally, if backporting each commit individually, the JBS records will clearly indicate that the followup changes have been backported as well. This is important as there is tooling that verifies that everything is done in the right way. That tooling will be confused if it can't deduct from JBS what has happened. 35 | 36 | ## Working with backports in JBS 37 | 38 | ::: {.box} 39 | [Terminology]{.boxheader} 40 | 41 | Main issue - The top issue in a backport hierarchy. Eg. [JDK-8272373](https://bugs.openjdk.org/browse/JDK-8272373) is a _main issue_, while [JDK-8277498](https://bugs.openjdk.org/browse/JDK-8277498) and [JDK-8277499](https://bugs.openjdk.org/browse/JDK-8277499) are _backport issues_ of this main issue. 42 | ::: 43 | 44 | ::: {style="text-align:center;"} 45 | ~~~{.mermaid caption="Example of backport hierarchy" format=svg theme=neutral} 46 | graph TD 47 | main(JDK-8272373) 48 | backport1(JDK-8277498) 49 | backport2(JDK-8277499) 50 | main --> |backport to JDK 17| backport1 51 | main --> |backport to JDK 11| backport2 52 | ~~~ 53 | ::: 54 | 55 | In general there's no need to create backport issues in JBS manually. All work that's done in JBS in preparation for a backport (requesting approvals etc) is done in the main issue. The backport issue will be created automatically by the bots when you integrate the change to the source code repository. 56 | 57 | There can be cases where it's desirable to create a backport issue before the fix is done, e.g. if a CSR needs to be filed. In these cases set the [Fix Version/s]{.jbs-field} of the backport to `N` or `N-pool`, where `N` is the release train the backport is targeting. E.g. `17-pool`. Please note that even if a backport issue is created ahead of time, all work done in JBS for approvals and similar is still done in the main issue. 58 | 59 | Obviously it's possible to set the [Fix Version/s]{.jbs-field} to the exact release the backport is targeting, but in general this isn't recommended unless you are targeting a feature release in ramp down. When a change is integrated to an update release repository, the bots will look at the main issue as indicated in the PR title, and look for backports with the current `N.0.x` release version as [Fix Version/s]{.jbs-field}, if no such backport is found they will look for `N-pool`, and if that isn't found either, a new backport issue will be created. This means that if the backport has an exact [Fix Version/s]{.jbs-field} set, but is delayed and misses the release indicated by this [Fix Version/s]{.jbs-field}, a new, superfluous backport issue is created with a small mess as the result. (See [How to fix an incorrect backport creation in JBS].) 60 | 61 | Setting the [Fix Version/s]{.jbs-field} of a backport targeted to an update release to `N` is always wrong. JDK `N` has already been released (or it wouldn't be an update release) and can't get any more fixes. 62 | 63 | ## Requesting approvals for backports 64 | 65 | In order to be allowed to integrate a change to one of the OpenJDK update development repositories (e.g. [`jdk17u-dev`](https://github.com/openjdk/jdk17u-dev)), an approval is required. The [official process for how to request push approval for a backport](https://openjdk.org/projects/jdk-updates/approval.html) describes in detail how to work with JBS when requesting approvals. In short, there's a label [jdk<release>u-fix-request]{.jbs-label} that should be added to the main JBS issue. Also put a motivation as to why the issue needs to be backported as a comment in the main issue. Once the label and motivation has been added, wait for the maintainers of the release to approve your request. The approval will be indicated with a label, [jdk<release>u-fix-yes]{.jbs-label}, added to the main issue. 66 | 67 | If the update release is in ramp down, changes are integrated to the release repository (e.g. [`jdk17u`](https://github.com/openjdk/jdk17u)). During ramp down the bar to get changes in is significantly higher and fixes need to be approved with [jdk<release>u-critical-request]{.jbs-label} / [jdk<release>u-critical-yes]{.jbs-label}. 68 | 69 | If your request to backport a change is denied, but you for some reason already created the backport issue in JBS (why?!), the backport issue should be closed as [Won't Fix]{.jbs-value}. 70 | 71 | ## Using the Skara tooling to help with backports 72 | 73 | The Skara tooling includes support for backports. [The official Skara documentation](https://wiki.openjdk.org/display/SKARA/Backports) describes in detail how to work with the tooling to create backport PRs on [GitHub](https://github.com) or using the CLI tools. As described in the documentation, the [`/backport`](https://wiki.openjdk.org/display/SKARA/Commit+Commands#CommitCommands-/backport) command can be used on a commit or a PR to create the backport PR: 74 | 75 | /backport jdk21u-dev 76 | /backport jdk jdk23 77 | /backport :jdk23 78 | 79 | In the first example we backport the change to the JDK 21 update release. To backport to other update releases, replace `jdk21u` with the corresponding name for the target update repository. 80 | 81 | The second and third example above will backport the change to a stabilization branch, in this case JDK 23. As before `jdk` is the name of the target repository, and `jdk23` is the name of the stabilization branch. 82 | 83 | Using the `/backport` command is the recommended way to perform backports as the tooling will automatically handle all the necessary steps in the background. If a backport PR is manually created, set the PR title to `Backport `. This ensures that the bots will recognize it as a backport as opposed to a main fix specifically targeting an older release. One can tell whether or not the bots recognized a PR as a backport by the [backport]{.label} label being added if it's recognized. 84 | 85 | ## How to fix an incorrect backport creation in JBS 86 | 87 | If an issue is targeted to a release and a fix referring to that issue is integrated to a different release repository, then a backport issue is automatically created in JBS. Usually this is a "good thing", e.g., when you are backporting a fix to an earlier release, but not always... If the main issue is targeted to a later release (due to schedule planning) but someone finds the time to fix that issue in the current release, or if the main issue is targeted to a feature release in ramp down and the fix is integrated to the master branch, then the issue should be retargeted to the correct release before integrating the fix. However, sometimes we forget. 88 | 89 | Here's how to fix that: 90 | 91 | ::: {.note} 92 | In this example a fix was integrated to JDK N+1 (the mainline master branch) while the JBS bug was targeted to JDK N (a feature release in ramp down). The same procedure can be used in the opposite situation, when a fix has been integrated to JDK N when the JBS bug was targeted to JDK N+1, by switching N and N+1 below. Remember, to keep the record clean for the future, what matters the most is that the **bug id used in the commit comment is the main bug**, and that **the "backports"** (regardless of if they are to earlier or later releases) **are Backport type issues of that main issue**. Also make sure there are never more than one Backport issue of the same main issue targeted to any given release. 93 | ::: 94 | 95 | #. Reopen the _backport_ issue that was created automatically 96 | * Use a comment like the following (in the reopen dialog): 97 | ~~~ 98 | This change was integrated while the main issue was targeted to 'N'. The main issue has been reset to fixed in 'N+1', this backport issue has been reset to fix in 'na' and closed as Not An Issue to avoid confusion. 99 | ~~~ 100 | * Change the [Fix Version/s]{.jbs-field} from 'N+1' to 'na'. 101 | * Close the _backport_ issue as [Not an Issue]{.jbs-value}. Note: [Closed]{.jbs-value}, **not** [Resolved]{.jbs-value} 102 | 103 | Even if you intend to backport the issue from 'N+1' to 'N' you shouldn't reuse this backport issue. The existing (bad) push notification comment and the later to be added correct push notification comment will look very similar and it's just a disaster waiting to happen to deliberately add these to the same issue. 104 | 105 | #. Clean up the _main_ issue 106 | * Copy the push notification comment from the _backport_ issue to the _main_ issue, e.g.: 107 | ~~~ 108 | Changeset: 12345678 109 | Author: Duke 110 | Date: 2020-10-23 15:37:46 +0000 111 | URL: https://git.openjdk.org/jdk/commit/12345678 112 | ~~~ 113 | * Add a comment like the following to the _main_ issue: 114 | ~~~ 115 | This change was integrated to 'N+1' while this main issue was targeted to 'N'. This issue has been reset to fixed in 'N+1' and the Robo Duke entry was copied here. 116 | ~~~ 117 | * Reset the _main_ issue [Fix Version/s]{.jbs-field} from 'N' to 'N+1'. 118 | * Resolve the _main_ issue as [Fixed]{.jbs-value} in build "team" or in build "master" depending on where the fix was integrated - or to an actual build number if the change has already made it to a promoted build (look in the _backport_ issue if you are unsure). Integrations to 'openjdk/jdk' are fixed in build "master" and integrations to other Project repositories are fixed in build "team". 119 | 120 | ::: {.box} 121 | [To the top](#){.boxheader} 122 | ::: 123 | -------------------------------------------------------------------------------- /src/guide/building-the-jdk.md: -------------------------------------------------------------------------------- 1 | # Building the JDK 2 | 3 | ::: {.box} 4 | [Quick Links]{.boxheader} 5 | 6 | * [Official build instructions](https://openjdk.org/groups/build/doc/building.html) 7 | * [openjdk/jdk GitHub project](https://github.com/openjdk/jdk) 8 | * [JDK 16 General-Availability Release](https://jdk.java.net/16/) 9 | ::: 10 | 11 | The JDK build system is a fairly complex machine that has the ability to build anything from a single module to a complete shippable JDK bundle with various levels of debug capabilities, run tests, install your newly built JDK on your system, or cross-compile for some other system. The build uses `make` and a few other tools that you will have to install on your system before starting. 12 | 13 | The JDK supports incremental builds. This means that if you have a complete build and make changes in just a single part of the JDK (e.g. a module or part of the JVM), only that particular part needs to be rebuilt. So subsequent builds will be faster and you can always use a make target that results in a complete JDK image without having to worry about actually building the entire JDK every time. Please note that the incremental build do have limits in its understanding of what you change. For instance, if you change behaviors or conventions in one module there may be other parts of the JDK that implicitly depends on these without make's knowledge. For this reason you may have to rebuild several modules, or do a clean build if you change things that may have a wider impact. 14 | 15 | The examples below show the steps taken to build the JDK source code. Please see [Cloning the JDK] for information on how to download it. These examples were written in the JDK 17 development time frame which is why the boot JDK used here is JDK 16. Note that the download links used here point to JDK 16 bundles. To build JDK N, use JDK N-1 as the boot JDK. 16 | 17 | The configure script will tell you what additional packages you need. In this first example several packages were needed since this build was performed on a clean Ubuntu installation. The configure script was run several times to get all the dependencies, but only the commands actually needed to get the JDK built are included in the log. This is just an example log, don't copy the `apt-get install` line. Instead run `sh ./configure` to see what packages you actually need on your system. 18 | 19 | $ wget https://download.java.net/java/GA/jdk16/7863447f0ab643c585b9bdebf67c69db/36/GPL/openjdk-16_linux-x64_bin.tar.gz 20 | $ tar xzf openjdk-16_linux-x64_bin.tar.gz 21 | $ sudo apt-get install autoconf zip make gcc g++ libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev libcups2-dev libfontconfig1-dev libasound2-dev 22 | $ cd jdk 23 | $ sh ./configure --with-boot-jdk=$HOME/jdk-16/ 24 | $ make images 25 | 26 | The built JDK can be found in `build/linux-x86_64-server-release/jdk`. The exact path depends on your build platform and selected configuration. 27 | 28 | The second example is from a clean (newly installed) Mac running MacOS Big Sur. Please note that in this case there are some steps taken outside of the terminal. First XCode and the XCode command line tools must be installed. It could be that the most recent version of XCode that you get from App Store is too new to have been properly tested with the JDK build. See [the JDK build instructions](https://github.com/openjdk/jdk/blob/master/doc/building.md#apple-xcode) for supported versions and more details in case you need to install an older version of XCode. 29 | In this example [Mac Ports](https://www.macports.org) is used to install `autoconf`. `autoconf` can also be installed using [Homebrew](https://brew.sh) and surely through other sources as well. 30 | 31 | $ curl https://download.java.net/java/GA/jdk16.0.1/7147401fd7354114ac51ef3e1328291f/9/GPL/openjdk-16.0.1_osx-x64_bin.tar.gz --output openjdk-16.0.1_osx-x64_bin.tar.gz 32 | $ tar xzf openjdk-16.0.1_osx-x64_bin.tar.gz 33 | $ sudo port install autoconf 34 | $ sh ./configure --with-boot-jdk=$HOME/jdk-16.0.1.jdk/Contents/Home 35 | $ make images 36 | 37 | In this case the built JDK can be found in `build/macosx-x86_64-server-release/jdk`. 38 | 39 | ## Configuration options 40 | 41 | The JDK build is extremely configurable. This list only contains the most basic configure options needed to get you started. Use `configure --help` to see a complete list of options. 42 | 43 | | Option | What it does | 44 | |:-------|:-------| 45 | | `--with-boot-jdk` | Tell configure what boot JDK to use to build the Java libraries. | 46 | | `--with-debug-level` | Set the debug level. Available levels are `release`, `fastdebug`, `slowdebug`, `optimized`. | 47 | 48 | ### Working with multiple configurations 49 | 50 | Through the configure flags you will select what configuration of the JDK to build. The name of the output directory for the build depends on this configuration. In the example above the JDK ended up in `linux-x86_64-server-release`. This means that we made a release build of a 64 bit linux x86 version of the server JDK. If we change some of these options the output directory will be affected accordingly. 51 | 52 | `--with-debug-level` is one example of a configure option that will change the output directory name. Sometimes it makes sense to have several different configurations in parallel. For example while debugging some code you might want to have both a debug build and a release build to be able to test it properly. The directory naming scheme makes this very easy. Simply configure and build the JDKs you need and they will end up next to each other in the build directory. 53 | 54 | In the example above we built a `release` image. To build a debug image as well we can configure with `--with-debug-level=slowdebug`. This will give us a JDK where for instance asserts in the JDK source code are enabled. To select which JDK to work with in later calls to `make` add `CONF=`. 55 | 56 | $ sh ./configure --with-boot-jdk=$HOME/jdk-16/ --with-debug-level=slowdebug 57 | $ make CONF=slowdebug images 58 | $ ls build/ 59 | linux-x86_64-server-release 60 | linux-x86_64-server-slowdebug 61 | 62 | ## Make targets 63 | 64 | `make images`, as used in the example above, will build a JDK image which is very close to what you'd get from any JDK provider. There are several other make targets you can use depending on what you're looking for. The table below contains some commonly used make targets. 65 | 66 | | Target | What it does | 67 | |:-------|:-------------| 68 | | `exploded-image` | This is the default make target that you'll get if you simply invoke `make`. | 69 | | `image` | Builds a complete JDK image. A good target to use if you want to build a JDK for general usage or if you want to test something closer to the shipping product. This can also be a good target to use if doing something which might have a build aspect to it. | 70 | | `-image` | Build just the image for any of jdk, test, docs, symbols, etc. | 71 | | `reconfigure` | Re-runs the configure script with the same arguments as given the last time. | 72 | | `demos` | Builds the demos which for instance make it easy to test something UI related. | 73 | | `docs` | Builds the javadoc. Note that a number of classes in the javadoc API are generated during the build, so `make docs` might do more than simply invoke `javadoc`, depending on the state of your build. | 74 | | `java.base` | Builds the base module. You can (re)build any module with `make `. | 75 | | `hotspot` | Builds the JVM. Note that the JVM depends on several other parts of the JDK, so `make hotspot` might build more than just the JVM, depending on the state of your build. | 76 | | `clean` | Removes all files generated by make, but not those generated by configure. Useful when doing significant renaming or refactoring which may confuse the incremental build. To clean out a specific module only use `make clean-`. | 77 | | `dist-clean` | Removes all files, including configuration. | 78 | 79 | There are many other targets available as well. Use `make help` to find out more. 80 | 81 | ::: {.box} 82 | [To the top](#){.boxheader} 83 | ::: 84 | -------------------------------------------------------------------------------- /src/guide/cloning-the-jdk.md: -------------------------------------------------------------------------------- 1 | # Cloning the JDK 2 | 3 | ::: {.box} 4 | [Quick Links]{.boxheader} 5 | 6 | * [OpenJDK Mainline GitHub project](https://github.com/openjdk/jdk) 7 | * [Skara Documentation](https://wiki.openjdk.org/display/SKARA) 8 | ::: 9 | 10 | After the initial release of the JDK source code into OpenJDK in 2007 the OpenJDK project moved from TeamWare to using Mercurial. Starting in 2019 the source revision control has been moved to Git. The complete source code for the JDK is today hosted at [GitHub](https://github.com). You can browse the code directly in the [openjdk/jdk repository](https://github.com/openjdk/jdk), or download the code for offline browsing, editing, and building using `git clone`. 11 | 12 | $ git clone https://github.com/openjdk/jdk.git 13 | 14 | `openjdk/jdk` is the mainline JDK development repository where the next major release of the JDK is being developed. Other [Projects](https://openjdk.org/bylaws#project) have their own repositories on [GitHub](https://github.com/openjdk). 15 | 16 | ::: {.note} 17 | Note that source may be available from other locations, for example `src.zip` from a full JDK distribution. However, OpenJDK contributions must use source from the appropriate [OpenJDK GitHub repository](https://github.com/openjdk) since other source distributions may contain older code or code which differs due to licensing. Consult the Project's documentation or [mailing lists] to determine the appropriate repository, development conventions, and helpful tools. 18 | ::: 19 | 20 | If you intend to contribute patches, you should first *fork* the repository on [GitHub](https://github.com) and clone your own *personal fork* as shown below. To fork a [Project](https://openjdk.org/bylaws#project) on [GitHub](https://github.com), go to the GitHub Project page and click the 'Fork' button in the upper right corner, then follow the on screen instructions. 21 | 22 | This is the typical development model: 23 | 24 | ::: {style="text-align:center;"} 25 | ~~~{.mermaid caption="Diagram of upstream repos and user's clone" format=svg theme=neutral} 26 | graph TD 27 | subgraph GitHub 28 | upstream(openjdk/jdk) 29 | fork(OpenDuke/jdk) 30 | end 31 | upstream --> |fork| fork 32 | fork --> |clone| local(local) 33 | local --> |push| fork 34 | fork --> |PR| upstream 35 | ~~~ 36 | ::: 37 | 38 | Pushes to your personal fork can be made either using HTTPS or SSH. These examples assume you have an SSH key installed on [GitHub](https://github.com). If this is the first time you clone your personal fork of an OpenJDK repository you may want to create an SSH key to use with it. See [Generating an SSH key] below. Once you have your personal fork and an SSH key to go with it, go ahead and clone. 39 | 40 | $ git clone git@github.com:OpenDuke/jdk.git 41 | $ cd jdk 42 | $ git remote add upstream https://github.com/openjdk/jdk.git 43 | 44 | In the example above Duke cloned his personal fork of the JDK mainline repository using SSH. You should of course use your own [GitHub](https://github.com) username instead. Then, by adding a new *remote* named 'upstream', the clone is associated with [openjdk/jdk](https://github.com/openjdk/jdk). Doing this will allow the tooling to automatically create a PR on [openjdk/jdk](https://github.com/openjdk/jdk) whenever a change is pushed to the personal fork. The way that works is that once the change has been pushed to the personal fork, and you navigate to the [openjdk/jdk](https://github.com/openjdk/jdk) repository on [GitHub](https://github.com), there will be a message saying that you just pushed a change and asking if you want to create a PR. 45 | 46 | ## Working with git branches 47 | 48 | It is **strongly** recommended to always create a new branch for any change you intend to implement. If your PR gets accepted, it will be squashed and pushed by the OpenJDK bots. This means that if you make changes to your `master` branch, it will diverge from the upstream `master` branch. This in turn means that your repo will forever be out of sync with the upstream repo, which will cause merge conflicts every single time you want to update your repo from upstream. Having a separate branch for each change also means that you can easily work on many different changes in parallel in the same code repository. Unless you know what you are doing, the recommendation is also to always base your new branch on the `master` branch. 49 | 50 | $ git switch -c JDK-8272373 master 51 | 52 | Here we create a new branch called `JDK-8272373` based on the `master` branch and set the repository up to work in that new branch. 53 | 54 | If you intend to work on a backport to a feature release stabilization branch, your new local branch should of course be based on the stabilization branch instead of `master`. 55 | 56 | $ git switch -c JDK-8272373 jdk23 57 | 58 | `git switch` was introduced in Git version 2.23. For earlier versions of Git `git checkout` can be used instead. However it is always recommended to use the latest versions of all your tools when possible. 59 | 60 | ::: {.note} 61 | More information about how to work with git and the dedicated tooling that is available for OpenJDK can be found in the [Project Skara Documentation](https://wiki.openjdk.org/display/SKARA). If you're new to git you can also read more about how to work with it in one of the many fine git tutorials available on the Internet. For instance the [Pro Git book](https://git-scm.com/book/en/v2). This guide doesn't aspire to become another git guide. 62 | ::: 63 | 64 | ## Generating an SSH key 65 | 66 | For security reasons you should always create new keys and use different keys with each repository you clone. The `ssh-keygen` command generates an SSH key. The `-t` option determines which type of key to create. `ed25519` is recommended. `-C` is used to add a comment in the key file, to help you remember which key it is. While it’s possible to use SSH without a passphrase, this is **strongly discouraged**. Empty or insecure passphrases may be reset using `ssh-keygen -p`; this doesn’t change the keys. 67 | 68 | $ ssh-keygen -t ed25519 -C openjdk-jdk -f ~/.ssh/openjdk-jdk 69 | Generating public/private ed25519 key pair. 70 | Enter passphrase (empty for no passphrase): 71 | Enter same passphrase again: 72 | Your identification has been saved in /Users/duke/.ssh/openjdk-jdk. 73 | Your public key has been saved in /Users/duke/.ssh/openjdk-jdk.pub. 74 | The key fingerprint is: 75 | SHA256:WS4jCQMtat75ZEue+so+Lgj7V/sdMtj1FTNkfNsCfHA openjdk-jdk 76 | The key's randomart image is: 77 | +--[ED25519 256]--+ 78 | | .. ..oE | 79 | | ... o+o .| 80 | | . .o . o+.o| 81 | |.. o . + .=.| 82 | |o . . o S o .. | 83 | |.. o +.+ + . . | 84 | |o. *.+.+ . . | 85 | |o....=. + . | 86 | | .=B=. .. . | 87 | +----[SHA256]-----+ 88 | 89 | `~/.ssh/openjdk-jdk` is a text file containing your private ssh key. There's a corresponding public key in `~/.ssh/openjdk-jdk.pub` (as detailed in the example above). You should **never** share your private key. The *public* key on the other hand should be uploaded to [GitHub](https://github.com). Follow the steps below to do that. 90 | 91 | * Go to the GitHub settings for your account by choosing "Settings" in the menu by your avatar in the upper right corner 92 | * Go to "SSH and GPG keys" 93 | * Click "New SSH key" 94 | * Title "OpenJDK" (or something else appropriate) 95 | * Paste the content of `~/.ssh/openjdk-jdk.pub` into the text field 96 | * To get the content of the file you can for instance use `cat ~/.ssh/openjdk-jdk.pub` 97 | * It will look something like this: `ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO8+egiIgWV+tE7LVVJmlR7WS2Lr3Fj7dXVo9HiasD6T openjdk-jdk` 98 | * Click "Add SSH key" 99 | 100 | Now you are ready to clone your [openjdk/jdk](https://github.com/openjdk/jdk) fork using SSH. 101 | 102 | ::: {.box} 103 | [To the top](#){.boxheader} 104 | ::: 105 | -------------------------------------------------------------------------------- /src/guide/code-conventions.md: -------------------------------------------------------------------------------- 1 | # Code Conventions 2 | 3 | ::: {.box} 4 | [Quick Links]{.boxheader} 5 | 6 | * [Java Code Conventions](https://www.oracle.com/technetwork/java/codeconvtoc-136057.html) 7 | * [HotSpot C++ Code Conventions](https://github.com/openjdk/jdk/blob/master/doc/hotspot-style.md) 8 | ::: 9 | 10 | ::: {.box} 11 | [To the top](#){.boxheader} 12 | ::: 13 | -------------------------------------------------------------------------------- /src/guide/code-owners.md: -------------------------------------------------------------------------------- 1 | # Code Owners 2 | 3 | This list is intended to make it easier to identify which email list to include in code reviews when making changes in different areas. The list may also help when assigning bugs based on which code they are found in. Please note that some directories may have been created or removed between releases. The intention here is to include directories that exists in mainline, LTS releases and other releases (post JDK 9) commonly being updated. 4 | 5 | ## Area mailing lists 6 | 7 | * Generic JDK Development: [`jdk-dev`](https://mail.openjdk.org/mailman/listinfo/jdk-dev) 8 | * Build: [`build-dev`](https://mail.openjdk.org/mailman/listinfo/build-dev) 9 | * Client Libs: [`client-libs-dev`](https://mail.openjdk.org/mailman/listinfo/client-libs-dev) 10 | * Core Libs: [`core-libs-dev`](https://mail.openjdk.org/mailman/listinfo/core-libs-dev) 11 | * Net: [`net-dev`](https://mail.openjdk.org/mailman/listinfo/net-dev) 12 | * NIO: [`nio-dev`](https://mail.openjdk.org/mailman/listinfo/nio-dev) 13 | * I18n: [`i18n-dev`](https://mail.openjdk.org/mailman/listinfo/i18n-dev) 14 | * HotSpot: [`hotspot-dev`](https://mail.openjdk.org/mailman/listinfo/hotspot-dev) 15 | * Compiler: [`hotspot-compiler-dev`](https://mail.openjdk.org/mailman/listinfo/hotspot-compiler-dev) 16 | * GC: [`hotspot-gc-dev`](https://mail.openjdk.org/mailman/listinfo/hotspot-gc-dev) 17 | * Runtime: [`hotspot-runtime-dev`](https://mail.openjdk.org/mailman/listinfo/hotspot-runtime-dev) 18 | * JFR: [`hotspot-jfr-dev`](https://mail.openjdk.org/mailman/listinfo/hotspot-jfr-dev) 19 | * Serviceability: [`serviceability-dev`](https://mail.openjdk.org/mailman/listinfo/serviceability-dev) 20 | * Java Language (javac): [`compiler-dev`](https://mail.openjdk.org/mailman/listinfo/compiler-dev) 21 | * Security: [`security-dev`](https://mail.openjdk.org/mailman/listinfo/security-dev) 22 | * Tools 23 | * Javadoc: [`javadoc-dev`](https://mail.openjdk.org/mailman/listinfo/javadoc-dev) 24 | * JShell: [`kulla-dev`](https://mail.openjdk.org/mailman/listinfo/kulla-dev) 25 | * Nashorn: [`nashorn-dev`](https://mail.openjdk.org/mailman/listinfo/nashorn-dev) 26 | 27 | ## Directory to area mapping 28 | 29 | * [.jcheck](https://github.com/openjdk/jdk/tree/master/.jcheck) - Build 30 | * [bin](https://github.com/openjdk/jdk/tree/master/bin) - Build 31 | * [demo](https://github.com/openjdk/jdk/tree/master/src/demo) - Client Libs 32 | * [doc](https://github.com/openjdk/jdk/tree/master/doc) 33 | * [hotspot](https://github.com/openjdk/jdk/tree/master/src/hotspot) 34 | * [cpu](https://github.com/openjdk/jdk/tree/master/src/hotspot/cpu) - Compiler, Runtime 35 | * [os](https://github.com/openjdk/jdk/tree/master/src/hotspot/os) - Runtime 36 | * [os_cpu](https://github.com/openjdk/jdk/tree/master/src/hotspot/os_cpu) - Compiler 37 | * [share](https://github.com/openjdk/jdk/tree/master/src/hotspot/share) 38 | * [adlc](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/adlc) - Compiler 39 | * [asm](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/asm) - Runtime 40 | * [c1](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/c1) - Compiler 41 | * [cds](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/cds) - Runtime 42 | * [ci](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/ci) - Compiler 43 | * [classfile](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/classfile) - Runtime 44 | * [code](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/code) - Compiler 45 | * [compiler](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/compiler) - Compiler 46 | * [gc](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/gc) - GC 47 | * [include](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/include) - HotSpot 48 | * [interpreter](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/interpreter) - Runtime 49 | * [jfr](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/jfr) - JFR 50 | * [jvmci](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/jvmci) - Compiler 51 | * [libadt](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/libadt) - Compiler 52 | * [logging](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/logging) - Runtime 53 | * [memory](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/memory) - GC, Runtime 54 | * [metaprogramming](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/metaprogramming) - HotSpot 55 | * [nmt](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/nmt) - Runtime 56 | * [oops](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/oops) - GC, Runtime 57 | * [opto](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/opto) - Compiler 58 | * [precompiled](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/precompiled) - HotSpot 59 | * [prims](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/prims) - Runtime, Serviceability 60 | * [runtime](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/runtime) - Runtime 61 | * [sanitizers](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/sanitizers) - Runtime 62 | * [services](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/services) - Runtime 63 | * [utilities](https://github.com/openjdk/jdk/tree/master/src/hotspot/share/utilities) - GC, Runtime 64 | * [java.base](https://github.com/openjdk/jdk/tree/master/src/java.base) 65 | * Core Libs should almost always be included but Java Language, HotSpot, Security and/or I18n may also be involved. 66 | * [[aix](https://github.com/openjdk/jdk/tree/master/java.base/aix/classes), [linux](https://github.com/openjdk/jdk/tree/master/java.base/linux/classes), [macosx](https://github.com/openjdk/jdk/tree/master/java.base/macosx/classes), [share](https://github.com/openjdk/jdk/tree/master/java.base/share/classes), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/classes), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/classes)]/classes 67 | * [com/sun/crypto](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/com/sun/crypto) - Security 68 | * [com/sun/security](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/com/sun/security) - Security 69 | * [crypto](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/javax/crypto) - Security 70 | * [[aix](https://github.com/openjdk/jdk/tree/master/java.base/aix/classes/jdk/internal), [linux](https://github.com/openjdk/jdk/tree/master/java.base/linux/classes/jdk/internal), [macosx](https://github.com/openjdk/jdk/tree/master/java.base/macosx/classes/jdk/internal), [share](https://github.com/openjdk/jdk/tree/master/java.base/share/classes/jdk/internal), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/classes/jdk/internal), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/classes/jdk/internal)]/internal 71 | * [access](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/access) - Core Libs, Security 72 | * [event](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/event) - JFR 73 | * [foreign](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/foreign) - Core Libs 74 | * [icu](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/icu) - Core Libs 75 | * [io](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/io) - Core Libs 76 | * [javac](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/javac) - Java Language (javac) 77 | * [jimage](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/jimage) - Core Libs 78 | * [jmod](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/jmod) - Core Libs 79 | * [jrtfs](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/jrtfs) - Core Libs 80 | * [[aix](https://github.com/openjdk/jdk/tree/master/java.base/aix/classes/jdk/internal/loader), [macosx](https://github.com/openjdk/jdk/tree/master/java.base/macosx/classes/jdk/internal/loader), [share](https://github.com/openjdk/jdk/tree/master/java.base/share/classes/jdk/internal/loader), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/classes/jdk/internal/loader), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/classes/jdk/internal/loader)]/loader - Core Libs 81 | * [logger](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/logger) - Core Libs 82 | * [math](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/math) - Core Libs 83 | * [[share](https://github.com/openjdk/jdk/tree/master/java.base/share/classes/jdk/internal/misc), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/classes/jdk/internal/misc), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/classes/jdk/internal/misc)]/misc - Core Libs, HotSpot 84 | * [module](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/module) - Core Libs 85 | * [org/objectweb](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/org/objectweb) - Core Libs 86 | * [org/xml](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/org/xml) - Core Libs 87 | * [perf](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/perf) - Runtime 88 | * [[linux](https://github.com/openjdk/jdk/tree/master/java.base/linux/classes/jdk/internal/platform), [share](https://github.com/openjdk/jdk/tree/master/java.base/share/classes/jdk/internal/platform), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/classes/jdk/internal/platform), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/classes/jdk/internal/platform)]/platform - HotSpot 89 | * [ref](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/ref) - Core Libs, GC 90 | * [reflect](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/reflect) - Core Libs 91 | * [util/random](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/util/random) - Core Libs 92 | * [util/regex](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/util/regex) - Core Libs 93 | * [util/xml](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/util/xml) - Core Libs 94 | * [vm](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/jdk/internal/vm) - HotSpot 95 | * [invoke](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/sun/invoke) - Core Libs 96 | * [[share](https://github.com/openjdk/jdk/tree/master/java.base/share/classes/java/io), [sun](https://github.com/openjdk/jdk/tree/master/java.base/windows/classes/sun/io), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/classes/java/io)]/io - Core Libs 97 | * [[macosx](https://github.com/openjdk/jdk/tree/master/java.base/macosx/classes/java), [share](https://github.com/openjdk/jdk/tree/master/java.base/share/classes/java), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/classes/java), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/classes/java)]/java 98 | * [[share](https://github.com/openjdk/jdk/tree/master/java.base/share/classes/java/lang), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/classes/java/lang), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/classes/java/lang)]/lang - Core Libs 99 | * [math](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/java/math) - Core Libs 100 | * [time](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/java/time) - Core Libs 101 | * [launcher](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/sun/launcher) - Tools, Core Libs 102 | * [META-INF/services](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/META-INF/services) - Core Libs 103 | * [[javax](https://github.com/openjdk/jdk/tree/master/java.base/share/classes/javax/net), [macosx](https://github.com/openjdk/jdk/tree/master/java.base/macosx/classes/java/net)]/net - Net 104 | * [[aix](https://github.com/openjdk/jdk/tree/master/java.base/aix/classes/sun/nio), [java](https://github.com/openjdk/jdk/tree/master/java.base/share/classes/java/nio), [linux](https://github.com/openjdk/jdk/tree/master/java.base/linux/classes/sun/nio), [macosx](https://github.com/openjdk/jdk/tree/master/java.base/macosx/classes/sun/nio), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/classes/sun/nio), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/classes/sun/nio)]/nio - NIO 105 | * [reflect](https://github.com/openjdk/jdk/tree/master/src/java.base/share/classes/sun/reflect) - Core Libs 106 | * [[apple](https://github.com/openjdk/jdk/tree/master/java.base/macosx/classes/apple/security), [java](https://github.com/openjdk/jdk/tree/master/java.base/share/classes/java/security), [javax](https://github.com/openjdk/jdk/tree/master/java.base/share/classes/javax/security), [macosx](https://github.com/openjdk/jdk/tree/master/java.base/macosx/classes/apple/security), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/classes/sun/security), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/classes/sun/security)]/security - Security 107 | * [[java](https://github.com/openjdk/jdk/tree/master/java.base/share/classes/java/text), [sun](https://github.com/openjdk/jdk/tree/master/java.base/share/classes/sun/text)]/text - I18n 108 | * [[java](https://github.com/openjdk/jdk/tree/master/java.base/share/classes/java/util), [macosx](https://github.com/openjdk/jdk/tree/master/java.base/macosx/classes/sun/util), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/classes/sun/util)]/util - I18n, Core Libs 109 | * [[aix](https://github.com/openjdk/jdk/tree/master/java.base/aix/conf), [share](https://github.com/openjdk/jdk/tree/master/java.base/share/conf), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/conf), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/conf)]/conf 110 | * [sdp](https://github.com/openjdk/jdk/tree/master/src/java.base/unix/conf/sdp) - Net 111 | * [security](https://github.com/openjdk/jdk/tree/master/src/java.base/share/conf/security) - Security 112 | * [[share](https://github.com/openjdk/jdk/tree/master/java.base/share/legal), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/legal)]/legal 113 | * [[share](https://github.com/openjdk/jdk/tree/master/java.base/share/lib/security), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/lib/security)]/lib/security - Security 114 | * [man](https://github.com/openjdk/jdk/tree/master/src/java.base/share/man) 115 | * [java.1](https://github.com/openjdk/jdk/tree/master/src/src/java.base/share/man/java.1) - Tools, HotSpot 116 | * [keytool.1](https://github.com/openjdk/jdk/tree/master/src/src/java.base/share/man/keytool.1) - Security 117 | * [[aix](https://github.com/openjdk/jdk/tree/master/java.base/aix/native), [linux](https://github.com/openjdk/jdk/tree/master/java.base/linux/native), [macosx](https://github.com/openjdk/jdk/tree/master/java.base/macosx/native), [share](https://github.com/openjdk/jdk/tree/master/java.base/share/native), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/native), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/native)]/native 118 | * [common](https://github.com/openjdk/jdk/tree/master/src/java.base/windows/native/common) 119 | * [[share](https://github.com/openjdk/jdk/tree/master/java.base/share/native/include), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/native/include), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/native/include)]/include - Runtime, Core Libs 120 | * [jspawnhelper](https://github.com/openjdk/jdk/tree/master/src/java.base/unix/native/jspawnhelper) - Tools 121 | * [[share](https://github.com/openjdk/jdk/tree/master/java.base/share/native/launcher), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/native/launcher), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/native/launcher)]/launcher - Tools 122 | * [[aix](https://github.com/openjdk/jdk/tree/master/java.base/aix/native/libjava), [linux](https://github.com/openjdk/jdk/tree/master/java.base/linux/native/libjava), [macosx](https://github.com/openjdk/jdk/tree/master/java.base/macosx/native/libjava), [share](https://github.com/openjdk/jdk/tree/master/java.base/share/native/libjava), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/native/libjava), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/native/libjava)]/libjava - Core Libs 123 | * [[share](https://github.com/openjdk/jdk/tree/master/java.base/share/native/libjimage), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/native/libjimage), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/native/libjimage)]/libjimage - Core Libs 124 | * [[aix](https://github.com/openjdk/jdk/tree/master/java.base/aix/native/libjli), [macosx](https://github.com/openjdk/jdk/tree/master/java.base/macosx/native/libjli), [share](https://github.com/openjdk/jdk/tree/master/java.base/share/native/libjli), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/native/libjli), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/native/libjli)]/libjli - Tools, Core Libs 125 | * [libjsig](https://github.com/openjdk/jdk/tree/master/src/java.base/unix/native/libjsig) - HotSpot 126 | * [[macosx](https://github.com/openjdk/jdk/tree/master/java.base/macosx/native/libnet), [share](https://github.com/openjdk/jdk/tree/master/java.base/share/native/libnet), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/native/libnet), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/native/libnet)]/libnet - Net 127 | * [[aix](https://github.com/openjdk/jdk/tree/master/java.base/aix/native/libnio), [linux](https://github.com/openjdk/jdk/tree/master/java.base/linux/native/libnio), [macosx](https://github.com/openjdk/jdk/tree/master/java.base/macosx/native/libnio), [share](https://github.com/openjdk/jdk/tree/master/java.base/share/native/libnio), [unix](https://github.com/openjdk/jdk/tree/master/java.base/unix/native/libnio), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/native/libnio)]/libnio - NIO 128 | * [libosxsecurity](https://github.com/openjdk/jdk/tree/master/src/java.base/macosx/native/libosxsecurity) - Security 129 | * [[aix](https://github.com/openjdk/jdk/tree/master/java.base/aix/native/libsyslookup), [share](https://github.com/openjdk/jdk/tree/master/java.base/share/native/libsyslookup), [windows](https://github.com/openjdk/jdk/tree/master/java.base/windows/native/libsyslookup)]/libsyslookup - Core Libs 130 | * [libverify](https://github.com/openjdk/jdk/tree/master/src/java.base/share/native/libverify) - Runtime 131 | * [libzip](https://github.com/openjdk/jdk/tree/master/src/java.base/share/native/libzip) - Core Libs 132 | * [share/data](https://github.com/openjdk/jdk/tree/master/src/java.base/share/data) 133 | * [blockedcertsconverter](https://github.com/openjdk/jdk/tree/master/src/java.base/share/data/blockedcertsconverter) - Security 134 | * [cacerts](https://github.com/openjdk/jdk/tree/master/src/java.base/share/data/cacerts) - Security 135 | * [currency](https://github.com/openjdk/jdk/tree/master/src/java.base/share/data/currency) - I18n 136 | * [lsrdata](https://github.com/openjdk/jdk/tree/master/src/java.base/share/data/lsrdata) - I18n 137 | * [publicsuffixlist](https://github.com/openjdk/jdk/tree/master/src/java.base/share/data/publicsuffixlist) - Client Libs 138 | * [tzdata](https://github.com/openjdk/jdk/tree/master/src/java.base/share/data/tzdata) - I18n 139 | * [unicodedata](https://github.com/openjdk/jdk/tree/master/src/java.base/share/data/unicodedata) - I18n 140 | * [java.compiler](https://github.com/openjdk/jdk/tree/master/src/java.compiler) - Java Language (javac) 141 | * [java.datatransfer](https://github.com/openjdk/jdk/tree/master/src/java.datatransfer) - Client Libs 142 | * [java.desktop](https://github.com/openjdk/jdk/tree/master/src/java.desktop) - Client Libs 143 | * [java.instrument](https://github.com/openjdk/jdk/tree/master/src/java.instrument) - Serviceability 144 | * [java.logging](https://github.com/openjdk/jdk/tree/master/src/java.logging) - Core Libs 145 | * [java.management](https://github.com/openjdk/jdk/tree/master/src/java.management) - Serviceability 146 | * [java.management.rmi](https://github.com/openjdk/jdk/tree/master/src/java.management.rmi) - Serviceability 147 | * [java.naming](https://github.com/openjdk/jdk/tree/master/src/java.naming) - Core Libs 148 | * [java.net.http](https://github.com/openjdk/jdk/tree/master/src/java.net.http) - Net 149 | * [java.prefs](https://github.com/openjdk/jdk/tree/master/src/java.prefs) - Core Libs 150 | * [java.rmi](https://github.com/openjdk/jdk/tree/master/src/java.rmi) - Core Libs 151 | * [java.scripting](https://github.com/openjdk/jdk/tree/master/src/java.scripting) - Tools 152 | * [java.se](https://github.com/openjdk/jdk/tree/master/src/java.se) - Core Libs 153 | * [java.security.jgss](https://github.com/openjdk/jdk/tree/master/src/java.security.jgss) - Security 154 | * [java.security.sasl](https://github.com/openjdk/jdk/tree/master/src/java.security.sasl) - Security 155 | * [java.smartcardio](https://github.com/openjdk/jdk/tree/master/src/java.smartcardio) - Security 156 | * [java.sql](https://github.com/openjdk/jdk/tree/master/src/java.sql) - Core Libs 157 | * [java.sql.rowset](https://github.com/openjdk/jdk/tree/master/src/java.sql.rowset) - Core Libs 158 | * [java.transaction.xa](https://github.com/openjdk/jdk/tree/master/src/java.transaction.xa) - Core Libs 159 | * [java.xml](https://github.com/openjdk/jdk/tree/master/src/java.xml) - Core Libs 160 | * [java.xml.crypto](https://github.com/openjdk/jdk/tree/master/src/java.xml.crypto) - Security 161 | * [jdk.accessibility](https://github.com/openjdk/jdk/tree/master/src/jdk.accessibility) - Client Libs 162 | * [jdk.attach](https://github.com/openjdk/jdk/tree/master/src/jdk.attach) - Serviceability 163 | * [jdk.charsets](https://github.com/openjdk/jdk/tree/master/src/jdk.charsets) - I18n, Core Libs 164 | * [jdk.compiler](https://github.com/openjdk/jdk/tree/master/src/jdk.compiler) - Java Language (javac) 165 | * [jdk.crypto.cryptoki](https://github.com/openjdk/jdk/tree/master/src/jdk.crypto.cryptoki) - Security 166 | * [jdk.crypto.ec](https://github.com/openjdk/jdk/tree/master/src/jdk.crypto.ec) - Security 167 | * [jdk.crypto.mscapi](https://github.com/openjdk/jdk/tree/master/src/jdk.crypto.mscapi) - Security 168 | * [jdk.dynalink](https://github.com/openjdk/jdk/tree/master/src/jdk.dynalink) - Tools 169 | * [jdk.editpad](https://github.com/openjdk/jdk/tree/master/src/jdk.editpad) - JShell 170 | * [jdk.graal.compiler](https://github.com/openjdk/jdk/tree/master/src/jdk.graal.compiler) - Compiler 171 | * [jdk.graal.compiler.management](https://github.com/openjdk/jdk/tree/master/src/jdk.graal.compiler.management) - Compiler 172 | * [jdk.hotspot.agent](https://github.com/openjdk/jdk/tree/master/src/jdk.hotspot.agent) - Serviceability 173 | * [jdk.httpserver](https://github.com/openjdk/jdk/tree/master/src/jdk.httpserver) - Net 174 | * [jdk.incubator.vector](https://github.com/openjdk/jdk/tree/master/src/jdk.incubator.vector) - Compiler 175 | * [jdk.internal.ed](https://github.com/openjdk/jdk/tree/master/src/jdk.internal.ed) - JShell 176 | * [jdk.internal.jvmstat](https://github.com/openjdk/jdk/tree/master/src/jdk.internal.jvmstat) - Serviceability 177 | * [jdk.internal.le](https://github.com/openjdk/jdk/tree/master/src/jdk.internal.le) - JShell 178 | * [jdk.internal.opt](https://github.com/openjdk/jdk/tree/master/src/jdk.internal.opt) - Tools 179 | * [jdk.internal.vm.ci](https://github.com/openjdk/jdk/tree/master/src/jdk.internal.vm.ci) - Compiler 180 | * [jdk.jartool](https://github.com/openjdk/jdk/tree/master/src/jdk.jartool) - Tools 181 | * [jdk.javadoc](https://github.com/openjdk/jdk/tree/master/src/jdk.javadoc) - Javadoc 182 | * [jdk.jcmd](https://github.com/openjdk/jdk/tree/master/src/jdk.jcmd) - Serviceability 183 | * [jdk.jconsole](https://github.com/openjdk/jdk/tree/master/src/jdk.jconsole) - Serviceability 184 | * [jdk.jdeps](https://github.com/openjdk/jdk/tree/master/src/jdk.jdeps) - Core Libs 185 | * [jdk.jdi](https://github.com/openjdk/jdk/tree/master/src/jdk.jdi) - Serviceability 186 | * [jdk.jdwp.agent](https://github.com/openjdk/jdk/tree/master/src/jdk.jdwp.agent) - Serviceability 187 | * [jdk.jfr](https://github.com/openjdk/jdk/tree/master/src/jdk.jfr) - JFR 188 | * [jdk.jlink](https://github.com/openjdk/jdk/tree/master/src/jdk.jlink) - Tools 189 | * [jdk.jpackage](https://github.com/openjdk/jdk/tree/master/src/jdk.jpackage) - Core Libs 190 | * [jdk.jshell](https://github.com/openjdk/jdk/tree/master/src/jdk.jshell) - JShell 191 | * [jdk.jsobject](https://github.com/openjdk/jdk/tree/master/src/jdk.jsobject) - Tools 192 | * [jdk.jstatd](https://github.com/openjdk/jdk/tree/master/src/jdk.jstatd) - Serviceability 193 | * [jdk.localedata](https://github.com/openjdk/jdk/tree/master/src/jdk.localedata) - I18n 194 | * [jdk.management](https://github.com/openjdk/jdk/tree/master/src/jdk.management) - Serviceability 195 | * [jdk.management.agent](https://github.com/openjdk/jdk/tree/master/src/jdk.management.agent) - Serviceability 196 | * [jdk.management.jfr](https://github.com/openjdk/jdk/tree/master/src/jdk.management.jfr) - Runtime 197 | * [jdk.naming.dns](https://github.com/openjdk/jdk/tree/master/src/jdk.naming.dns) - Core Libs 198 | * [jdk.naming.rmi](https://github.com/openjdk/jdk/tree/master/src/jdk.naming.rmi) - Core Libs 199 | * [jdk.net](https://github.com/openjdk/jdk/tree/master/src/jdk.net) - Net 200 | * [jdk.nio.mapmode](https://github.com/openjdk/jdk/tree/master/src/jdk.nio.mapmode) - NIO 201 | * [jdk.sctp](https://github.com/openjdk/jdk/tree/master/src/jdk.sctp) - Net 202 | * [jdk.security.auth](https://github.com/openjdk/jdk/tree/master/src/jdk.security.auth) - Security 203 | * [jdk.security.jgss](https://github.com/openjdk/jdk/tree/master/src/jdk.security.jgss) - Security 204 | * [jdk.unsupported](https://github.com/openjdk/jdk/tree/master/src/jdk.unsupported) - Core Libs 205 | * [jdk.unsupported.desktop](https://github.com/openjdk/jdk/tree/master/src/jdk.unsupported.desktop) - Client Libs 206 | * [jdk.xml.dom](https://github.com/openjdk/jdk/tree/master/src/jdk.xml.dom) - Core Libs 207 | * [jdk.zipfs](https://github.com/openjdk/jdk/tree/master/src/jdk.zipfs) - Core Libs 208 | * [make](https://github.com/openjdk/jdk/tree/master/make) - Build 209 | * [test](https://github.com/openjdk/jdk/tree/master/test) 210 | * The test directories follow to a large part the same structure as the source code in `src`. The owners are the same for directories with the same names. 211 | * [utils](https://github.com/openjdk/jdk/tree/master/src/utils) 212 | 213 | ### Directories removed 214 | 215 | * hotspot 216 | * `*.jdk` – Compiler (Removed in [10](https://bugs.openjdk.org/browse/JDK-8187443)) 217 | * share 218 | * `aot` – Compiler (Removed in [17](https://bugs.openjdk.org/browse/JDK-8263327)) 219 | * `shark` – Compiler (Removed in [10](https://bugs.openjdk.org/browse/JDK-8171853)) 220 | * `trace` – Runtime (Removed in [11](https://bugs.openjdk.org/browse/JDK-8199712)) 221 | * java.base 222 | * man 223 | * `jfr.1` – Runtime (Removed in [16](https://bugs.openjdk.org/browse/JBS-8252113)) 224 | * `jdk.aot` – Compiler (Removed in [17](https://bugs.openjdk.org/browse/JDK-8263327)) 225 | * `jdk.crypto.ucrypto` – Security (Removed in [12](https://bugs.openjdk.org/browse/JDK-8241787)) 226 | * only available on Solaris 227 | * `jdk.incubator.concurrent` – Core Libs (Removed in [21](https://bugs.openjdk.org/browse/JDK-8306647)) 228 | * `jdk.internal.vm.compiler` – Compiler (Removed in [22](https://bugs.openjdk.org/browse/JDK-8318027)) 229 | * `jdk.internal.vm.compiler.management` – Compiler (Removed in [22](https://bugs.openjdk.org/browse/JDK-8318027)) 230 | * `jdk.pack` – Tools (Removed in [14](https://bugs.openjdk.org/browse/JDK-8234596)) 231 | * `jdk.random` – Core Libs (Removed in [23](https://bugs.openjdk.org/browse/JDK-8330005)) 232 | * `jdk.rmic` – Core Libs (Removed in [15](https://bugs.openjdk.org/browse/JDK-8225319)) 233 | * `jdk.scripting.nashorn` – Tools (Removed in [15](https://bugs.openjdk.org/browse/JDK-8236933)) 234 | * `jdk.scripting.nashorn.shell` – Tools (Removed in [15](https://bugs.openjdk.org/browse/JDK-8236933)) 235 | 236 | ::: {.box} 237 | [To the top](#){.boxheader} 238 | ::: 239 | -------------------------------------------------------------------------------- /src/guide/contributing-to-an-open-jdk-project.md: -------------------------------------------------------------------------------- 1 | # Contributing to an OpenJDK Project 2 | 3 | Contributing to OpenJDK can take many forms. Writing code and providing patches is just one of them. A big part of developing a feature or a bugfix is testing and code review. Anything you can do to help out in these areas will be recognized as a contribution. Join the [mailing lists] to engage in design discussions and reviews, and download the latest EA builds or Project repositories to try out new features and give feedback. If you see some misbehavior, or if you see somebody mention some misbehavior on some internet forum, try to track it down. Good bug reports with reproducible test cases are extremely valuable and make excellent contributions. 4 | 5 | Anything you can do to spread the word about Java, new features, and your experiences using the JDK will be helpful for the community and to the OpenJDK developers. Trying out a new feature and reporting your experiences is also a contribution. Whether you find that the new feature improves your application, or if you find some area that needs to be improved, your feedback is valuable to the developers of that feature. 6 | 7 | If you have a success story where Java solved your problem, or if you successfully upgraded to a more recent version of the JDK and noticed some improvements, spreading this story through a blog, news article, or some other channel is also a contribution. 8 | 9 | If you're in a position to choose what programming language to use in a project, in a tutorial, or in a class, you have the power to enlarge the Java community in a very direct way, and your colleagues or students will get an opportunity to learn one of the most used programming languages in the world. 10 | 11 | ## Things to consider before proposing changes to OpenJDK code 12 | 13 | Every change to JDK code carries a risk of changes in behavior which may adversely affect applications. Generally we're looking to improve the functionality and capability and sometimes performance of the platform without that negative consequence. So we need to ask ourselves whether each change is worthwhile - and some may not be no matter how well intentioned. 14 | 15 | One question to ask yourself is: **What problem are you trying to solve?** 16 | 17 | The important thing here is to understand the problem itself, independent of any solution (and independently of the solution that currently happens to be in your change). A number of other questions and lines of thought emanate from thinking about the problem. For example: is this the right problem to solve? Does solving this problem create worse problems elsewhere; that is, is there a net benefit? Does this problem need to be solved in the JDK, or can and should it be solved elsewhere (e.g., in tooling)? 18 | 19 | The next question you need to answer before making any change is: **What is the main intention of your change?** 20 | 21 | Depending on your answer to that question you will need to consider one or more of the following paragraphs. 22 | 23 | * **Correctness** -- If your change improves program correctness, that's important. And to broaden this, fixing of all kinds of bugs that really make things better for applications in ways they can detect is important. 24 | 25 | * **Robustness** -- Updating code to use a newer platform API can be a good change. Moving away from APIs that are being deprecated or that are no longer maintained is likely desired. Do note though that supposedly equivalent APIs may not be the drop in replacement you think they are. You'll need to prove that the code has the same behavior after the change through extensive testing. 26 | 27 | * **Security** -- If you intend to increase the overall security of the platform, changes following secure coding practices and using appropriate platform APIs for that are usually welcome. The exception might be if it's a potentially destabilizing change in code where there's only a theoretical problem. **Please note**: If you think you found a real security bug that might compromise the platform you should follow the process [here](https://openjdk.org/groups/vulnerability/report). 28 | 29 | * **Refactoring / Cleanup** -- Making code easier to understand or reducing code size may be a good change in areas that are under active development. Stable code however isn't a good candidate for refactoring regardless of what the code looks like. The OpenJDK has evolved over many years and some parts have been stable for decades. If there's no immediate need to work on the code for other reasons, then what will a cleanup actually achieve? One specific area where refactoring and cleanups are explicitly discouraged is in third-party code. 30 | 31 | * **Performance** -- Can you demonstrate a user perceptible change? If you can't measure the change, or a user can't notice the change, or the change only improves code that is used infrequently, then maybe it isn't worth it. Do you have benchmarks to back up your claims? Do you understand the results? Performance testing is complex and often there are many factors unrelated to your change that affects the numbers. What's the tradeoff? The performance improvements that just make everything better do exist, but they are extremely rare. Most often the code gets more complex, or you speed up one case but slow down another. Are you making the right tradeoff? 32 | 33 | * **Modernizing** -- Changing code purely for the sake of using a new language feature isn't usually a good change. Be a subject matter expert, not just a language expert. Writing code in "a better way" is not guaranteed to be safe. A change of behavior is always possible and unless you understand the code you are changing at more than the core language/API level, and have looked into appropriate tests and can speak to the risks, then you should first find a subject matter expert to discuss it with. Keep in mind that the OpenJDK code is developed by a large community. If a new language feature is introduced, all developers working in that code must learn this new feature and understand the implications of using it. 34 | 35 | ## I have a patch, what do I do? 36 | 37 | ::: {.box} 38 | [Quick Links]{.boxheader} 39 | 40 | * [Oracle Contributor Agreement (OCA)](https://www.oracle.com/technical-resources/oracle-contributor-agreement.html) 41 | * [OCA Signatories List](https://oca.opensource.oracle.com/?ojr=contrib-list) 42 | * [OpenJDK Legal Documents](https://openjdk.org/legal/) 43 | * [JDK Bug System (JBS)](https://bugs.openjdk.org/) 44 | * [OpenJDK Project Roles](https://openjdk.org/bylaws#project-roles) 45 | ::: 46 | 47 | In many GitHub projects the standard way to propose a change is to create a pull request (PR) and discuss the patch in the PR. For [OpenJDK Projects](https://openjdk.org/bylaws#project) the situation is somewhat different. The JDK is used for mission critical applications and by millions of developers, the bar to contributing changes is high. Please follow the steps outlined below to make sure your change passes above the bar before creating a PR. 48 | 49 | ### 1. Sign the OCA 50 | 51 | Like many other open-source communities, the OpenJDK Community requires Contributors to jointly assign their copyright on contributed code. [Oracle](https://www.oracle.com) is the steward of OpenJDK and if you haven't yet signed the [Oracle Contributor Agreement](https://oca.opensource.oracle.com/) (OCA), and are not covered by a company-level agreement, then please do so. This is required in order to make your patch available for review. The OCA gives [Oracle](https://www.oracle.com) and you as a Contributor joint copyright interests in the code. You will retain your copyright while also granting those rights to [Oracle](https://www.oracle.com). If you don't know if your organization has signed the OCA you can check the [OCA Signatories List](https://oca.opensource.oracle.com/?ojr=contrib-list), or ask your legal advisor. 52 | 53 | When you sign the OCA, please make sure that you specify your GitHub user name in the `Username` field of the OCA. If you try to create a PR before you have signed the OCA, or if you didn't specify your GitHub user name, you'll get instructions telling you to do so, and the PR won't be published until this is done. OCA registration is a manual process. Please allow for up to several days to have your OCA application processed, even though it's normally processed swiftly. An alphabetical list of all of the assigned OpenJDK usernames can be found on the [OpenJDK people](https://db.openjdk.org/people) list. 54 | 55 | You only need to sign the OCA once in order to cover all changes that you might contribute to any Oracle-sponsored open-source community. If you've already signed the OCA or the former SCA (Sun Contributor Agreement) for any Oracle-sponsored open-source community, then you do not need to sign it again in order to contribute to OpenJDK. Please note that you don't need to sign an OCA if you work at Oracle or a company which has negotiated an equivalent agreement. 56 | 57 | ### 2. Socialize your change 58 | 59 | Once the OCA is signed, please restrain your urge to create a PR just a little while longer. In order to prepare the community for your patch, please socialize your idea on the relevant [mailing lists]. Almost all changes, and in particular any API changes, must go this route and have a broad agreement in place before there is any point in presenting code. To understand the criteria by which your patch is going to be judged, please read [Why is My Change Rejected?] below. In short, hidden constraints and assumptions, stability and quality, maintainability, compatibility, and conformance to specifications must be considered before your PR is ready to be submitted. If you don't understand the constraints for acceptance, you might be surprised when your PR is rejected. 60 | 61 | Please note that lack of engagement should not be interpreted as supporting the proposal. Lack of engagement might be better interpreted as people are busy or maybe that the problem isn't compelling or high priority enough to spend time on right now. If you didn't get the desired attention and the required agreement in your mail thread, **do not** proceed to create a PR. 62 | 63 | ### 3. Find a Sponsor 64 | 65 | Socializing your change on the mailing lists also prevents the surprise that would otherwise make the community choke on their morning coffee when they see a huge patch in a new, unknown PR. As a new developer in the community you'll need to make a few friends that agree with your change. There are many good reasons to make friends, but the one relevant here is that for your first changes you'll need a [Sponsor](https://openjdk.org/bylaws#sponsor) to facilitate the integration of your work. The [Sponsor](https://openjdk.org/bylaws#sponsor) will perform any number of administrative tasks like JBS updates, additional testing, etc. It's usual for a [Sponsor](https://openjdk.org/bylaws#sponsor) to also be a reviewer of a change and thus familiar with it, but it's not a requirement. 66 | 67 | ### 4. Create a tracking issue in JBS 68 | 69 | Many [OpenJDK Projects](https://openjdk.org/bylaws#project) require a tracking issue to be filed in the [JDK Bug System (JBS)](https://bugs.openjdk.org/) before a change can be integrated. This is the case for instance for the JDK and the JDK Updates Projects. In order to obtain write access to JBS you need to be an [Author](https://openjdk.org/bylaws#author) in an [OpenJDK Project](https://openjdk.org/bylaws#project) (see [Becoming an Author]). For your first changes, ask your [Sponsor](https://openjdk.org/bylaws#sponsor) to help you create the issue or file the bug through the [Bug Report Tool](https://bugreport.java.com/). 70 | 71 | ### 5. Get acquainted with local process 72 | 73 | Even though we strive to unify how things are done within OpenJDK, different areas and [Projects](https://openjdk.org/bylaws#project) in OpenJDK may have slight variations in how they work. Some of these differences are highlighted throughout this guide, some aren't. If you're new to an area, make sure you understand local differences before you proceed. Ask your [Sponsor](https://openjdk.org/bylaws#sponsor) who should be your main point of contact through your first developer experience in OpenJDK. 74 | 75 | ## Why is my change rejected? 76 | 77 | ::: {.box} 78 | [Quick Links]{.boxheader} 79 | 80 | * [Java Language and Virtual Machine Specifications](https://docs.oracle.com/javase/specs/) 81 | * [Java API Specification](https://docs.oracle.com/en/java/javase/15/docs/api/index.html) 82 | * [CSR Process](https://wiki.openjdk.org/display/csr/Main) 83 | ::: 84 | 85 | Just about every Java developer out there has an idea or two for how to enhance something. And believe it or not, not every idea is a good idea. Even though many ideas are indeed good, we must be quite restrictive on what we actually include into the JDK. The goal is not to take in the maximum number of contributions possible, but rather to accept only the highest-quality contributions. The JDK is used daily by millions of people and thousands of businesses, often in mission-critical applications, and so every change must be scrutinized in detail. There are many reasons for this. 86 | 87 | * **Hidden constraints and assumptions** -- Many sections of code have constraints and assumptions that aren't necessarily visible at first glance. This might preclude certain changes, even those that might seem obvious. 88 | 89 | * **Stability and quality** -- The JDK is used by millions of developers and as a widely deployed commercial product, it's held to a high standard of quality. Changes should include tests where practical, and core tests should pass at all times. The value of the change should outweigh the risk of introducing a bug or performance regression. 90 | 91 | * **Maintainability** -- Any new feature or code change will need to be maintained in the JDK essentially forever, thus imposing a maintenance burden on future maintainers. The code might still be in use long after you and the people who reviewed it have moved on. New maintainers must be able to understand how to fix bugs in this code. 92 | 93 | * **Complexity** -- Each new feature interacts with all the existing features, which can result in geometric growth of the interactions among features if features are added unchecked. Sometimes we avoid adding a new feature, even if it seems like an obvious thing to add, if that feature would make it difficult to add a more important feature in the future. 94 | 95 | * **Adherence to specifications** -- Much of the JDK is governed by a series of specifications, in particular the [Java Language Specification](https://docs.oracle.com/javase/specs/), the [Java Virtual Machine Specification](https://docs.oracle.com/javase/specs/), and the [Java API Specification](https://docs.oracle.com/en/java/javase/15/docs/api/index.html) ("javadocs"). All changes must be checked and tested carefully to ensure that they don't violate these specifications. 96 | 97 | * **Javadoc comments are specifications** -- The Java API Specification is authored in the form of javadoc comments, so even apparently innocuous changes to comments can be quite significant. It's not always easy to tell what comments are part of the specification and what parts are merely code comments. Briefly, documentation comments on public packages, classes, and class members of exported modules are specifications. 98 | 99 | * **Specification changes** -- It's possible to change the API specifications, and this is done regularly. However, these changes require even more scrutiny than code changes. This extra review is handled by the [CSR Process](https://wiki.openjdk.org/display/csr/Main). Specifications are written in stylized, somewhat formal language, and they don't simply describe what the code does. Writing specifications is a separate skill from coding. 100 | 101 | * **Compatibility** -- Changes should also adhere to high standards of binary, source, and behavioral compatibility. The compatibility impact of apparently innocuous changes is sometimes startling. 102 | 103 | For reasons like these it’s quite possible that your change, even though it adds value to you, isn’t deemed to add enough value to the larger community. 104 | 105 | If you're relatively new to the Java platform then we recommend that you gain more experience writing Java applications before you attempt to work on the JDK itself. The purpose of the sponsored-contribution process is to bring developers who already have the skills required to work on the JDK into the existing development community. The members of this community have neither the time nor the patience required to teach basic Java programming skills or platform implementation techniques. 106 | 107 | The feature releases currently under development are in the JDK Project. Most development work is focused on the newest release, so generally you should be working against the latest JDK sources rather than the JDK Updates sources. 108 | 109 | ::: {.box} 110 | [To the top](#){.boxheader} 111 | ::: 112 | -------------------------------------------------------------------------------- /src/guide/header.md: -------------------------------------------------------------------------------- 1 | % OpenJDK Developers' Guide 2 | -------------------------------------------------------------------------------- /src/guide/hotspot-development.md: -------------------------------------------------------------------------------- 1 | # HotSpot Development 2 | 3 | See [Working With Pull Requests] for generic guidance and requirements around integrating changes. For the HotSpot codebase there are a few additional requirements: 4 | 5 | * Your change must have been approved by two reviewers out of which at least one is also a [Reviewer](https://openjdk.org/bylaws#reviewer) 6 | * Your change must have passed through HotSpot tier 1 testing with zero failures (See tier1 definition in `test/hotspot/jtreg/TEST.groups`.) 7 | 8 | ## Logging 9 | 10 | ::: {.box} 11 | [Quick Links]{.boxheader} 12 | 13 | * [JEP 158: Unified JVM Logging](https://openjdk.org/jeps/158) 14 | ::: 15 | 16 | While developing your fix, you might want your code to output some diagnostic information. You might even want to leave some logging in the code you check in, to facilitate future diagnostics. The appropriate way to print logging output from HotSpot is through the [Unified Logging Framework (JEP 158)](https://openjdk.org/jeps/158). It gives you a lot of nice features and enables common command-line options for all logging. 17 | 18 | A basic log message can be output like this: 19 | 20 | ~~~c++ 21 | log_info(gc, marking)("Mark Stack Usage: " SIZE_FORMAT "M", _mark_stack_usage / M); 22 | ~~~ 23 | 24 | Where 'gc' and 'marking' are tags, and 'info' is the log level. Tags associate log messages with certain subsystems or features and the log level determines the importance and verbosity of the message. The most verbose output is trace, and the least is error. The full list of tags and levels are available via `-Xlog:help`. 25 | 26 | The basic log API looks as follows: 27 | 28 | ~~~c++ 29 | log_(Tag1[,...])(fmtstr, ...) 30 | ~~~ 31 | 32 | Sometimes single line printf-style logging isn't enough. For example, it can be useful to group several log lines together or to use HotSpot's outputstream API. UL supports both of these use cases using `LogMessage` and `LogStream`, respectively. 33 | 34 | ~~~c++ 35 | LogMessage(gc, marking) lm; 36 | if (lm.is_info()) { 37 | lm.info("We are guaranteed to be"); 38 | lm.info(" grouped together"); 39 | } 40 | ~~~ 41 | 42 | `LogMessage` will submit its output when it goes out of scope. 43 | 44 | `LogStream` is typically used when a single printf-style format string becomes unwieldy. 45 | 46 | ~~~c++ 47 | LogStream st(Log(gc, marking)::info()); 48 | if (st.is_enabled()) { 49 | // Print without newline 50 | st.print("I'm printing a lot of %s ", "arguments"); 51 | st.print("With a lot of extra info %d ", 3); 52 | // Print with newline (cr stands for carriage return) 53 | st.print_cr("and so it's useful to use a stream"); 54 | } 55 | ~~~ 56 | 57 | If you need to print multiple lines grouped together with complex formatting requirements then `NonInterleavingLogStream` is probably what you want. 58 | 59 | ~~~c++ 60 | LogMessage(gc) lm; 61 | NonInterleavingLogStream st{LogLevelType::Info, lm}; 62 | if (st.is_enabled()) { 63 | st.print_cr("Line one: %d %d %d ", 1, 2, 3); 64 | st.print("Line two: %d %d %d", 4, 5, 6); 65 | st.print_cr(" still line two: %d %d %d", 7, 8, 9); 66 | } 67 | ~~~ 68 | 69 | ### Enabling logging 70 | 71 | You enable logging in the JVM by using the `-Xlog` command line option specified. For example, the messages from the examples would be visible if the JVM were run with any of the following options: 72 | 73 | ~~~ 74 | -Xlog:gc+marking=info 75 | -Xlog:gc+marking 76 | -Xlog:gc* 77 | ~~~ 78 | 79 | You can have multiple `-Xlog` options, these are applied in an additive manner. Consider this example: 80 | 81 | ~~~ 82 | -Xlog:gc+marking=info:stdout -Xlog:alloc=warning:stderr -Xlog:breakpoint=error:breakpoint.txt:level 83 | ~~~ 84 | 85 | This specifies that: 86 | 87 | 1. Log messages with info level and up, with tags gc and marking, to stdout. 88 | 2. Log messages with warning level and up, with tag alloc, to stderr. 89 | 3. Log messages with error level and up, with tag breakpoint, to file breakpoint.txt, with the decorator level. 90 | 91 | UL automatically applies a default argument of `-Xlog:all=warning:stdout:uptime,level,tags` when logging is enabled. This can be disabled by prepending `-Xlog:disable` to your arguments. 92 | 93 | ~~~ 94 | -Xlog:disable -Xlog:gc+marking=info -Xlog:alloc=warning 95 | ~~~ 96 | 97 | Starting the JVM with the option `-Xlog:help` outputs more information and more examples. 98 | 99 | A full description of the syntax of `-Xlog` is available in [JEP 158](https://openjdk.org/jeps/158). 100 | 101 | ::: {.box} 102 | [To the top](#){.boxheader} 103 | ::: 104 | -------------------------------------------------------------------------------- /src/guide/introduction.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | Welcome to the OpenJDK Developers' Guide! 4 | 5 | The OpenJDK Community is the place to collaborate on open-source implementations of the Java Platform, Standard Edition, and related [Projects](https://openjdk.org/bylaws#project). It was created in November 2006, when initial portions of the JDK source code were published under the GPLv2 license. 6 | 7 | In order to work together efficiently, clear directions are sometimes needed to avoid misconceptions and to align developers' views of terminology and process. The OpenJDK Community is a fairly pragmatic place. "Do the right thing" is most often the right course of action. Still, if people do things in the same right way then everyone's work becomes more transparent and easier for others to follow. For this reason most parts of the development process have standard flows that are the recommended ways to do things. 8 | 9 | The goal of this guide is to answer questions that developers of the JDK might have around development process, tooling, standards, and so forth. The formal rules and processes are described in other documents, such as [JEP 1](https://openjdk.org/jeps/1) for the JDK Enhancement-Proposal & Roadmap Process, and [JEP 3](https://openjdk.org/jeps/3) for the JDK Release Process. This guide is meant to be a complement to such documents, with tutorials and examples for how to follow these rules and how to work together with the rest of the OpenJDK Community. 10 | 11 | There are many common use cases that aren't detailed in the formal process. This guide suggests how to work in such cases. 12 | 13 | ## OpenJDK 14 | 15 | ::: {.box} 16 | [Quick Links]{.boxheader} 17 | 18 | * [OpenJDK Groups](https://openjdk.org/bylaws#group) 19 | * [OpenJDK Projects](https://openjdk.org/bylaws#project) 20 | * [OpenJDK General Roles (Participant, Contributor, Member)](https://openjdk.org/bylaws#general-roles) 21 | * [OpenJDK Project Roles (Author, Committer, Reviewer)](https://openjdk.org/bylaws#project-roles) 22 | ::: 23 | 24 | OpenJDK consists of a number of [Groups](https://openjdk.org/bylaws#group). Members of a [Group](https://openjdk.org/bylaws#group) collaborate on an area of mutual interest. The right hand side bar on the [OpenJDK website](https://openjdk.org/) has a list of all [Groups](https://openjdk.org/bylaws#group) in OpenJDK. If you're interested in a specific area, this is where you would start your OpenJDK experience. Look at the [Group's](https://openjdk.org/bylaws#group) information and wiki pages, and see what [Projects](https://openjdk.org/bylaws#project) they sponsor on the [Census page](https://openjdk.org/census). The [Census](https://openjdk.org/census) shows the structure of the OpenJDK Community. 25 | 26 | [Projects](https://openjdk.org/bylaws#project) are where the coding and much of the other work is done in OpenJDK. There are many different [Projects](https://openjdk.org/bylaws#project), some produce shippable artifacts, like the [JDK Project](https://openjdk.org/projects/jdk/), some produce tools to be used by developers of these artifacts, like the [Code Tools Project](https://openjdk.org/projects/code-tools/) or [Project Skara](https://openjdk.org/projects/skara/), and some produce documentation, like the [Developers' Guide Project](https://openjdk.org/projects/guide/). Many [Projects](https://openjdk.org/bylaws#project) designs and develops new features for the Java language or the JVM, but there are also less code centric ones like the [Duke Project](https://openjdk.org/projects/duke/) which collects images of the Java mascot, Duke. 27 | 28 | ## Author, Committer, Reviewer 29 | 30 | OpenJDK has a few different roles that determine who has the right to do what in the different [Projects](https://openjdk.org/bylaws#project). These roles are defined in the [OpenJDK Bylaws](https://openjdk.org/bylaws#project-roles). The roles are earned based on experience and knowledge within each [Project](https://openjdk.org/bylaws#project). 31 | 32 | A [Contributor](https://openjdk.org/bylaws#contributor) can have different roles in different [Projects](https://openjdk.org/bylaws#project). When you're new to a [Project](https://openjdk.org/bylaws#project) you don't yet have a formal role in that specific [Project](https://openjdk.org/bylaws#project), even though you might have earned roles in other [OpenJDK Projects](https://openjdk.org/bylaws#project) or have been recognized as a [Contributor](https://openjdk.org/bylaws#contributor) or a [Member](https://openjdk.org/bylaws#openjdk-member) of OpenJDK. By contributing high-quality content you'll soon be eligible for [OpenJDK roles](https://openjdk.org/bylaws#project-roles) in the [Project](https://openjdk.org/bylaws#project). First [Author](https://openjdk.org/bylaws#author), then [Committer](https://openjdk.org/bylaws#committer), and finally [Reviewer](https://openjdk.org/bylaws#reviewer) if you stay active and earn the trust of the community. Trust is an important part of earning these roles. There's a [rough guideline](https://openjdk.org/projects/) saying that to become a [Committer](https://openjdk.org/bylaws#committer) you should have contributed 8 significant changes, and to become a [Reviewer](https://openjdk.org/bylaws#reviewer) you should have contributed 32 significant changes. In reality it's not as easy as "just" contributing code. You need to build a track record of good decisions and sound judgment and show that you know what differentiates a good change from a not so good one. It's not only correctness of the code that matters, it's also the appropriateness. In the end the trust you've earned is put to the test through a vote. 33 | 34 | Note that when a new [Project](https://openjdk.org/bylaws#project) is created an initial set of members can be brought in at different levels without a vote. 35 | 36 | ### Becoming an Author 37 | 38 | Becoming an [Author](https://openjdk.org/bylaws#author) is the first step. To achieve this you need to contribute two changes to the [Project](https://openjdk.org/bylaws#project) in which you wish to become an [Author](https://openjdk.org/bylaws#author). Once your changes are integrated into the code base and has been vetted enough to determine that the changes were indeed good changes you can go ahead and send an email to the Project lead of that particular [Project](https://openjdk.org/bylaws#project) and ask to be added as an [Author](https://openjdk.org/bylaws#author). Note that "the [Project](https://openjdk.org/bylaws#project)" is not OpenJDK, but rather the specific [development Project](https://openjdk.org/bylaws#project) where you did your contributions (e.g. "JDK", "JDK Updates", "Amber", etc). The [OpenJDK Project description](https://openjdk.org/projects/#project-author) has a template for such an email. In short the email should contain your name, the Project name, your email address, and GitHub links to your changes. In response to your email you will get a time-limited invite which you should fill out. 39 | 40 | To see who the Project lead is for your [Project](https://openjdk.org/bylaws#project), see the [OpenJDK Census](https://openjdk.org/census). The [Census](https://openjdk.org/census) unfortunately doesn't provide email addresses for people, but assuming you have been active on the Project mailing list (since you are applying for [Author](https://openjdk.org/bylaws#author) after all), you should be able to find the lead's email address in your local email archive, or ask your [Sponsor](https://openjdk.org/bylaws#sponsor). 41 | 42 | As an [Author](https://openjdk.org/bylaws#author) you will get your OpenJDK user name. Once you have gotten the user name, this should be associated with your GitHub account in order for the bots to be able to identify you on [GitHub](http://www.github.com). See the [Skara documentation](https://wiki.openjdk.org/display/SKARA#Skara-AssociatingyourGitHubaccountandyourOpenJDKusername) for more details on that. Once that's done you can create PRs and get them reviewed, but you'll still need a [Sponsor](https://openjdk.org/bylaws#sponsor) to integrate changes. You'll also get write access to [JBS](#jbs---jdk-bug-system) and the [OpenJDK wiki](https://wiki.openjdk.org) related to the [Project](https://openjdk.org/bylaws#project) in question, and to [cr.openjdk.org](https://cr.openjdk.org) via an SSH key provided at the time you accept your invitation. 43 | 44 | The rules of any particular [Project](https://openjdk.org/bylaws#project) may have different guidelines regarding requirements for Authorship at the discretion of the Lead. 45 | 46 | ### Becoming a Committer 47 | 48 | To become a [Committer](https://openjdk.org/bylaws#committer) you should show that you intend to actively contribute to the [Project](https://openjdk.org/bylaws#project) and that you can produce non-trivial changes that are accepted for inclusion into the Project code base. The number eight has been seen as a formal lower limit on the number of changes, but since the changes must be non-trivial, or "significant" as the [OpenJDK Project description](https://openjdk.org/projects/) says, and the definition of significant is subjective, the general recommendation is to wait with a [Committer](https://openjdk.org/bylaws#committer) nomination until there's at least 10-12 changes integrated to have some margin for different interpretations of "significant". In practice though, we have seen several examples where the number of significant changes hasn't been the dominating factor in a [Committer](https://openjdk.org/bylaws#committer) vote. A [Contributor's](https://openjdk.org/bylaws#contributor) work in another [OpenJDK Project](https://openjdk.org/bylaws#project) may also be relevant for the vote. What the vote should ultimately test is the [Contributor's](https://openjdk.org/bylaws#contributor) commitment to the [OpenJDK Project](https://openjdk.org/bylaws#project) for which the vote applies - is it believed that the person is dedicated and willing to spend time and effort on the [Project](https://openjdk.org/bylaws#project)? Is the person believed to be a good citizen of the [Project](https://openjdk.org/bylaws#project)? It's always a good idea to seek the advice of a [Sponsor](https://openjdk.org/bylaws#sponsor) who can guide you through the process to becoming a [Committer](https://openjdk.org/bylaws#committer) - you will need one to run the Committer vote anyway. They will probably also have a better idea of what constitutes a "significant" change. 49 | 50 | Once you have the required changes, a [Committer](https://openjdk.org/bylaws#committer) in the [Project](https://openjdk.org/bylaws#project) can start a vote by sending an email proposing that you should become a [Committer](https://openjdk.org/bylaws#committer). The email should follow the template found in the [OpenJDK Project description](https://openjdk.org/projects/#project-committer). 51 | 52 | A [Committer](https://openjdk.org/bylaws#committer) is allowed to integrate changes without the aid of a [Sponsor](https://openjdk.org/bylaws#sponsor). A [Committer](https://openjdk.org/bylaws#committer) is also allowed to nominate other non-Committers to become [Committers](https://openjdk.org/bylaws#committer) in the [Project](https://openjdk.org/bylaws#project). 53 | 54 | ### Becoming a Reviewer 55 | 56 | To become a [Reviewer](https://openjdk.org/bylaws#reviewer) you must show a track record of sound and correct judgment calls as mentioned above. Being a good [Committer](https://openjdk.org/bylaws#committer) doesn't necessarily make you a good [Reviewer](https://openjdk.org/bylaws#reviewer). As a [Reviewer](https://openjdk.org/bylaws#reviewer) you have the power to approve changes for inclusion into the Project source code. This means that a [Reviewer](https://openjdk.org/bylaws#reviewer) needs to be able to judge the quality and appropriateness of any proposed change, not just the mechanics of the code. 57 | 58 | The assumption is that after having produced 32 significant changes one should have become familiar with the process around reviews and the requirements around getting a change approved. This should really be seen as a minimum requirement though. A more practical consideration would be to look at whether the non-trivial commits of a potential [Reviewer](https://openjdk.org/bylaws#reviewer) are accepted largely intact or whether they are always being refined by the review process. There may be cases where it will take significantly more than 32 changes for a [Committer](https://openjdk.org/bylaws#committer) to be ready to become a [Reviewer](https://openjdk.org/bylaws#reviewer). 59 | 60 | Once you are deemed ready, a [Reviewer](https://openjdk.org/bylaws#reviewer) in the [Project](https://openjdk.org/bylaws#project) can start a vote by sending an email proposing that you should become a [Reviewer](https://openjdk.org/bylaws#reviewer). The email should follow the template found in the [OpenJDK Project description](https://openjdk.org/projects/#project-reviewer). 61 | 62 | ### Non-trivial/Significant changes 63 | 64 | One key definition when advancing through the OpenJDK roles is the significant change. What exactly does it take for a change to be significant? 65 | 66 | Instead of describing the significant change (because that's quite difficult to define) provided here is a few examples of changes that wouldn't be considered significant or for other reasons wouldn't count as significant contributions. 67 | 68 | * Purely aesthetic changes like renaming or fixing indentation 69 | * Repeated follow-up bugfixes from earlier changes 70 | * Larger changes where only a non-significant portion of the work was done by the [Contributor](https://openjdk.org/bylaws#contributor) under vote 71 | * Trivial backports of someone else's changes 72 | 73 | ::: {.box} 74 | [To the top](#){.boxheader} 75 | ::: 76 | -------------------------------------------------------------------------------- /src/guide/mailing-lists.md: -------------------------------------------------------------------------------- 1 | # Mailing Lists 2 | 3 | ::: {.box} 4 | [Quick Links]{.boxheader} 5 | 6 | * [OpenJDK Mailing Lists Manager](https://mail.openjdk.org/mailman/listinfo) 7 | ::: 8 | 9 | The mailing lists are the key communications mechanism for all OpenJDK work. All participation in an [OpenJDK Project](https://openjdk.org/bylaws#project) starts with joining the relevant mailing list. A subscriber to an OpenJDK mailing list is referred to as a [Participant](https://openjdk.org/bylaws#participant) in the [Bylaws](https://openjdk.org/bylaws). As a general recommendation we suggest to subscribe to [announce](https://mail.openjdk.org/mailman/listinfo/announce), [discuss](https://mail.openjdk.org/mailman/listinfo/discuss), and the `-dev` lists covering your explicit area of interest. All OpenJDK mailing lists are found here: 10 | 11 | > [`mail.openjdk.org`](https://mail.openjdk.org/mailman/listinfo) 12 | 13 | :::{.note} 14 | Please note that OpenJDK mailing lists typically are for discussions about the **development** of the JDK, not its usage. This is not a place to ask support questions. If you think you found an issue in or with the JDK, see [JBS - JDK Bug System] for instructions on reporting it. 15 | ::: 16 | 17 | The OpenJDK Community is a friendly place. To keep it that way it's important to keep a professional tone in emails and be aware that the community is global. Many different people with different backgrounds collaborate in these lists. Even though English is the required language for all lists, many Participants speak other languages as their native language. A high tolerance for non-perfect English is expected from anyone joining these lists. You're also strongly encouraged to use your real name on the mailing lists. This adds to the professional tone of your email. Postings from anonymized mailboxes risk being seen as spam. If you do work in OpenJDK on behalf of your employer, please also list this affiliation. If your GitHub username differs from your real name it's also a good idea to include that to identify yourself and your actions on [GitHub](https://github.com). 18 | 19 | You must be a member of a list to be able to post to that list. Some lists are moderated to keep the content on topic. Each list has its own archive where you can browse older conversations on the list. 20 | 21 | There are a few different types of lists. The list name has two parts to explain what the list is intended for, `-`. The name often refers to the [Project](https://openjdk.org/bylaws#project) that owns the list or a specific area of interest that the list focuses on. The suffix is explained below. Not all [Projects](https://openjdk.org/bylaws#project) or areas have all types of lists described here. 22 | 23 | > `-dev` 24 | > : Technical discussions around the implementation of the Project artifacts. This is also where code reviews happen. 25 | 26 | > `-use` 27 | > : Technical discussions around the usage of the Project artifacts. 28 | 29 | > `-discuss` 30 | > : General discussions around the [Project](https://openjdk.org/bylaws#project). The special case `discuss@openjdk.org` is used for general discussions around OpenJDK. Discussions around new Project proposals usually happen here. 31 | 32 | > `-changes` 33 | > : Changeset notifications from the source code repositories maintained by the [Project](https://openjdk.org/bylaws#project). 34 | 35 | > `-announce` 36 | > : General Project announcements. These lists are tightly moderated and are expected to be low traffic. The special case `announce@openjdk.org` is used for announcements for OpenJDK. 37 | 38 | > `-experts` 39 | > : Expert group discussions. The list is restricted; only members of the expert group can subscribe. 40 | 41 | > `-observers` 42 | > : Open for anyone to subscribe to see what the experts are discussing and potentially to have some dialog with other non-experts. There is no guarantee that an expert is subscribed to the `-observers` list or will see any responses on that list. 43 | 44 | > `-comments` 45 | > : Used by observers to directly provide feedback/comments to the experts (typically a lead will process the comments list and forward things on to the experts list). 46 | 47 | ## Changing your email address 48 | 49 | If you need to change your registered email address, or if you have any other problems with the mailing lists, please contact [mailman@openjdk.org](mailto:mailman@openjdk.org). 50 | 51 | ::: {.box} 52 | [To the top](#){.boxheader} 53 | ::: 54 | -------------------------------------------------------------------------------- /src/guide/making-a-change.md: -------------------------------------------------------------------------------- 1 | # Making a Change 2 | 3 | ::: {.box} 4 | [Quick Links]{.boxheader} 5 | 6 | * [CSR Wiki](https://wiki.openjdk.org/display/csr/Main) 7 | ::: 8 | 9 | In case you jumped directly here and skipped reading the earlier sections of this guide, please keep in mind that there's a lot more to it than just making a change in the code and submit a PR to GitHub. The list below shows the bare minimum required before a change can be accepted into OpenJDK. 10 | 11 | #. **Discuss the intended change** -- See [Contributing to an OpenJDK Project] 12 | #. **Make sure an issue id exists for the work** -- See [Filing an issue] 13 | #. **Initiate a CSR request if your change have a compatibility impact** -- See [Working with the CSR] 14 | #. **Fix the issue** -- See [Cloning the JDK], [Working with git branches], and [Building the JDK] 15 | #. **Write regression tests and run relevant regression and unit tests on all relevant platforms** -- See [Testing the JDK] 16 | #. **Create a changeset** -- See [Working With Pull Requests] 17 | #. **Update the bug content** -- See [Updating an issue while fixing] 18 | #. **Request a review of the changes** -- See [Life of a PR] 19 | #. **Merge with the latest upstream changes and test again** 20 | #. **Integrate the changeset** -- See [Working With Pull Requests] 21 | #. **Write a release note if appropriate** -- See [Release Notes] 22 | 23 | ## Working with the CSR 24 | 25 | Changes that have a compatibility impact will require a separate approval besides the code review. This is handled through a [Compatibility and Specification Review](https://wiki.openjdk.org/display/csr/Main), a.k.a. CSR. Compatibility impact can be things like requiring a specification change, directly affect an external interface, changing command line options, or otherwise alter the behavior of the JDK in ways that could cause issues for users when upgrading to the next JDK version. 26 | 27 | See the [CSR wiki](https://wiki.openjdk.org/display/csr/Main) for information on how to work through the CSR process. 28 | 29 | The CSR must be approved before the change is allowed to be integrated to a feature release or update release repository. Feature design and implementation work may begin concurrently with the CSR review, but may need to be modified in response to CSR feedback. 30 | 31 | ## Copyright Headers 32 | 33 | All source code files in OpenJDK has a header with copyright statements and a license. Since this is legal documentation it shall not be updated or modified without seeking guidance from your legal representative. For that reason this guide can't really give detailed information on what you can or should do. There are however a few generic things that can be clarified. 34 | 35 | This is an example copyright/license header: 36 | 37 | ``` 38 | /* 39 | * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. 40 | * Copyright (c) 2018, 2020 SAP SE. All rights reserved. 41 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 42 | * 43 | * This code is free software; you can redistribute it and/or modify it 44 | * under the terms of the GNU General Public License version 2 only, as 45 | * published by the Free Software Foundation. 46 | * 47 | * This code is distributed in the hope that it will be useful, but WITHOUT 48 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 49 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 50 | * version 2 for more details (a copy is included in the LICENSE file that 51 | * accompanied this code). 52 | * 53 | * You should have received a copy of the GNU General Public License version 54 | * 2 along with this work; if not, write to the Free Software Foundation, 55 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 56 | * 57 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 58 | * or visit www.oracle.com if you need additional information or have any 59 | * questions. 60 | */ 61 | ``` 62 | 63 | This header has two copyright notices at the top (Oracle and SAP SE) and below them the license text. 64 | 65 | As stated in the header, don't make changes to the copyright notices or the license text below them. If your affiliation has a copyright notice at the top of the header, consult your legal representative on how to update it. If your affiliation doesn't have a copyright notice, again consult your legal representative to see if you should add one. Do not update a copyright notice if you don't belong to that affiliation unless explicitly asked by the affiliation in question. 66 | 67 | If you create a new file, copy the license text from a nearby file. Do not add copyright notices for affiliations to which you don't belong. 68 | 69 | If you move code from an existing file to a new file, bring the entire copyright + license header over to the new file. 70 | 71 | ## Changes Late in the Release 72 | 73 | You should always aim to get your changes integrated as early in a release as possible to maximize the amount of testing done before release. If you risk running late, it's almost always a better idea to defer the change to the next release rather than trying to squeeze it in in the last minute. The next release is only six months away, the world can wait even though you are eager. 74 | 75 | Integrating during the rampdown phase is not recommended. The bar to integrate a change in the rampdown phase is considerably higher than during the normal development phase. See [The JDK Release Process] for more information. Also note that changes that are made late in the release shouldn't expect localization since this in itself takes some time. 76 | 77 | ::: {.box} 78 | [To the top](#){.boxheader} 79 | ::: 80 | -------------------------------------------------------------------------------- /src/guide/project-maintenance.md: -------------------------------------------------------------------------------- 1 | # Project Maintenance 2 | 3 | Many [OpenJDK Projects](https://openjdk.org/bylaws#project) build on top of the JDK source code for instance to produce new language features, like Projects [Amber](https://openjdk.org/projects/amber/) and [Valhalla](https://openjdk.org/projects/valhalla/). When doing this there are a number of common workflows that are dealt with by most Project maintainers. For instance, updating the codebase (merging) to bring in the latest changes from the upstream JDK Project. 4 | 5 | ## Merging JDK mainline into a Project repository 6 | 7 | Merging changes from one git repository to another is basically the same thing as getting your own changes merged into the Project repository, with the slight twist that you don't write all the changes yourself, you just pull them from somewhere else. 8 | 9 | In this example we'll use a separate clone of the Project repository to perform the merge in. This can be done using branches as well, but let's keep it simple for now. 10 | 11 | ### Init - done once 12 | 13 | First set up your personal fork of the Project repository, in this example called `my-project`. If you already are a [Contributor](https://openjdk.org/bylaws#contributor) to the [Project](https://openjdk.org/bylaws#project) you most likely have this set up. If not, see [Cloning the JDK] for details on how to do that. 14 | 15 | ~~~shell 16 | git clone git@github.com:OpenDuke/my-project.git project-merge 17 | cd project-merge 18 | git remote add upstream git@github.com:openjdk/my-project.git 19 | git remote add mainline git@github.com:openjdk/jdk.git 20 | ~~~ 21 | 22 | We clone the personal fork (in this case we clone OpenDuke's personal fork) into a local directory, here called `project-merge`. We then set up two remotes, `upstream` and `mainline`. 23 | 24 | ### Performing the merge 25 | 26 | The clone we set up above is used each time you want to bring changes from mainline in to your [Project](https://openjdk.org/bylaws#project). This is done by first pulling the changes from mainline and then pushing to your personal fork. A regular PR will then be created which you can integrate into your main Project repository. It sounds easy, and it is, but there are a few details below to keep in mind. 27 | 28 | ~~~shell 29 | cd project-merge 30 | git pull upstream master 31 | git push 32 | git switch -c Merge_mainline 33 | git fetch mainline 34 | ~~~ 35 | 36 | We start by updating the local fork with the latest changes from the main Project repository. Note that we then create a new branch "`Merge_mainline`" in which the merge will happen. Finally we fetch all new changes from mainline. 37 | 38 | Merging from what ever is latest isn't usually a good idea, mainline code is not "clean" for any given commit. Merging JDK tags ensures you have a known quality, those tagged commits are known to compile and pass tests. Therefore, next we check which tags have not been merged yet. 39 | 40 | ~~~shell 41 | git tag -l "jdk-*" --no-merged 42 | ~~~ 43 | 44 | Or if you just want to see the latest tag you haven't merged, 45 | 46 | ~~~shell 47 | git tag -l "jdk-*" --no-merged | tail --lines 1 48 | ~~~ 49 | 50 | Before merging, you may want to check what's incoming, to get an idea of the size of the merge and look for any incoming changes that you suspect may cause issues. 51 | 52 | ~~~shell 53 | git log --topo-order --pretty=oneline --reverse ..$TAG 54 | ~~~ 55 | 56 | And finally we initiate the actual merge. 57 | 58 | ~~~shell 59 | git merge $TAG 60 | ~~~ 61 | 62 | The commands above will likely run without a hitch up until the final `git merge`. This is where you need to combine the changes that were made in mainline with the changes that have been made in your Project repository. If there are no conflicts you're in luck, then the merge will be completely automated and you will end up with a committed merge. If there are conflicts however you'll need to manually go through the files where the conflicts are and make sure you select the correct version for each change. Using `git status` you can see what files that need to be merged. Depending on how much code your [Project](https://openjdk.org/bylaws#project) has touched, this can be quite a bit of work. 63 | 64 | For complicated merges, see [Sharing the work] below. 65 | 66 | ### Test before integration 67 | 68 | Regardless of if you encountered conflicts or not, you should always build and test your merge before integrating it to your Project repository. Testing needs to be done even when there are no textual conflicts as changes like for instance a rename can result in a compile or test error without any conflict. One could argue that `git merge --no-commit` could be used and have logical errors fixed in the merge commit. However, a subsequent "Fix logical merge errors" commit, is in fact more useful, as it clearly shows the Project specific adjustments needed for incoming changes. 69 | 70 | It's always okay to have further commits to clean up after a merge. Hiding a large amount of reworking Project code to fit with upstream changes in a single merge commit will make it hard for further errors post integration to be identified. 71 | 72 | ### The commit, push, and PR 73 | 74 | Once you have a working version of your merged code you're ready to create the merge commit and push. Please note that `git commit` is only needed if there were conflicts. If the changes were successfully merged by `git merge`, you already have a committed merge. 75 | 76 | ~~~ 77 | git commit -m "Merge" 78 | git push --set-upstream origin Merge_mainline 79 | ~~~ 80 | 81 | Now it's time to create the PR on [GitHub](https://github.com). Just opening the PR page in your browser will most often be enough to see a message about new code that was pushed to your personal fork. Click the button to create the PR. 82 | 83 | Make sure the PR title starts with "Merge". You may have noticed that when you integrate a "normal" PR into an OpenJDK repository, all commits that have been done in that PR will be squashed into a single commit. For normal changes this is a good thing as each PR normally corresponds to a single JBS issue, but for a merge it would be highly undesirable to squash all the different commits that you pull in from mainline. A PR with a title that starts with "Merge" won't be squashed. That means that all the changes that you brought over will remain separate changes. 84 | 85 | It's always a good idea to also include what was merged in the title of the PR. If you for instance is pulling in JDK mainline into your Project repository it's likely (because it's in general a good idea) that you choose some stable EA tag in mainline to merge. Your PR title could then be something like "Merge jdk-21+2". 86 | 87 | Whether a merge requires a review or not is up to your Project lead to decide. Many [Projects](https://openjdk.org/bylaws#project) don't require this so the GitHub bots will allow you to integrate the merge as soon as the [GHA](#github-actions)s are done. (They actually allow you to integrate even before the GHAs are done, but that's in general not a good idea.) 88 | 89 | Once the PR has been integrated, you can clean up your fork and its clone in preparation for the next merge. 90 | 91 | ~~~ 92 | git switch master 93 | git branch -d Merge_mainline 94 | git push -d origin Merge_mainline 95 | ~~~ 96 | 97 | These commands will remove the temporary branch that we created to perform the merge. There's a button in the GitHub GUI to delete the branch after you have integrated the PR. This can be used instead of the last of the three commands above (`git push -d...`). 98 | 99 | ### Sharing the work 100 | 101 | When conflicts take place in areas requiring specialized knowledge you may need help from other [Contributors](https://openjdk.org/bylaws#contributor). Backing up the original conflicts will help if you find yourself "in too deep", and need assistance from other [Contributors](https://openjdk.org/bylaws#contributor). You can add and later remove these backups, along with a readme describing the merge status, to the actual merge branch to aid communication (i.e. you may not be able to compile certain components). 102 | 103 | Something like the following shell one-liner can be used to perform the backup. 104 | 105 | ~~~shell 106 | git status | grep "both modified:" | while read B M FILE; do cp -v $FILE $DEST ; done 107 | ~~~ 108 | 109 | Below are two different methods of collaborating on a merge described. Please note that extra commits are fine. The merge PR itself will describe any special actions that were taken in case further failures turn up after merge integration. Ultimately these commits will be squashed when integrating the project back into mainline. 110 | 111 | #### 1. Parking a merge with conflicts in place 112 | 113 | "Park" the conflicts, unresolved, in a personal fork, and let others do the further work (by sending you a patch, or opening your personal fork up to push from other [Contributors](https://openjdk.org/bylaws#contributor)). Do this by keeping a list of unresolved conflicts (perhaps checking in said list to describe the merge state), and then marking them as resolved in git, committing, and pushing them to your personal fork. E.g. `git add $UNRESOLVED_FILES; git commit; git push` 114 | 115 | **Pros:** All unresolved conflicts are stated and can be worked on by multiple parties, all at once. 116 | 117 | **Cons:** Broken branch in terms of compile and test, may require temporary workaround patches to be passed around to complete work on specific unresolved components. 118 | 119 | #### 2. Incremental merging 120 | 121 | An alternative to parking a merge with conflicts in place, is to incrementally merge up to the troublesome point. For example: 122 | 123 | * Perform the initial merge: `git merge $TAG` 124 | * Find yourself in trouble, identify which change is causing the issue. 125 | * Abort: `git merge --abort` 126 | * Find the troublesome change: `git log --topo-order --pretty=oneline --reverse $(current_branch)..$TAG` 127 | * Merge up to the previous change, commit and integrate. 128 | * Ask others to continue the merge from the troubled change forward, how far forward is up you of course, either just that troublesome change, or the rest of the merge up to the $TAG. 129 | * Rinse and repeat: There may appear further conflicts requiring other [Contributors'](https://openjdk.org/bylaws#contributor) help. 130 | 131 | **Pros:** All commits in the merge branch compile and test, you always have a working branch. 132 | 133 | **Cons:** There is an unknown extra amount of merge work, multiple iterations create more work. For instance you may find yourself resolving the same files multiple times (e.g. back-out commits). 134 | 135 | ::: {.box} 136 | [To the top](#){.boxheader} 137 | ::: 138 | -------------------------------------------------------------------------------- /src/guide/release-notes.md: -------------------------------------------------------------------------------- 1 | # Release Notes 2 | 3 | ::: {.box} 4 | [Quick Links]{.boxheader} 5 | 6 | * [JDK Release Notes](https://www.oracle.com/java/technologies/javase/jdk-relnotes-index.html) 7 | * [release-note label description](#release-note) 8 | * [CommonMark Spec](https://spec.commonmark.org/current/) 9 | * [dingus](https://spec.commonmark.org/dingus/) 10 | ::: 11 | 12 | Release notes for a product such as the JDK are part of the release deliverables providing a way to highlight information about a fix, such as when it may have changed behavior, or when it's decided not to fix something. While what should go into a release note isn't something that can be precisely defined, it should describe changes that are important for a user to take into account when they are upgrading to the specific version. While release notes should not duplicate information in other documents, they can serve to highlight that a change has been made. 13 | 14 | Release notes are associated with a JBS issue that has been fixed (or in some cases not been fixed) in a release and are generated with each build of a release. Any note should be considered as an integral part of the fix process, rather than waiting until the end of the release to determine what to write. In OpenJDK, release notes are currently being generated for the JDK and JDK Updates Projects. 15 | 16 | ## Writing a release note 17 | 18 | Writing the release note is the responsibility of the engineer who owns the issue. The note should be generated before the fix is reviewed, or in the case of known issues, when it's determined that a fix won't be possible in the release the issue was found in. 19 | 20 | When writing a release note, be prepared for rather picky review comments about grammar, typos, and wording. This is for the sake of the Java community as a whole, as the language of the release note sets the tone for many blogs and news articles. For a widely used product like the JDK, the release notes are often copied verbatim (including typos) and published to highlight news in the release. This means that we need to take extra care to make sure the text in the release note is correct and follows a similar style. 21 | 22 | The release note itself is written in a [JBS](#jbs---jdk-bug-system) sub-task of the issue that is used to integrate the change. There are a few steps to follow for the release note to find its way from JBS to the actual release note document. 23 | 24 | #. Create a sub-task (More → Create Sub-Task) for the issue that requires a release note - the main issue, that is, the JBS issue that is used to integrate the original change, **not** for backports or the CSR (if there is one). 25 | 26 | #. For the newly created sub-task, follow these steps: 27 | * While the [Priority]{.jbs-field} of the sub-task is set by default to be the same as the priority of the issue itself, it can be changed to adjust in what order the release note is listed compared to other release notes in the same build or release note section. 28 | * Set the [Assignee]{.jbs-field} to the same person who owns the main issue. 29 | * The [Summary]{.jbs-field} should be a one sentence synopsis that is informative (and concise) enough to attract the attention of users, developers, and maintainers who might be impacted by the change. It should succinctly describe what has actually changed, not be the original bug title, nor describe the problem that was being solved. It should read well as a sub-section heading in a document. 30 | * Prefix the [Summary]{.jbs-field} with "Release Note:". 31 | * Enter the text of the release note in the [Description]{.jbs-field} field using markdown formatting, following the [CommonMark specification](https://spec.commonmark.org/current/). While the markdown won't be rendered in JBS, you can use [dingus](https://spec.commonmark.org/dingus/) to see what the release note will look like. Note that [Github style ascii table formatting](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables) is supported but will not display correctly in the dingus page. For more information see [General Conventions for Release Notes] below. 32 | * Set [Component/s]{.jbs-field} and [Subcomponent]{.jbs-field} to the same values as the original bug. 33 | * Set [Affects Version/s]{.jbs-field} to the release versions for which the release note should be published. 34 | * Add the [release-note]{.jbs-label} label. This is required for the release note to be included in the release notes. 35 | * Add the proper [RN-]{.jbs-label}label if applicable to indicate what section of the release notes it should be included in (see [RN-labels] below). 36 | * Set the [Fix Version/s]{.jbs-field} to the same value that the main issue - in almost all cases this will be the version of mainline. 37 | 38 | #. Have the release note ready to be reviewed at the same time as the code is reviewed. If it's later determined that a release note is necessary, then go back to the same engineers who reviewed the fix to review the release note. Special care should be taken when writing a release note that will cover changes related to a vulnerability fix in order to avoid describing technical details of how it could have been exploited. 39 | 40 | #. When you are done, _Resolve_ the release note sub-task as `Delivered`. Only release notes where the sub-task has been resolved as `Delivered` is considered to be part of the EA/GA release notes. To avoid mixing up the release notes with the code fixes that have gone into a particular release or build, we don't use `Resolved/Fixed`. 41 | 42 | If you see an issue you feel should have a release note but you are not the assignee of the bug, then add the label [release-note=yes]{.jbs-label} to the main bug (not on a backport nor a sub-task). This acts as a flag to make sure that the release note is considered. This can be done even with fixes that have been shipped already if it's noticed that there is confusion around the change. If, after discussion, it's decided that a release note isn't required either remove the label, or change it to [release-note=no]{.jbs-label} if it makes sense to have a clear indication that a release note isn't required for the fix. The label [release-note=yes]{.jbs-label} can be removed once the release note sub-task has been created. 43 | 44 | For examples of well written release note issues in JBS, see [JDK-8276929](https://bugs.openjdk.org/browse/JDK-8276929) or [JDK-8278458](https://bugs.openjdk.org/browse/JDK-8278458). 45 | 46 | ## General conventions for release notes 47 | 48 | The following are general practices that should be followed when creating release notes. 49 | 50 | * Release notes should be no longer than 2-3 paragraphs. 51 | * Don't repeat information that will be included in updates to the docs, keep it to a high level summary or key changes. 52 | * Note that where the changes are more fully documented in the JDK documentation, then refer to that document for details. When covering a change in behavior provide some idea to what can be done if a developer or user encounters problems from the change. 53 | * Don't include graphics etc. Refer to the main docs if there are more details that need explaining. 54 | * Don't include your name or affiliation, make sure however, you are the assignee of the release note sub-task. 55 | * If you have a < in the [Summary]{.jbs-field} then use `<`. For <'s in the [Description]{.jbs-field} surround them by back-ticks. 56 | 57 | * Avoid using Latin and abbreviations in the release note. 58 | * Use "also known as" instead of "aka" 59 | * Use "that is" or "to be specific" instead of "i.e." 60 | * Use "for example" instead of "e.g." 61 | 62 | * The [Summary]{.jbs-field} should be in title case instead of sentence case. 63 | * Example: Decode Error with Tomcat Version 7.x 64 | 65 | * The [Description]{.jbs-field} should be standardized to follow this pattern: 66 | * Sentence stating the change that was made 67 | * Background info/context 68 | * Example: A new system property, `jdk.disableLastUsageTracking`, has been introduced to disable JRE last usage tracking for a running VM. 69 | 70 | ## Advanced options 71 | * JEP release notes 72 | * [Summary]{.jbs-field} - If the change is an actual JEP, use the JEP title. 73 | * [Description]{.jbs-field} - the JEP Summary text have already been heavily reviewed and also approved by the Project lead. It should be the first sentence in the release note description. That would be analogous to the "change that was made" sentence in other release note descriptions. The remaining text would be composed of the background info from the JEP. 74 | * [Description]{.jbs-field} - The JEP release note description should contain the link to the JEP. 75 | * [Labels]{.jbs-field} - The [release-note=yes]{.jbs-label} label should be placed on the JEP issue itself. 76 | * Single release note for multiple changes 77 | * A link to the parent issue that the note is a sub-task of, will be placed alongside the summary in the release notes. If note relates to additional changes, then add them as [Relates]{.jbs-field} links to the note and add the label [RN-MultipleLinks]{.jbs-label} - see [JDK-8284975](https://bugs.openjdk.org/browse/JDK-8284975) as an example. 78 | * Multiple release notes for the same change 79 | * If more than one release note is required for the same set of fixes, then open additional sub-tasks with the same [Affects Version]{.jbs-field} - see [JDK-8073861](https://bugs.openjdk.org/browse/JDK-8073861) as an example. 80 | * Release notes across backports 81 | * If an issue is backported to earlier releases the same note will be used - just add the new release version in the [Affects Version]{.jbs-field} field of the release note. 82 | * Where a different release note is required, then create a separate note with the [Affects Version]{.jbs-field} for the new release - see [JDK-8308194](https://bugs.openjdk.org/browse/JDK-8308194) and [JDK-8322473](https://bugs.openjdk.org/browse/JDK-8322473) for an example. 83 | 84 | ## RN-labels 85 | 86 | Unless labeled otherwise it will be assumed that the release note documents a change in behavior (will have likely required a CSR) or other item which should be included in the release notes. If the note covers a more specific type of change, then one of the following labels can be included (notes of a similar type will be listed together). 87 | 88 | [[RN-NewFeature]{.jbs-label}]{#RN-NewFeature} 89 | : A new feature or enhancement in the release. 90 | The [Summary]{.jbs-field} must be the item/API or new functionality. 91 | The [Description]{.jbs-field} must contain the name of the new feature, its intended function, and how a user can utilize it. 92 | Example: [JDK-8315443](https://bugs.openjdk.org/browse/JDK-8315443) 93 | 94 | [[RN-IssueFixed]{.jbs-label}]{#RN-IssueFixed} 95 | : A significant issue which has been fixed. This would normally be a regression or an issue which was unknowingly released in a new feature. 96 | The [Summary]{.jbs-field} must be a summary of the error that was fixed. 97 | The [Description]{.jbs-field} must contain a statement about what was fixed, how the fix effects the user, and any special conditions that a user should be aware of regarding the fix. 98 | Example: [JDK-8184172](https://bugs.openjdk.org/browse/JDK-8184172) 99 | 100 | [[RN-KnownIssue]{.jbs-label}]{#RN-KnownIssue} 101 | : An issue that wasn't possible to fix by the time the release was GA'd. 102 | The [Summary]{.jbs-field} must be a summary of the error that the user sees. 103 | The [Description]{.jbs-field} must contain details about the error, how it effects the user, and workarounds if any exist. 104 | Example: [JDK-8191040](https://bugs.openjdk.org/browse/JDK-8191040) 105 | 106 | [[RN-Removed]{.jbs-label}]{#RN-Removed} 107 | : Only for major releases. The release note covers an API, feature, tool etc. which has been removed from the JDK. 108 | The [Summary]{.jbs-field} must be of the form "Removal of" Item/API. 109 | The [Description]{.jbs-field} must contain the list or name of the removed items/API with (optional) the reason for its removal. Include any special conditions that a user should be aware of regarding the removal. 110 | Example: [JDK-8185066](https://bugs.openjdk.org/browse/JDK-8185066) 111 | 112 | [[RN-Deprecated]{.jbs-label}]{#RN-Deprecated} 113 | : Only for major releases. The release notes cover an API, feature, tool etc. that has been marked as deprecated in the release. 114 | The [Summary]{.jbs-field} must be of the form "Deprecated" Item/API. 115 | The [Description]{.jbs-field} must contain the name of the item that has been deprecated, the reason for its deprecation, and (optional) any special conditions that a user should be aware of regarding the possible future removal. 116 | Example: [JDK-8296385](https://bugs.openjdk.org/browse/JDK-8296385) 117 | 118 | [[RN-Important]{.jbs-label}]{#RN-Important} 119 | : Used to indicate that the release note should be highlighted in some fashion, such as listing it at the beginning of the release notes. 120 | 121 | [[RN-]{.jbs-label}_(distro)_]{#RN-distro} 122 | : Used to indicate that the release note is only relevant for a specific JDK distribution. E.g. [RN-Oracle]{.label} 123 | 124 | [[RN-MultipleLinks]{.jbs-label}]{#RN-MultipleLinks} 125 | : Used to indicate that the release note should refer to multiple changes - see [Advanced options](#advanced-options) section. 126 | 127 | [[~~RN-Change~~]{.jbs-label}]{#RN-Change} 128 | : Deprecated. This is the default and no label is needed to indicate this. 129 | 130 | ## Querying the release notes 131 | 132 | The Release Notes for a particular release can be found using the JBS query 133 | 134 | ~~~ 135 | affectedversion = and type = sub-task and labels = release-note 136 | ~~~ 137 | 138 | where `` is the appropriate release value, e.g. 17. 139 | 140 | ::: {.box} 141 | [To the top](#){.boxheader} 142 | ::: 143 | -------------------------------------------------------------------------------- /src/guide/reviewing-and-sponsoring-a-change.md: -------------------------------------------------------------------------------- 1 | # Reviewing and Sponsoring a Change 2 | 3 | ::: {.box} 4 | [Quick Links]{.boxheader} 5 | 6 | * [GitHub Docs on pull requests reviews](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews) 7 | ::: 8 | 9 | Two of the most important contributions you can make in the OpenJDK community are to review and sponsor changes for other developers. All changes needs to be reviewed. Many changes even need to be reviewed by more than one person. This means that in order to enable a fast-pased development experience, all developers need to review more changes then they produce themself. 10 | 11 | If you are new to an area, reviewing changes is also a great way to learn the code and see what general styles and types of changes are relevant in the area. Be mindful though, if you don't know the area well you should state this in your review comments. 12 | 13 | New developers in the OpenJDK community don't have the permissions needed to integrate changes to the repositories. This is a feature that ensures that all developers get familiar with the code, processes, and community before being allowed to actually make changes. To get their first changes in, the new Contributor needs the help of a Sponsor. The Sponsor's role is to offer constructive advice and eventually integrate the sponsored contribution into the repository. 14 | 15 | Sponsoring new contributions is an important activity - it's how the engineering culture of a project gets passed on from the core group to new Contributors, from one generation to the next. Take pride in the value you provide to Contributors. Their success reflects well on you. 16 | 17 | There are many different reasons to sponsor a change and depending on the situation the exact steps involved may differ significantly. An experienced developer hired into a larger team of OpenJDK developers is likely to get much of the required information by osmosis and will likely need less help from a sponsor than the enthusiast sitting at home with no prior experience of large scale software development. This text aims to highlight the steps involved in sponsoring a change but can't cover all possible scenarios. As always, common sense takes precedence where the assumptions made here doesn't apply to your use case. 18 | 19 | ## Responsibilities of a Reviewer 20 | 21 | As a [Reviewer](https://openjdk.org/bylaws#reviewer) you have a responsibility to make sure changes are sound and align with the general direction of the area. If you, as a [Reviever](https://openjdk.org/bylaws#reviewer), review a change in an area that you don't know well you probably shouldn't be the one to approve the change. 22 | 23 | [Reviewers](https://openjdk.org/bylaws#reviewer) should be aware that they take full responsibility for the appropriateness and correctness of any changes in their area of expertise. If something goes wrong (e.g., the build breaks) and the change's author is unavailable, they may be asked to deal with the problem. Potential [Reviewers](https://openjdk.org/bylaws#reviewer) are encouraged to refuse to review code for which they aren't qualified. 24 | 25 | [Reviewers](https://openjdk.org/bylaws#reviewer) should examine not only the code being added or changed but also the relevant unit or regression tests. If no tests are being added for a change that isn't already covered by existing tests and have the appropriate [noreg-]{.jbs-label} label, the [Reviewer](https://openjdk.org/bylaws#reviewer) should question this. 26 | 27 | As a [Reviewer](https://openjdk.org/bylaws#reviewer), Contributors will look up to you for guidance to get their contributions into the project - your actions will determine whether Contributors will feel welcome and want to engage further with the project beyond their initial attempt, or not. Let's not lose enthusiastic, engaged and technically competent Contributors due to a lack of communication. If you see a request in your area of expertise and you can't address it, at least acknowledge receipt of the request and provide an estimate for when you'll be able to give it your attention. A frank explanation of your time constraints or commitments will be appreciated and respected. 28 | 29 | ## Reviewing a change on GitHub 30 | 31 | Code reviews in OpenJDK happens on [GitHub](https://github.com/openjdk). This guide will hint at the most common steps to perform a review but it's not a complete documentation of all features. For official documentation see the [GitHub Docs](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews). 32 | 33 | When you arrive at a pull request there are a few different sections that you can browse through, Conversation, Commits, Checks, and Files changed. We will look at the first and the last of these. 34 | 35 | ### Conversation 36 | 37 | The Conversation section is where all discussion around the PR happens. Note that this section is intended for technical discussion around the actual implementation of a change. This is in general not the place to discuss the appropriateness of the change or have overarching design discussions, that should happen on the appropriate [mailing lists]. Yes, PR comments will be sent to the mailing lists as well, but it's unlikely that all the right people will see it. PR mails sent to the mailing lists will have a subject indicating that it's about the specific implementation in the PR. If the discussion is larger than just about the specific implementation, for instance around the design or future of the feature, then a much larger audience needs to be made aware of the discussion. A separate email thread with a proper subject is preferred in such cases. 38 | 39 | You can either reply to existing comments by using the text field beneath each comment, or add a new comment by scrolling to the bottom of the page and use the larger text field where it says "Leave a comment". 40 | 41 | Reviews take time for everyone involved. Your opinions are much appreciated as long as they are on-topic and of a constructive nature. A comment of the form "I don't like this" won't help anyone to improve the change. Instead express what it is that you don't like and give examples of how to do it differently. Always be polite and make sure you read through all previous comments before adding your own, the answer you are looking for may already have been given. 42 | 43 | :::{.note} 44 | Note that GitHub will collapse comments if there are many of them, and if an issue is marked as resolved. This means that you have to be observant and may have to dig around a bit to find all comments in the PR. 45 | ::: 46 | 47 | Never ask the author of a change to fix unrelated issues in the code that you find during your review. Such issues should be handled through a separate JBS issue and PR. 48 | 49 | ### Files changed 50 | 51 | The Files changed-section is where the actual change is presented. On the left hand side there's a list of all files changed. This is useful to get a quick overview and to see if the change touches an area that you need to review. 52 | 53 | The diff view is pretty straight forward, red stuff has been removed, green stuff has been added. You can configure (among other things) if you want a unified diff or a split view, if you want to hide whitespace changes, what types of files you want to show, and if you want to show the entire change or just what's happened since your last review. 54 | 55 | When you hover the text in the change a blue square with a plus sign pops up to the left of the line. Click it to add a comment about the change on the corresponding line. When you create your first comment you have the option to simply add a single comment or to start a review. In general you want to start a review so that all your comments are gathered in the same context when emails are sent out etc. You can also attach a comment to a file rather than to a specific line in the file by using the speech bubble icon at the top right. 56 | 57 | When a complete file has been reviewed there's a "viewed" checkbox at the top right that can be used to hide the files that you are done with. This is useful for changes that involve many files. 58 | 59 | Once you have looked through all the changes and added all your comments, the green button at the top right of the screen "Review changes" is used to finish your review. You can add a final comment to sum up your findings and then choose whether you just want to provide your comments, if you want to approve the changes, or request that changes are done before the change can be approved. Finally click "Submit review" to publish your thoughts. 60 | 61 | ### Trivial changes 62 | 63 | A change that is small, well contained, and that makes no semantic changes can be called _trivial_. Typical examples are fixing obvious typos or renaming a local identifier. A trivial change can also be integrating an already-reviewed change that was missed in an earlier integration (e.g., forgot to add a file) or generated changes like a [`git revert`](#backing-out-a-change). It's up to the author of a change to claim that the change is trivial in the RFR, and it's up to the [Reviewer](https://openjdk.org/bylaws#reviewer) whether to approve such a claim. A change is trivial only if the [Reviewer](https://openjdk.org/bylaws#reviewer) agrees that it is. A trivial change doesn't need to wait 24 hours before being pushed, and it only needs one [Reviewer](https://openjdk.org/bylaws#reviewer), even in areas where stricter rules for integration normally apply. 64 | 65 | ## Volunteering to sponsor a contribution 66 | 67 | In an ideal situation opportunities to sponsor contributions occur in the OpenJDK mail lists. Since Contributors are encouraged to discuss their intended changes before they submit a patch, the ideal time to declare your sponsorship is during that initial conversation. As a Sponsor you should offer advice and collaborate with the Contributor as necessary to produce a high-quality patch. In addition to sponsoring changes to code you regularly maintain, there may be other areas where you can serve as a Sponsor. 68 | 69 | After publicly committing to sponsoring a contribution, you need to "claim the sponsorship request" in [JBS](#jbs---jdk-bug-system) unless the Contributor already has a JBS account and can assign the bug to themself. To do that you need to perform three steps: 70 | 71 | * Assign the bug to yourself. 72 | * Add a comment providing the name of the Contributor and a summary of the approach to solving the problem. 73 | * Set the bug's [Status]{.jbs-field} to [In Progress]{.jbs-value}. 74 | 75 | If the contribution doesn't already have an associated OpenJDK bug then create one in [JBS](#jbs---jdk-bug-system). 76 | 77 | It should be noted that claiming the sponsorship can take many other forms. In cases where a change has been discussed, or a starter bug has been picked up and fixed even though a sponsor hasn't been identified yet it may be as simple as just showing up at the PR and sponsor the change once it's been reviewed. 78 | 79 | ## Responsibilities of a sponsor 80 | 81 | As a sponsor, you aren't technically required to review the change, other Reviewers may already have looked at it or signed up to review. But it will be your name on the commit so you should do whatever you feel is needed to be comfortable with that. You may need to work with the Contributor to make any necessary changes, until you and the Contributor are satisfied with the result, and you are satisfied that the proposed contribution will pass any relevant review and testing. That may take more than one iteration in the worst case. You may also need to help out with any process or practical questions around the OCA, GitHub PRs, and specific requirements in the area or project. 82 | 83 | To integrate the change the Contributor should use the command `/integrate` on the PR as prompted by the bots. Once that is done, you as a sponsor enter the command `/sponsor` in a comment on the PR. 84 | 85 | Once the change has been integrated you may need to keep an eye out for any reported test failures and be prepared to investigate if such failures stem from the change you sponsored, and if so, work with the Contributor to resolve the issue. 86 | 87 | ::: {.box} 88 | [To the top](#){.boxheader} 89 | ::: 90 | -------------------------------------------------------------------------------- /src/guide/testing-the-jdk.md: -------------------------------------------------------------------------------- 1 | # Testing the JDK 2 | 3 | ::: {.box} 4 | [Quick Links]{.boxheader} 5 | 6 | * [Using the run-test Framework](https://openjdk.org/groups/build/doc/testing.html) 7 | * [jtreg Harness Documentation](https://openjdk.org/jtreg/) 8 | * [Google Test Documentation](https://github.com/google/googletest/blob/main/docs/index.md) 9 | ::: 10 | 11 | In addition to your own Java applications, OpenJDK has support for two test frameworks to test the JDK, jtreg and GTest. jtreg is a Java regression test framework that is used for most of the tests that are included in the OpenJDK source repository. The Google Test (GTest) framework is intended for unit testing of the C++ native code. Currently only JVM testing is supported by the GTest framework. Other areas use jtreg for unit testing of C++ code. 12 | 13 | This section provides a brief summary of how to get started with testing in OpenJDK. For more information on configuration and how to use the OpenJDK test framework, a.k.a. "run-test framework", see [`doc/testing.md`](https://github.com/openjdk/jdk/blob/master/doc/testing.md). 14 | 15 | Please note that what's mentioned later in this section, like [GHA](#github-actions) and tier 1 testing, will only run a set of smoke-tests to ensure your change compiles and runs on a variety of platforms. They won't do any targeted testing on the particular code you have changed. You must always make sure your change works as expected before integrating, using targeted testing. In general all changes should come with a regression test, so if you're writing product code you should also be writing test code. Including the new tests (in the right places) in your change will ensure your tests will be run as part of your testing on all platforms and in the future. 16 | 17 | A few key items to think about when writing a regression test: 18 | 19 | * A regression test should execute fast - a few seconds at most 20 | * The test should only test the desired functionality - if you have several features to test, write more tests 21 | * The test should pass reliably on all supported platforms - watch out for platform-specific differences such as path separators 22 | * Binary files shouldn't be checked in, if your test needs to use one, the test should create it in some fashion 23 | * Avoid shell scripts and relying on external commands as much as possible 24 | 25 | The jtreg documentation has a section on [how to write good jtreg tests](https://openjdk.org/jtreg/writetests.html). 26 | 27 | There are a few examples where it doesn't make sense to write an explicit regression test. These should be tagged in JBS with one of the [noreg-labels](#noreg). 28 | 29 | ## jtreg 30 | 31 | In-depth documentation about the jtreg framework is found here: [jtreg harness](https://openjdk.org/jtreg/). jtreg itself is available in the [Code Tools Project](https://openjdk.org/projects/code-tools/). 32 | 33 | Below is a small example of a jtreg test. It’s a clean Java class with a main method that is called from the test harness. If the test fails we throw a RuntimeException. This is picked up by the harness and is reported as a test failure. Try to always write a meaningful message in the exception. One that actually helps with understanding what went wrong once the test fails. 34 | 35 | ~~~Java 36 | /* 37 | * @test 38 | * @summary Make sure feature X handles Y correctly 39 | * @run main TestXY 40 | */ 41 | public class TestXY { 42 | public static void main(String[] args) throws Exception { 43 | var result = X.y(); 44 | if (result != expected_result) { 45 | throw new RuntimeException("X.y() gave " + result + ", expected " + expected_result); 46 | } 47 | } 48 | } 49 | ~~~ 50 | 51 | This example only utilizes three jtreg specific tags, `@test`, `@summary`, and `@run`. `@test` simply tells jtreg that this class is a test, and `@summary` provides a description of the test. `@run` tells jtreg how to execute the test. In this case we simply tell jtreg to execute the main method of the class `TestXY`. `@run` isn't strictly necessary for jtreg to execute the test, an implicit `@run` tag will be added if none exists. However, for clarity and in order to avoid bugs it's recommended to always explicitly use the `@run` tag. 52 | 53 | There are several other tags that can be used in jtreg tests. You can for instance associate the test with a specific bug that this test is a regression test for. The bug id is written without the `JDK-` prefix. 54 | 55 | ~~~ 56 | @bug 8272373 57 | ~~~ 58 | 59 | You can add several bug ids in the same `@bug` tag, separated by a single space. These bug ids refer to product bugs for which a fix is verified by this test. JBS issues that track changes to the test itself are not listed here. 60 | 61 | You can also specify a number of requirements that must be fulfilled for jtreg to execute the test. 62 | 63 | ~~~ 64 | @requires docker.support 65 | @requires os.family != "windows" 66 | @requires os.maxMemory > 3G 67 | @requires os.arch=="x86_64" | os.arch=="amd64" 68 | ~~~ 69 | 70 | And you can specify if the test requires specific modules, or command line flags to run the test in several different ways. 71 | 72 | ~~~ 73 | @modules java.base/jdk.internal.misc 74 | @run main/othervm -Xmx128m TestXY 75 | ~~~ 76 | 77 | Note that you can have several `@run` tags in the same test with different command line options. 78 | 79 | jtreg also have support for labeling tests with keys using the `@key` tag. These keywords can then be used to filter the test selection. For instance if you have a UI test which needs to display a window you'll want to make sure the test harness doesn't try to run this test on a system which doesn't support headful tests. You do this by specifying 80 | 81 | ~~~ 82 | @key headful 83 | ~~~ 84 | 85 | Another example is `@key randomness` that should be used to indicate that a test is using randomness - i.e. is intentionally non-deterministic. 86 | 87 | There are many other keywords in use and their usage may differ between areas in the JDK. Make sure you understand the conventions for the particular area you are testing since these are just examples. 88 | 89 | The [jtreg documentation](https://openjdk.org/jtreg/) provides information on many more tags like these. 90 | 91 | The [compiler group](https://openjdk.org/groups/compiler/) has a section in their wiki with [Guidelines for "langtools" tests](https://openjdk.org/groups/compiler/tests.html). 92 | 93 | ### Running OpenJDK jtreg tests 94 | 95 | When configuring the OpenJDK build you can tell it where your jtreg installation is located. When providing this information you can later run `make run-test` to execute jtreg tests. 96 | 97 | ~~~ 98 | sh ./configure --with-jtreg=/path/to/jtreg 99 | make run-test TEST=tier1 100 | ~~~ 101 | 102 | In the OpenJDK source tree you can find a directory called `test`. There are a large number of tests in this directory that are written to be used with jtreg. 103 | 104 | ~~~ 105 | make run-test TEST=test/jdk/java/lang/String/ 106 | ~~~ 107 | 108 | You can also run jtreg without invoking make. In this case you’ll need to tell jtreg which JDK to test. 109 | 110 | ~~~ 111 | jtreg -jdk:/path/to/jdk /path/to/test 112 | ~~~ 113 | 114 | ## GTest 115 | 116 | As mentioned the Google test framework is mainly used for C++ unit tests. There are several of these in the `test/hotspot` directory. Currently, only the C++ code in the JVM area is supported by the OpenJDK GTest framework. The tests can be run without starting the JVM, which enables testing of JVM data structures that would be fragile to play with in a running JVM. 117 | 118 | ~~~Java 119 | static int demo_comparator(int a, int b) { 120 | if (a == b) { 121 | return 0; 122 | } 123 | if (a < b) { 124 | return -1; 125 | } 126 | return 1; 127 | } 128 | 129 | TEST(Demo, quicksort) { 130 | int test_array[] = {7,1,5,3,6,9,8,2,4,0}; 131 | int expected_array[] = {0,1,2,3,4,5,6,7,8,9}; 132 | 133 | QuickSort::sort(test_array, 10, demo_comparator, false); 134 | for (int i = 0; i < 10; i++) { 135 | ASSERT_EQ(expected_array[i], test_array[i]); 136 | } 137 | } 138 | ~~~ 139 | 140 | `ASSERT_EQ` is one example of an assertion that can be used in the test. Below are a few other examples. A full list is found in the [Google Test Documentation](https://github.com/google/googletest/blob/main/docs/index.md). 141 | 142 | ~~~Java 143 | ASSERT_TRUE(condition); 144 | ASSERT_FALSE(condition); 145 | EXPECT_EQ(expected, actual); 146 | EXPECT_LT(val1, val2); 147 | EXPECT_STREQ(expected_str, actual_str); 148 | ~~~ 149 | 150 | `ASSERT` is a fatal assertion and will interrupt execution of the current sub-routine. `EXPECT` is a nonfatal assertion and will report the error but continues to run the test. All assertions have both an `ASSERT` and an `EXPECT` variant. 151 | 152 | For more information on how to write good GTests in HotSpot, see [`doc/hotspot-unit-tests.md`](https://github.com/openjdk/jdk/blob/master/doc/hotspot-unit-tests.md). 153 | 154 | ### Running OpenJDK GTests 155 | 156 | When configuring the OpenJDK build you can tell it where your GTest installation is located. Once configured, use make to run GTests. 157 | 158 | ~~~ 159 | sh ./configure --with-gtest=/path/to/gtest 160 | make test TEST=gtest 161 | ~~~ 162 | 163 | You can also use a regular expression to filter which tests to run: 164 | 165 | ~~~ 166 | make test TEST=gtest:code.*:os.* 167 | make test TEST=gtest:$X/$variant 168 | ~~~ 169 | 170 | The second example above runs tests which match the regexp `$X.*` on a specific variant of the JVM. The variant is one of client, server, etc. 171 | 172 | ## GitHub actions 173 | 174 | [GitHub](https://github.com) has a feature called **GitHub actions** (GHA) that can be used to automate testing. The GHA is executed whenever a push is made to a branch in your repository. The bots will show the results of the GHA in your PR when you create or update it. The GHA in the JDK Project is configured to run a set of tests that is commonly known as **tier 1**. This is a relatively fast, small set of tests that tries to verify that your change didn't break the JDK completely. In tier 1 the JDK is built on a small set of platforms including (but not necessarily limited to) Linux, Windows, and MacOS, and a few tests are executed using these builds. There's also a set of other platforms for which GHA does cross-complilation builds. 175 | 176 | In addition to the testing you run manually before publishing your changes, it's recommended that you take advantage of this automated testing that the GHA offers. This will for instance allow you to run tests on platforms that you may not otherwise have access to. To enable this on your personal fork of the JDK on [GitHub](https://github.com) go to the "Actions" tab and click the big green button saying "I understand my workflows, go ahead and enable them". If you don't understand these workflows there's a link to the actual file that describes them right below the green button. 177 | 178 | In case of failures in the GHA it's always a good start to try to reproduce the failure locally on a machine where you have better control and easier access to a debug environment. There have been cases where the GHA has failed due to issues unrelated to the change being tested, e.g. because the GHA environment was updated and changes were needed to the JDK GHA configuration. The configuration is in general updated fairly quickly, so in cases were you can't reproduce the failure locally, consider re-running the GHA later. 179 | 180 | Please keep in mind that the tier 1 tests run by the GHA should only be seen as a smoke test that finds the most critical breakages, like build errors or if the JDK is DOA. These tests can never replace the targeted testing that you always must do on your changes. There are several areas of the JDK that aren't part of tier 1 at all. To see exactly what tier 1 includes, please see the various TEST.groups files that you will find in the subdirectories of [`jdk/test/`](https://github.com/openjdk/jdk/tree/master/test). 181 | 182 | ::: {.note} 183 | In the past there used to be a sandbox repository that could be used for testing purposes. With the move to Git this has been replaced by GitHub Actions. 184 | ::: 185 | 186 | ## Excluding a test 187 | 188 | Sometimes tests break. It could be e.g. due to bugs in the test itself, due to changed functionality in the code that the test is testing, or changes in the environment where the test is executed. While working on a fix, it can be useful to stop the test from being executed in everyone else's testing to reduce noise, especially if the test is expected to fail for more than a day. There are two ways to stop a test from being run in standard test runs: ProblemListing and using the `@ignore` keyword. Removing tests isn't the standard way to remove a failure. A failing test is often a regression and should ideally be handled with high urgency. 189 | 190 | Remember to remove the JBS id from the ProblemList or the test when the bug is closed. This is especially easy to forget if a bug is closed as [Duplicate]{.jbs-value} or [Won't Fix]{.jbs-value}. jcheck will report an error and prohibit an integration if a PR is created for an issue that is found in a ProblemList if the fix doesn't remove the bug ID from the ProblemList. 191 | 192 | ### ProblemListing jtreg tests 193 | 194 | ProblemListing should be used for a short term exclusion while a test is being fixed, and for the exclusion of intermittently failing tests that cause too much noise, but can still be useful to run on an ad-hoc basis. ProblemListing is done in the file `ProblemList.txt`. For more details about the `ProblemList.txt` file see the [jtreg FAQ](https://openjdk.org/jtreg/faq.html#what-is-a-problemlist.txt-file). 195 | 196 | There are actually several ProblemList files to choose from in the JDK. Their location and name hint about what area or feature each file belongs to. Each file has sections for different components. All ProblemList files complement each other to build the total set of tests to exclude in jtreg runs. 197 | 198 | ~~~ 199 | test/hotspot/jtreg/ProblemList.txt 200 | test/hotspot/jtreg/ProblemList-aot.txt 201 | test/hotspot/jtreg/ProblemList-graal.txt 202 | test/hotspot/jtreg/ProblemList-non-cds-mode.txt 203 | test/hotspot/jtreg/ProblemList-Xcomp.txt 204 | test/hotspot/jtreg/ProblemList-zgc.txt 205 | test/jaxp/ProblemList.txt 206 | test/jdk/ProblemList.txt 207 | test/jdk/ProblemList-aot.txt 208 | test/jdk/ProblemList-graal.txt 209 | test/jdk/ProblemList-Xcomp.txt 210 | test/langtools/ProblemList.txt 211 | test/langtools/ProblemList-graal.txt 212 | test/lib-test/ProblemList.txt 213 | ~~~ 214 | 215 | Use the suitable ProblemList and add a line like this in the proper section: 216 | 217 | ~~~ 218 | foo/bar/MyTest.java 4711 windows-all 219 | ~~~ 220 | 221 | In this example, `MyTest.java` is ProblemListed on windows, tracked by bug `JDK-4711`. 222 | 223 | Currently there's [no support for multiple lines for the same test](https://bugs.openjdk.org/browse/CODETOOLS-7902481). For this reason it's important to always make sure there's no existing entry for the test before adding a new one, as multiple entries might lead to unexpected results, e.g. 224 | 225 | ~~~ 226 | foo/bar/MyTest.java 4710 generic-all 227 | ... 228 | foo/bar/MyTest.java 4711 windows-all 229 | ~~~ 230 | 231 | This would lead to `sun.tools.jcmd.MyTest.java` being ProblemListed only on `windows-all`. The proper way to write this is: 232 | 233 | ~~~ 234 | foo/bar/MyTest.java 4710,4711 generic-all,windows-all 235 | ~~~ 236 | 237 | Although `windows-all` isn't strictly required in this example, it's preferable to specify platforms for each bugid (unless they are all `generic-all`), this makes it easier to remove one of the bugs from the list. 238 | 239 | A common way to handle the JBS issue used to problemlist a test is to create a [Sub-task]{.jbs-value} of the bug that needs to be fixed to be able to remove the test from the problem list again. 240 | 241 | Remember to always add a [problemlist]{.jbs-label} label in the JBS issue referenced in the ProblemList entry. When the issue is fixed, the [problemlist]{.jbs-label} label can be removed from the JBS issue. 242 | 243 | #### ProblemListing some, but not all, test cases in a file 244 | 245 | Some tests contain several test cases and there may be a need to ProblemList only a few of them. To do this use the full test name, i.e. ` + # + `, where test case id can be specified in the test header. If no id is specified each test case can be referenced with `id` + ordinary number of the test case in the test file. 246 | 247 | Let's assume we have four test cases in `foo/bar/MyTest.java`: 248 | 249 | ~~~ 250 | /* @test */ 251 | /* @test id=fancy_name */ 252 | /* @test */ 253 | /* @test */ 254 | ~~~ 255 | 256 | A ProblemList entry that excludes the first, second, and third test case would look like this: 257 | 258 | ~~~ 259 | foo/bar/MyTest.java#id0 4720 generic-all 260 | foo/bar/MyTest.java#fancy_name 4721 generic-all 261 | foo/bar/MyTest.java#id2 4722 generic-all 262 | ~~~ 263 | 264 | Due to an issue described in [CODETOOLS-7902712](https://bugs.openjdk.org/browse/CODETOOLS-7902712) tests that contains more than one `@test` must actually use this way to specify all test cases if all of them should be ProblemListed. Specifying just the test name will not work. 265 | 266 | #### Running ProblemListed tests 267 | 268 | To run ad-hoc runs of ProblemListed tests use `RUN_PROBLEM_LISTS=true`. 269 | 270 | ~~~ 271 | make test TEST=... JTREG=RUN_PROBLEM_LISTS=true 272 | ~~~ 273 | 274 | ### Exclude jtreg tests using `@ignore` 275 | 276 | The `@ignore` keyword is used in the test source code. This is mainly used for tests that are so broken that they may be harmful or useless, and is less common than ProblemListing. Examples can be tests that don't compile because something changed in the platform; or a test which might remove your `/etc/shadow`. Use `@ignore` with a bug reference in the test case to prevent the test from being run. 277 | 278 | ~~~java 279 | /** 280 | * @test 281 | * @ignore 4711 282 | */ 283 | ~~~ 284 | 285 | In this example, `MyTest.java` is excluded, tracked by bug `JDK-4711`. `@ignore` should generally be placed directly before the first "action" tag (e.g. `@compile`, `@run`) if any in the test. 286 | 287 | 288 | ### Dealing with JBS bugs for test exclusion 289 | 290 | ProblemListing and `@ignore`-ing are done in the JDK source tree, that means a check-in into the repository is needed. This in turn means that a unique JBS issue and a code review are needed. This is a good thing since it makes test problems visible. 291 | 292 | * **Code review**: ProblemListing a test is considered a [trivial](#trivial) change. 293 | * **JBS issue**: A JBS issue is obviously created for the bug that caused the failure, we call this the _main issue_. To exclude the test, create a subtask to the main issue. Also add the label [[problemlist]{.jbs-label}](#problemlist) to the main issue. 294 | 295 | The fix for the main issue should remove the test from the ProblemList or remove the `@ignore` keyword from the test. 296 | 297 | #### Triage excluded issues 298 | 299 | After a failure is handled by excluding a test, the main JBS issue should be re-triaged and possibly given a new priority. This should be handled by the standard triage process. A test exclusion results in an outage in our testing. This outage should be taken into consideration when triaging, in addition to the impact of the bug itself. 300 | 301 | ## Backing out a change 302 | 303 | If a change causes a regression that can't be fixed within reasonable time, the best way to handle the regression can be to back out the change. Backing out means that the inverse (anti-delta) of the change is integrated to effectively undo the change in the repository. Whether to back out a change or not will always be a judgement call. How noisy and frequent are the failures caused by the broken change? How soon can the fix be expected? If you want to avoid having your change backed out, you should make sure to let the relevant developers know that you are working on the fix and give an estimated ETA of the fix. 304 | 305 | It will happen of course when the build is broken or the JDK is DOA and similar situations that a change is immediately backed out without further investigation. Backing out a change is however seldom the first course of action if the change has been done in accordance with the guidance in [Working With Pull Requests]. If, when investigated, it is found that a change didn't go through relevant testing or there are other issues that should have been caught before integration if proper procedure had been followed, it's quite possible that a change is backed out even if the author is desperately working on a fix. The JDK source code is deliberately menat to have a high bar for acceptance of changes. If something crawls in underneath that bar it should most likely be backed out. 306 | 307 | The backout is a regular change and will have to go through the standard code review process, but is considered a [trivial](#trivial) change. The rationale is that a backout is usually urgent in nature and the change itself is automatically generated. In areas where two reviewers are normally required, only one [Reviewer](https://openjdk.org/bylaws#reviewer) is required for a backout since the person who is performing the backout also should review the change. 308 | 309 | There are two parts to this task, how to do the bookkeeping in JBS, and how to do the actual backout in git. 310 | 311 | ### How to work with JBS when a change is backed out 312 | 313 | #. Close the original (failed) JBS issue **(O)**. 314 | * "Verify" the issue and choose "Fix Failed". 315 | #. If the intention is to fix the change and submit it again, create a redo-issue **(R)** to track that the work still needs to be done. 316 | * Clone **(O)** and add the prefix `[REDO]` on the summary - the clone becomes the redo-issue **(R)**. 317 | * Make sure relevant information is brought to **(R)**. 318 | * Remember that comments aren't automatically brought over when cloning. 319 | #. Create a backout-issue **(B)**: 320 | * Alternative 1 - the regression is identified directly. 321 | * Create a sub-task to **(R)** with the same summary prefixed with `[BACKOUT]`. 322 | * Alternative 2 - an investigation issue was created **(I)**, and during the investigation backing out the change is identified as the best solution. 323 | * Use the investigation issue **(I)** for the backout. 324 | * Change summary of **(I)** to the same as **(O)** and prefix with `[BACKOUT]`. 325 | * Move and change type of **(I)** to become a sub-task of **(R)**. 326 | * Alternative 3 - no redo issue was created. 327 | * Create a backout-issue **(B)** with the same summary as **(O)**, prefix with `[BACKOUT]`. 328 | * Add a _relates to_ link between **(B)** and **(O)**. 329 | #. If **(O)** had a CSR request, update the CSR issue as follows: 330 | * Add a csr-for link from the CSR to **(R)**. 331 | * Add a note to the CSR that explains the reason for the redo and the impact on the CSR. 332 | * Move the CSR back into the Finalized state for re-review. (It's necessary to first move the CSR back to the Draft state before moving it to the Finalized state.) 333 | 334 | ProblemList entries and `@ignore` keywords will continue to point to the original bug (unless updated at back out). This is accepted since there is a clone link to follow. 335 | 336 | ### How to work with git when a change is backed out 337 | 338 | To backout a change with git, use `git revert`. This will apply (commit) the anti-delta of the change. Then proceed as usual with creating a PR and getting it reviewed. 339 | 340 | ~~~diff 341 | $ git show aa371b4f02c2f809eb9cd3e52aa12b639bed1ef5 342 | commit aa371b4f02c2f809eb9cd3e52aa12b639bed1ef5 (HEAD -> master) 343 | Author: Jesper Wilhelmsson 344 | Date: Wed Jun 23 20:31:32 2021 +0200 345 | 346 | 8272373: Make the JDK mine 347 | Reviewed-by: duke 348 | 349 | diff --git a/README.md b/README.md 350 | index 399e7cc311f..4961acb2126 100644 351 | --- a/README.md 352 | +++ b/README.md 353 | @@ -1,4 +1,4 @@ 354 | -# Welcome to the JDK! 355 | +# Welcome to my modified JDK! 356 | 357 | For build instructions please see the 358 | [online documentation](https://openjdk.org/groups/build/doc/building.html), 359 | 360 | $ git revert aa371b4f02c2f809eb9cd3e52aa12b639bed1ef5 361 | [master d454489052d] 8280996: [BACKOUT] Make the JDK mine Reviewed-by: duke 362 | 1 file changed, 1 insertion(+), 1 deletion(-) 363 | 364 | $ git show d454489052dc6ff69a21ad9c8f56b67fdeb435ee 365 | commit d454489052dc6ff69a21ad9c8f56b67fdeb435ee (HEAD -> master) 366 | Author: Jesper Wilhelmsson 367 | Date: Wed Jun 23 20:32:08 2021 +0200 368 | 369 | 8280996: [BACKOUT] Make the JDK mine 370 | Reviewed-by: duke 371 | 372 | diff --git a/README.md b/README.md 373 | index 4961acb2126..399e7cc311f 100644 374 | --- a/README.md 375 | +++ b/README.md 376 | @@ -1,4 +1,4 @@ 377 | -# Welcome to my modified JDK! 378 | +# Welcome to the JDK! 379 | 380 | For build instructions please see the 381 | [online documentation](https://openjdk.org/groups/build/doc/building.html), 382 | ~~~ 383 | 384 | ## Backing out a backport 385 | 386 | In rare cases it may be necessary to back out a backport from an update release without backing out the original fix in mainline. This will require a somewhat different procedure and will result in a small mess in JBS. It's extremely important to add comments in all relevant issues explaining exactly what's happened. 387 | 388 | The steps to take in order to do this are described below. **(M)** used below refers to the main bug entry - the first fix that was later backported. 389 | 390 | #. Close the original (failed) JBS backport issue **(O)**. 391 | * "Verify" the issue and choose "Fix Failed". 392 | #. If the intention is to fix the backport and submit it again, create a redo-issue **(R)** to track that the work still needs to be done. 393 | * Clone **(M)** and add the prefix `[REDO BACKPORT]` on the summary - the clone becomes the redo-issue **(R)**. 394 | * Add a _relates to_ link between **(R)** and **(O)**. 395 | * Set Fix Version of **(R)** to the target release for the backport - either the exact release if known, or `-pool` if it's not critical which release the fixed backport goes into. 396 | #. Create a backout-issue **(B)**: 397 | * Alternative 1 - the broken backport is identified directly. 398 | * Create a sub-task to **(R)** with the same summary, but prefixed with `[BACKOUT BACKPORT]`. 399 | * Alternative 2 - an investigation issue was created **(I)**, and during the investigation backing out the backport is identified as the best solution. 400 | * Use the investigation issue **(I)** for the backout. 401 | * Change summary of **(I)** to the same as **(M)** and prefix with `[BACKOUT BACKPORT]`. 402 | * Move and change type of **(I)** to become a sub-task of **(R)**. 403 | * Alternative 3 - no redo issue was created. 404 | * Create a backout-issue **(B)** with the same summary as **(M)** and prefix with `[BACKOUT BACKPORT]`. 405 | * Add a _relates to_ link between **(B)** and **(M)**. 406 | #. Add comments to **(M)**, **(R)** and **(O)** explaining the situation. 407 | 408 | The end result in JBS should look like this: 409 | 410 | ::: {style="text-align:center;"} 411 | ~~~{.mermaid caption="JBS structure after backout and redo of a backport" format=svg theme=neutral} 412 | flowchart TD 413 | main("Main issue (M)
JDK-8272373: Example JBS Issue
Issue type: Bug
Fix version: 18") 414 | backport("Initial backport (O)
JDK-8280986: Example JBS Issue
Issue type: Backport
Fix version: 15.0.2
Verification: Fix failed") 415 | backout("Backout of JDK-8280986 (B)
JDK-8280996: [BACKOUT BACKPORT] Example JBS Issue
Issue type: Sub-task
Fix version: 15.0.2") 416 | redo("Redo of backport (R)
JDK-8280989: [REDO BACKPORT] Example JBS Issue
Issue type: Bug
Fix version: 15.0.2") 417 | main --> |backported by| backport 418 | redo --> |clones| main 419 | backport <--> |relates to| redo 420 | redo --> |sub-task| backout 421 | ~~~ 422 | ::: 423 | 424 | For this example in JBS see the 15.0.2 backport of [JDK-8272373](https://bugs.openjdk.org/browse/JDK-8272373). 425 | 426 | ### Rationale for using this model 427 | 428 | The approach described here has both advantages and disadvantages. The key invariants that lead to this model are: 429 | 430 | * A _backported by_ link should only refer to issues of type Backport 431 | * A bug id should never be reused for different patches in the same repository 432 | 433 | Disadvantages of this model are that the list of backports in JBS will still list the old (failed) backport as the 15.0.2 backport, and the new backport will not be linked to using a _backported by_ link. It is assumed that the advantages above outweighs the disadvantages and that the capital letter prefixes for the backout and the redo will be visible enough in JBS to alert that something fishy is going on. 434 | 435 | ::: {.box} 436 | [To the top](#){.boxheader} 437 | ::: 438 | -------------------------------------------------------------------------------- /src/guide/the-jdk-release-process.md: -------------------------------------------------------------------------------- 1 | # The JDK Release Process 2 | 3 | ::: {.box} 4 | [Quick Links]{.boxheader} 5 | 6 | * [JEP 3: JDK Release Process](https://openjdk.org/jeps/3) 7 | ::: 8 | 9 | The JDK Project has a well defined release process. [JEP 3](https://openjdk.org/jeps/3) describes this process in detail. This section intends to clarify some topics that often cause questions. 10 | 11 | ## Release cycle 12 | 13 | The release cycle starts when development of a new release begins, and ends when that release is delivered to the public. The current release cadence is six months. This means that every six months we start development of a new release, and every six months a new release is delivered. However, this doesn't mean that each release cycle is six months. As described below, the total development time for a release (the release cycle) is actually nine months. Obviously this in turn doesn't mean that all features are developed in nine months. Most features are developed for a much longer time than that, and goes through long time development in other Project repositories, and through a series of preview and experimental stages. But any feature that is to be included in a specific release has a specific window of nine months to integrate the code into mainline and fix all the remaining bugs. 14 | 15 | It may be tempting to integrate a new feature near the end of a release cycle, to get more time to fix all those last bugs before integration. Please don't. If you are getting close to the end of a release and you still just have one more bug to fix, please defer your feature to the next release. It's only six months out. Not only will this vouch for your new feature to be more stable on release, you will also help keeping the JDK as a whole more stable by allowing others to find and fix bugs in their new code that might come as a result of your changes. 16 | 17 | Integrating early in a release is preferable, but all new features can't be integrated at the same time. If many large changes enters the repository at the same time it will be more difficult to determine which change that caused all the new bugs. If you're about to integrate a larger change you must therefore communicate this on the relevant [mailing lists] to synchronize with other Projects that may also be planning to integrate something soon. 18 | 19 | ## Milestones and phases 20 | 21 | Throughout the release there are a number of milestones and phases that define where in the release cycle we are. 22 | 23 | [**The start of a release**]{#release-start} 24 | : Since development is always ongoing in the master branch of the mainline repository ([openjdk/jdk](https://github.com/openjdk/jdk)), the start of a new release can be said to be when the former release is branched for stabilization. After the start of the release follows six months of development to implement and integrate all the cool stuff that will go into the next release. After these six months ramp down begins. 25 | 26 | [**Ramp Down Phase 1 (RDP1)**]{#rdp1} 27 | : The ramp down of a release starts with a new branch being created (the stabilization branch) from the master branch in the mainline repository. During the ramp down of a release we focus on bug fixing and stabilization in order to get the JDK ready for release. In RDP1 you may continue to fix P1-P3 product bugs (and some other issues) in the stabilization branch. For detailed information on what can be fixed when, see [Push or defer during ramp down] below. The start of RDP1 is essentially the deadline for integrating JEPs and enhancements into a particular release. 28 | 29 | [**All Tests Run (ATR)**]{#atr} 30 | : ATR is not a milestone described in JEP 3, but it's still a concept that might be mentioned in discussions on this topic and is therefore good to know about. ATR (a.k.a. ATR Start) is the start of an approximately six week long test period where all tests in the test plan for the given release is ran. ATR usually starts at the same time as RDP1. 31 | 32 | [**Ramp Down Phase 2 (RDP2)**]{#rdp2} 33 | : In RDP2 the bar is higher to get changes into the release. For product bugs, only P1:s and P2:s are supposed to be fixed here, and to do so an approval is needed. See the [Fix-Request Process](https://openjdk.org/jeps/3#Fix-Request-Process) for details on how to obtain one. All other product bugs should be deferred. See [Push or defer during ramp down] below for more details. Also note that there is no guarantee that localization can be done for changes made in RDP2. 34 | 35 | [**Release Candidate (RC)**]{#rc} 36 | : Towards the end of the release cycle, when there are no more open product bugs targeted to the release, a stable build is selected to be the release candidate. This build will go through additional testing and if no more issues are found it will be the build released. If new bugs are found these are investigated and hopefully fixed, and a new build becomes the release candidate. The RC phase has a few milestones with a deadline for finding a candidate build, and another for making sure the build is ready to go live. 37 | 38 | [**General Availability (GA)**]{#ga} 39 | : This is the end of the release cycle. The last release candidate build is made available to the public. 40 | 41 | ### Push or defer during ramp down 42 | 43 | [JEP 3](https://openjdk.org/jeps/3) contains the exact definitions for what can be done when. This is a visualization of those definitions that may or may not clarify things. 44 | 45 | ![Push and defer guidelines during ramp down](push-defer.png) 46 | 47 | ### Deferring P1 and P2 bugs 48 | 49 | Even though there's nothing explicitly written in the process about deferring P1 and P2 bugs during the initial development phase, the assumption is that these aren't deferred unless time runs out at the end of the release cycle. 50 | 51 | Please note that the priority of a bug doesn't change just because you want to get your fix in late in the release, or if you want to be able to defer it. The priority is based on the severity of the bug and if it was deemed to be a P2 before, you better have a really good explanation to why that conveniently has changed by the end of the release. Being hard to fix is **not** a reason to lower the priority of a bug. 52 | 53 | ::: {.box} 54 | [To the top](#){.boxheader} 55 | ::: 56 | -------------------------------------------------------------------------------- /src/guide/working-with-pull-requests.md: -------------------------------------------------------------------------------- 1 | # Working With Pull Requests 2 | 3 | ::: {.box} 4 | [Quick Links]{.boxheader} 5 | 6 | * [Skara documentation on PR commands](https://wiki.openjdk.org/display/SKARA/Pull+Request+Commands) 7 | ::: 8 | 9 | Once you have made a change that you want to integrate into an OpenJDK code base you need to create a _Pull Request_ (PR) on [GitHub](https://github.com). This section assumes that you have previous experience from using git and [GitHub](https://github.com), and won't go into details of how those work. Still, the aim is of course to provide a useful guide, so [send an email](#about-this-guide) if more details are needed. 10 | 11 | This section also assumes that you have already read [I have a patch, what do I do?] and followed **all** the steps there. 12 | 13 | ::: {.note} 14 | Please note that the description of a change should always be in the JBS issue. The [GitHub](https://github.com) PR can be a good place to discuss technical implementation details regarding your change, but it's not the right place to describe the problem. Make sure you have a proper problem description in your JBS issue before publishing a PR. 15 | ::: 16 | 17 | ## Think once more 18 | 19 | All code reviews in OpenJDK are done in public. Once you open your PR for public review the internet can see it and comment on it. Make sure your code is ready for it. Look through your comments, make sure that temporary code is gone, and make sure you have sanitized your method and variable names. Also, make sure you understand your code. Why is it working? What are the potential pitfalls? What are the edge-cases? If you haven't already answered all these questions in the mail conversation that preceded this PR, it's likely that you will need to answer them during the review. 20 | 21 | It's also worth taking the extra time to see if the change can be split into a few different separate changes. A large change will take more effort and thus attract fewer [Reviewers](https://openjdk.org/bylaws#reviewer). Smaller changes will get reviewed faster and get better quality reviews. You can compare proposing a single large change to proposing ten individual small unrelated changes. What happens in practice when all these ten changes are presented as one PR is that there's a focus on say 5-6 of these smaller changes and no one really looks hard at the other 4-5. For complexity, even small changes that are hard to understand and test may be risky. 22 | 23 | The timing of your change will also affect the availability of reviewers. The JDK runs on a [six-months release cadence](#release-cycle). During the months around the start of the ramp down phase most area experts will be busy working on their own changes and reviewing major features that are planned for the release. If you propose a change during this period (basically May-June, or November-December) it may take a long time before you get the required reviews. 24 | 25 | ## Rebase before creating the PR 26 | 27 | It's likely that other people have integrated changes to the code base since you created your branch. Make sure to pull the latest changes and rebase your fix on top of that before creating your PR. This is a courtesy issue. Your reviewers shouldn't have to read your patch on top of old code that has since changed. This is hopefully obvious in cases where the upstream code has gone through cleanups or refactorings, and your patch may need similar cleanups in order to even compile. But even in cases where only smaller changes have been done, the reviewers shouldn't have to react to issues like "that line of code was moved last week, why is it back there?". 28 | 29 | Most changes are made to the `master` branch of the mainline repository. In these cases, rebase using: 30 | 31 | ~~~ 32 | git rebase master 33 | ~~~ 34 | 35 | Note that if you are working on a backport to a stabilization branch you should replace `master` above with the name of the branch you are targeting. This would be the same name as when you cloned the branch. 36 | 37 | After the PR has been published, rebasing, force-pushing, and similar actions are strongly discouraged. Such actions will disrupt the workflow for reviewers who fetch the PR branch. Pushing new changes is fine (and even merging if necessary) for a PR under review. Incremental diffs and other tools will help your reviewers see what you have changed. In the end, all commits will be squashed into a single commit automatically, so there're actually no drawbacks whatsoever to making commits to a PR branch during review. 38 | 39 | ## Final check before creating the PR 40 | 41 | Creating the PR is essentially the same as asking a large group of people to start reviewing your change. Before doing that, you want to make sure your change is done in every detail you have the power to control. These are a few of the things you should think about in order to avoid wasting people's time on an unfinished change. (You may think that some of these are too obvious to even mention, but all of them are things that in the past have caused actual failures that broke the JDK for **all** developers out there.) 42 | 43 | * Is the copyright statement at the top of each modified source file correct? 44 | 45 | * Did you run a full build and all relevant tests on the **final** version of the change? It's important to do this on the truly final version, as even an apparently trivial change in a comment can break the build. 46 | 47 | * Did you `git add` all new files? 48 | 49 | * Did you add regression tests for your change? 50 | 51 | * Did you run those new regression tests? 52 | 53 | If you are unsure of any of these things but still want to go ahead and create the PR, **don't!** 54 | 55 | If you have an actual reason to create a PR before the change is all done, make sure to create it in `DRAFT` mode. The bot won't add the `rfr` label or send emails to labeled [Groups](https://openjdk.org/bylaws#group) as long as the PR is in `DRAFT` mode. 56 | 57 | ## Life of a PR 58 | 59 | #. **Make sure the PR is reviewable** 60 | 61 | There are changes that span across several areas, for example wide spread cleanups or the introduction of a new language feature. Accordingly, the number of lines of code touched can be quite large, which makes it harder to review the entire PR. In such cases, it may make sense to split the change into several PRs, most commonly by grouping them by module or area. 62 | 63 | #. **Make sure you target the correct branch** 64 | 65 | Many project repositories have several branches. Make sure your PR targets the correct one. This is of course especially important when not targeting the default branch. At the top of your PR, right below the title, it will say "NNN wants to merge X commit(s) into [branch]". A typical red flag to watch out for is if your PR seems to include commits or changed files that shouldn't be part of your integration. E.g. Seeing the "Start of release updates for JDK N" when backporting something to JDK N-1 is a bad sign. 66 | 67 | #. **Set a correctly formatted title** 68 | 69 | The title of the PR should be of the form "`nnnnnnn: Title of JBS issue`" where `nnnnnnn` is the JBS issue id of the main JBS issue that is being fixed, and the `Title of JBS issue` is the exact title of the issue as written in JBS. In fact, the title can be set to _only_ the JBS issue id (`nnnnnnn`) in which case the bot will fetch the title from JBS automatically. If you are creating a backport PR, see [Using the Skara tooling to help with backports] for more details on the title requirements. 70 | 71 | #. **Write a useful description** 72 | 73 | The description of the PR should state what problem is being solved and shortly describe how it's solved. The PR description should also list what testing has been done. [Reviewers](https://openjdk.org/bylaws#reviewer) and other interested readers are referred to the text in the JBS issue for details, but the description should be enough to give an overview. This assumes there's useful information in the JBS issue, like an evaluation etc. If not, add it. 74 | 75 | Remember that the description is included in many emails sent to lists with many receivers, so a too long description can cause a lot of noise, while of course a too short description won't give the reader enough information to perform the review. If you have a lot of information you wish to add to your PR, like performance evaluations, you can put that in a separate comment in the PR. 76 | 77 | #. **Finish the change before publishing it** 78 | 79 | Each update to a published PR will result in emails being sent to all relevant lists. This is per design and it's how we want it to be, but it also mean that if you publish a PR before you have gone through the final check mentioned above, and later find that a few more updates are necessary, a lot of people will get a lot of emails. 80 | 81 | #. **Make sure all relevant [Groups](https://openjdk.org/bylaws#group) are included** 82 | 83 | The bot will make an attempt to include the [Groups](https://openjdk.org/bylaws#group) that need to review your change based on the location of the source code you have changed. There may be aspects of your change that are relevant to other [Groups](https://openjdk.org/bylaws#group) as well, and the mapping from source to [Groups](https://openjdk.org/bylaws#group) isn't always perfect, so make sure all relevant [Groups](https://openjdk.org/bylaws#group) have been included, and add new labels using [`/label`](https://wiki.openjdk.org/display/SKARA/Pull+Request+Commands#PullRequestCommands-/label) if needed. Consult the [Code Owners](#code-owners) section if you are unsure of who owns the code you are changing. 84 | 85 | #. **Allow enough time for review** 86 | 87 | In general all PRs should be open for at least 24 hours to allow for reviewers in all time zones to get a chance to see it. It may actually happen that even 24 hours isn't enough. Take into account weekends, holidays, and vacation times throughout the world and you'll realize that a change that requires more than just a trivial review may have to be open for a while. In some areas [trivial changes] are allowed to be integrated without the 24 hour delay. Ask your reviewers if you think this applies to your change. 88 | 89 | #. **Get the required reviews** 90 | 91 | At least one [Reviewer](https://openjdk.org/bylaws#reviewer) knowledgeable in each area being changed must approve every change. A change may therefore require multiple [Reviewers](https://openjdk.org/bylaws#reviewer) because it affects multiple areas. Some areas (e.g. Client and HotSpot) require two reviewers in most cases, so be sure to read the relevant [OpenJDK Group](https://openjdk.org/bylaws#group) pages for advice or ask your [Sponsor](https://openjdk.org/bylaws#sponsor). 92 | 93 | Be open to comments and polite in replies. Remember that the reviewer wants to improve the world just as much as you do, only in a slightly different way. If you don't understand some comment, ask the reviewer to clarify. Accept authority when applicable. If you're making changes in an area where you're not the area expert, acknowledge that your reviewers may be. Take their advice seriously, even if it is to not make the change. There are many reasons [why a change may get rejected](#why-is-my-change-rejected). And you did read the section [Things to consider before proposing changes to OpenJDK code], right? 94 | 95 | #. **Updating the PR** 96 | 97 | You may need to change the code in response to review comments. To do this, simply commit new changes and push them onto the PR branch. The PR will be updated automatically. Multiple commits to the branch will be squashed into a single commit when the PR is eventually integrated. 98 | 99 | If the set of files in the PR has changed, this may affect the [Groups](https://openjdk.org/bylaws#group) that need to review the PR. Make sure to adjust the PR labels accordingly. 100 | 101 | If you want to update the title of the PR, remember that the one and only truth is the JBS issue, so the title must first be changed there. 102 | 103 | After having made all updates needed to get to the final version of the change, remember to re-run relevant testing. Even minor changes may go bad and you don't want to cause (another) build failure due to an updated comment. 104 | 105 | #. **Merge the latest changes** 106 | 107 | If your PR is out for review for a longer time it's a good habit to pull from the target repository regularly to keep the change up to date. This will make it easier to review the change and it will help you find issues caused by other changes sooner. Typically this involves fetching changes from the `master` branch of the main JDK repo, merging them into your local branch, resolving conflicts if necessary, and then pushing these changes to the PR branch. Pushing additional commits and merges into the PR branch is fine; they will be squashed into a single commit when the PR is integrated. Avoid rebasing changes, and prefer merging instead. 108 | 109 | If your PR is targeting some other branch than `master`, make sure to merge the correct upstream branch (the target branch). Verify that your PR doesn't include changes from some other branch (e.g. `master`) that aren't supposed to be there. 110 | 111 | If there are upstream changes that might affect your change, it's likely a good idea to rerun relevant testing as well. The [GHA testing](#github-actions) that's done automatically by [GitHub](https://github.com) should only be seen as a smoke test that finds the most severe problems with your change. It's highly unlikely that it will test your actual change in any greater detail - or even at all execute the code that you have changed in most cases. 112 | 113 | #. **Integrate your change** 114 | 115 | When you have the required reviews and have made sure all relevant areas have had a chance to look at your change, integrate by entering the command [`/integrate`](https://wiki.openjdk.org/display/SKARA/Pull+Request+Commands#PullRequestCommands-/integrate) in a comment on the PR. If you are not yet a [Committer](https://openjdk.org/bylaws#committer) in the [Project](https://openjdk.org/bylaws#project), ask your [Sponsor](https://openjdk.org/bylaws#sponsor) to enter the command [`/sponsor`](https://wiki.openjdk.org/display/SKARA/Pull+Request+Commands#PullRequestCommands-/sponsor) in the PR as well in order for your change to be allowed to be integrated. 116 | 117 | #. **After integration** 118 | 119 | After you have integrated your change you are expected to stay around in case there are any issues with it. As mentioned above, you are expected to have run all relevant testing on your change before integrating your PR, but regardless of how thorough you test it, things might slip through. After your change has been integrated an automatic pipeline of tests is triggered and your change will be tested on a variety of platforms and in a variety of different modes that the JDK can be executed in. A change that causes failures in this testing may be backed out if a fix can't be provided fast enough, or if the developer isn't responsive when noticed about the failure. Note that this directive should be interpreted as "it's a really bad idea to integrate a change the last thing you do before bedtime, or the day before going on vacation". 120 | 121 | ## Webrevs 122 | 123 | ::: {.box} 124 | [Quick Links]{.boxheader} 125 | 126 | * [Webrev Source Repository](https://github.com/openjdk/webrev) 127 | * [Webrev Mailing List](https://mail.openjdk.org/pipermail/webrev-dev/) 128 | ::: 129 | 130 | As all [OpenJDK Projects](https://openjdk.org/bylaws#project) are hosted on [GitHub](https://github.com), most code reviews takes place there. When you publish a PR to an OpenJDK repository the corresponding JBS issue will get a link to the code review in the PR, making this the natural place to go for review. OpenJDK do however provide other tools and infrastructure for code reviews as well: The **webrevs**. 131 | 132 | Webrev refers to both the tool used to create them and its output. The script, [`webrev.ksh`](https://github.com/openjdk/webrev/blob/master/webrev.ksh), is maintained in the [Code Tools Project](../projects/code-tools). Please note that this version of webrev is for use with mercurial and won't work with the git based repositories. You don't actually need tools like this anymore unless you want to host code reviews in other locations than [GitHub](https://github.com). 133 | 134 | On the GitHub reviews you will find links to webrevs. These are automatically generated by the bot and are provided as a complement for those who prefer this style of code review. Many OpenJDK developers are used to the webrevs as this was the default way to provide code for review before OpenJDK moved to [GitHub](https://github.com). Though webrevs are mainly deprecated today, they used to be a central part of OpenJDK development and you may still see people use the word as a synonym for code review, so they do deserve to be mentioned here as well. 135 | 136 | ## File storage for OpenJDK artifacts - `cr.openjdk.org` 137 | 138 | The `cr.openjdk.org` server provides storage and display of code review materials such as webrevs and other artifacts related to the OpenJDK Community. This area can also be used to store design documents and other documentation related OpenJDK but not related to any specific [Project](https://openjdk.org/bylaws#project) that have an OpenJDK wiki space for such purposes. 139 | 140 | Any OpenJDK [Author](https://openjdk.org/bylaws#author) can publish materials on the `cr.openjdk.org` server. Users can upload files to temporary storage using secure methods (`rsync`, `scp`, and `sftp`). 141 | 142 | This site is for open source materials related to the OpenJDK Community only. Users uploading inappropriate materials will lose access and the material will be deleted. Please review the [Terms of Use](https://openjdk.org/legal/terms.html) before using this server. 143 | 144 | ### Get your SSH key installed 145 | 146 | To use `cr.openjdk.org` you'll need to get an SSH key installed. See [Generating an SSH key] for guidance on how to generate a key. Your public key (`~/.ssh/id_rsa.pub`) should be mailed as an attachment along with your JDK username to [keys@openjdk.org](mailto:keys@openjdk.org). An administrator will install your key on the server and notify you on completion. This process may take a couple of days. 147 | 148 | ::: {.note} 149 | Users behind a SOCKS firewall can add a directive to the `~/.ssh/config` file to connect to the OpenJDK server: 150 | 151 | Host *.openjdk.org 152 | ProxyCommand /usr/lib/ssh/ssh-socks5-proxy-connect -h [socks_proxy_address] %h %p 153 | 154 | See the `ssh-socks5-proxy-connect` man page and `ssh-config` man page for more information. Other systems may require proxy access via other programs. Some Linux distributions provide the `corkscrew` package which provides ssh access through HTTP proxies. 155 | 156 | **It's recommended that all users check with their network administrators before installing any kind of TCP forwarding tool on their network. Many corporations and institutions have strict security policies in this area.** 157 | ::: 158 | 159 | ::: {.box} 160 | [To the top](#){.boxheader} 161 | ::: 162 | -------------------------------------------------------------------------------- /src/guidestyle.css: -------------------------------------------------------------------------------- 1 | /* Info boxes */ 2 | .box { 3 | margin: 1em 0em; 4 | padding: 0 0 .5em .5em; 5 | background: #f4f8ff; 6 | border-left: 5px solid #437291; 7 | } 8 | 9 | /* Headers in boxes */ 10 | .boxheader { 11 | font-weight: bold; 12 | padding-top: 0px; 13 | margin-bottom: .5em; 14 | color: #437291; 15 | } 16 | 17 | /* Notes */ 18 | .note { 19 | background-color: #f4f8ff; 20 | border-width: 2px; 21 | border-color: #437291; 22 | border-style: solid none; 23 | margin: 1em; 24 | padding: 1em 1em 0em 1em; 25 | } 26 | 27 | /* JBS field names */ 28 | .jbs-field { 29 | font-weight: bold; 30 | color: #333; 31 | } 32 | 33 | /* JBS field values */ 34 | .jbs-value { 35 | font-weight: bold; 36 | color: #013; 37 | } 38 | 39 | /* JBS labels */ 40 | .jbs-label { 41 | font-family: monospace; 42 | font-weight: bold; 43 | color: #060; 44 | white-space: nowrap; 45 | } 46 | 47 | /* Styles below this line are not meant for specific keywords. */ 48 | 49 | div.version { 50 | text-align: right; 51 | font-style: italic; 52 | } 53 | 54 | td.aligned { 55 | vertical-align: top; 56 | padding-right: 1em; 57 | } 58 | 59 | h1 { 60 | border-style: none none solid none; 61 | border-color: #437291; 62 | border-width: 2px; 63 | background: #f4f8ff; 64 | } 65 | 66 | p { 67 | margin-top: 0em; 68 | } 69 | 70 | p ~ h1 { 71 | margin-top: 2em; 72 | } 73 | 74 | ul { 75 | margin: 1em; 76 | } 77 | 78 | ul ul { 79 | margin: 0em; 80 | } 81 | 82 | li p ~ ul { 83 | margin-top: -1em; 84 | } 85 | 86 | /* Spacing between consecutive code blocks */ 87 | pre ~ pre { 88 | margin-top: 1em; 89 | } 90 | 91 | /* Code blocks */ 92 | pre > code { 93 | border: 1px solid #cccccc; 94 | background: #fcfcff; 95 | display: block; 96 | padding: .5em; 97 | margin: 0em; 98 | } 99 | 100 | table { 101 | border-spacing: 0px; 102 | } 103 | 104 | td.dictionary { 105 | padding: 1em; 106 | vertical-align: top; 107 | } 108 | 109 | td { 110 | border-style: solid none none none; 111 | border-width: 1px; 112 | border-color: #ccc; 113 | } 114 | 115 | strong > code { 116 | white-space: nowrap; 117 | color: #060; 118 | } 119 | 120 | div#TOC { 121 | position: fixed; 122 | z-index: 2; 123 | top: 0; 124 | right: 0; 125 | width: 27em; 126 | max-height: 100vh; 127 | overflow-y: auto; 128 | } 129 | 130 | @media (max-width: 81em) { 131 | div#TOC { 132 | position: static; 133 | max-height: none; 134 | overflow-y: visible; 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /src/images/affects_versions.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 33 | 34 | Affects Version 35 | 36 | 37 | 8 38 | 9 39 | 10 40 | 11 41 | 12 42 | 13 43 | 14 44 | 15 45 | 16 46 | 17 47 | 18 48 | 19 49 | 20 50 | 21 51 | 22 52 | 53 | 54 | 55 | 57 | 59 | 61 | 63 | 64 | 66 | 68 | 69 | 71 | 73 | 75 | 77 | 79 | 81 | 83 | 85 | 87 | 89 | 90 | 91 | 92 | 94 | 96 | 98 | 99 | 100 | 101 | 102 | 110 | 112 | 113 | 121 | 124 | 125 | 126 | 127 | 8 128 | 130 | 131 | 8, 132 | 8u40, 9, 12 133 | 135 | 136 | 11, 21 137 | 139 | 140 | 8 141 | 12-na 142 | 144 | 145 | 8 146 | 11-wnf 147 | 150 | 153 | 154 | 155 | 156 | (1) 157 | (2) 158 | (3) 159 | (4) 160 | (5) 161 | 162 | 163 | 164 | -------------------------------------------------------------------------------- /src/images/push-defer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openjdk/guide/acf9989ad9d0f7a10fe05ad2885a6d5563c718eb/src/images/push-defer.png -------------------------------------------------------------------------------- /src/toc.conf: -------------------------------------------------------------------------------- 1 | header.md 2 | introduction.md 3 | contributing-to-an-open-jdk-project.md 4 | mailing-lists.md 5 | code-conventions.md 6 | jbs-jdk-bug-system.md 7 | cloning-the-jdk.md 8 | making-a-change.md 9 | building-the-jdk.md 10 | testing-the-jdk.md 11 | working-with-pull-requests.md 12 | reviewing-and-sponsoring-a-change.md 13 | backporting.md 14 | release-notes.md 15 | the-jdk-release-process.md 16 | project-maintenance.md 17 | hotspot-development.md 18 | code-owners.md 19 | about-this-guide.md 20 | --------------------------------------------------------------------------------