From 10dfbb01717917f44ee3a35ec2469f4437511532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scheibe?= Date: Tue, 13 Aug 2019 22:53:55 +0200 Subject: [PATCH] Fix typos --- CONTRIBUTING.md | 6 +++--- README.md | 2 +- docs/consumer.adoc | 2 +- .../plugins/credentials/CredentialsMatchers.java | 2 +- .../plugins/credentials/CredentialsProvider.java | 10 +++++----- .../plugins/credentials/CredentialsProviderFilter.java | 4 ++-- .../credentials/CredentialsProviderManager.java | 2 +- .../plugins/credentials/CredentialsTypeFilter.java | 4 ++-- .../plugins/credentials/UserCredentialsProvider.java | 2 +- .../plugins/credentials/CredentialsProviderTest.java | 2 +- .../plugins/credentials/cli/CLICommandsTest.java | 4 ++-- .../plugins/credentials/cli/credentials-input.xml | 4 ++-- 12 files changed, 22 insertions(+), 22 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d2f1ea155..f5447d432 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,8 +5,8 @@ Truths which we believe to be self-evident (adapted from [TextSecure's](https:// 1. **The answer is not more options.** If you feel compelled to add a preference that's exposed to the user, it's very possible you've made a wrong turn somewhere. 2. **There are no power users.** The idea that some users "understand" concepts better than others has proven to be, for the post part, false. If anything, "power users" are more dangerous than the test, and we should avoid exposing dangerous functionality to them. 3. **If it's "like PGP," it's wrong.** PGP is our guide for what not to do. -4. **It's an asynchronous world.** We wary of anything that is anti-asynchronous: ACKs, protocol confirmations, or anly protocol-level "advisory" message. -5. **There is no such thing as time**. Protocol ideas that require synchonized clocks are doomed to failure. +4. **It's an asynchronous world.** We wary of anything that is anti-asynchronous: ACKs, protocol confirmations, or any protocol-level "advisory" message. +5. **There is no such thing as time**. Protocol ideas that require synchronized clocks are doomed to failure. # Code Style Guidelines @@ -95,7 +95,7 @@ To the greatest extent possible, please wrap lines to ensure that they do not ex */ @Override ``` -* Getters and Setters shall have a Javadoc comment. The following is prefered +* Getters and Setters shall have a Javadoc comment. The following is preferred ``` /** * The count of widgets diff --git a/README.md b/README.md index 9c50abc9a..1c46b9753 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ To install: 1. copy the resulting ./target/credentials.hpi file to the $JENKINS_HOME/plugins directory. Don't forget to restart Jenkins afterwards. -2. or use the plugin management console (http://example.com:8080/pluginManager/advanced) to upload the hpi file. You have to restart Jenkins in order to find the pluing in the installed plugins list. +2. or use the plugin management console (http://example.com:8080/pluginManager/advanced) to upload the hpi file. You have to restart Jenkins in order to find the plugin in the installed plugins list. ### Plugin releases diff --git a/docs/consumer.adoc b/docs/consumer.adoc index 57452a597..e52b00272 100644 --- a/docs/consumer.adoc +++ b/docs/consumer.adoc @@ -41,7 +41,7 @@ A plugin that is consuming the Credentials API has a relatively simple set of re ==== The Credentials API has evolved over time and there are a number of credentials interfaces that have been retained in order to maintain binary compatibility for plugins compiled against prior versions. -The https://github.com/jenkinsci/credentials-plugin/blob/619d7751a62689b2b0d722f504a62aed206fef17/src/main/java/com/cloudbees/plugins/credentials/common/Recommended.java[`@Recommended`] annotation is used to distingush credentials interfaces that are recommended to use. +The https://github.com/jenkinsci/credentials-plugin/blob/619d7751a62689b2b0d722f504a62aed206fef17/src/main/java/com/cloudbees/plugins/credentials/common/Recommended.java[`@Recommended`] annotation is used to distinguish credentials interfaces that are recommended to use. ==== In a lot of cases, consumer plugins will want to use credentials to authenticate against some external service. diff --git a/src/main/java/com/cloudbees/plugins/credentials/CredentialsMatchers.java b/src/main/java/com/cloudbees/plugins/credentials/CredentialsMatchers.java index bd8530fbe..3f24002e3 100644 --- a/src/main/java/com/cloudbees/plugins/credentials/CredentialsMatchers.java +++ b/src/main/java/com/cloudbees/plugins/credentials/CredentialsMatchers.java @@ -629,7 +629,7 @@ public void visitErrorNode(ErrorNode node) { */ private static class CQLSyntaxError extends RuntimeException { /** - * The eror node's text. + * The error node's text. */ private final String text; /** diff --git a/src/main/java/com/cloudbees/plugins/credentials/CredentialsProvider.java b/src/main/java/com/cloudbees/plugins/credentials/CredentialsProvider.java index 6c8deaf86..29ff09125 100644 --- a/src/main/java/com/cloudbees/plugins/credentials/CredentialsProvider.java +++ b/src/main/java/com/cloudbees/plugins/credentials/CredentialsProvider.java @@ -410,7 +410,7 @@ public static List lookupCredentials(@NonNull Class List lookupCredentials(@NonNull Class the type of credential. @@ -1139,7 +1139,7 @@ public List getCredentials(@NonNull Class type, * specified {@link Authentication} for items in the specified {@link ItemGroup} and are appropriate for the * specified {@link DomainRequirement}s. * NOTE: implementations are recommended to override this method if the actual secret information - * is being stored external from Jenkins and the non-secret information can be accessed with lesser tracability + * is being stored external from Jenkins and the non-secret information can be accessed with lesser traceability * requirements. The default implementation just uses {@link #getCredentials(Class, Item, Authentication, List)} * to build the {@link ListBoxModel}. Handling the {@link CredentialsMatcher} may require standing up a proxy * instance to apply the matcher against if {@link CredentialsMatchers#describe(CredentialsMatcher)} returns @@ -1215,7 +1215,7 @@ public List getCredentials(@NonNull Class type, * specified {@link Authentication} for the specified {@link Item} and are appropriate for the * specified {@link DomainRequirement}s. * NOTE: implementations are recommended to override this method if the actual secret information - * is being stored external from Jenkins and the non-secret information can be accessed with lesser tracability + * is being stored external from Jenkins and the non-secret information can be accessed with lesser traceability * requirements. The default implementation just uses {@link #getCredentials(Class, Item, Authentication, List)} * to build the {@link ListBoxModel}. Handling the {@link CredentialsMatcher} may require standing up a proxy * instance to apply the matcher against. diff --git a/src/main/java/com/cloudbees/plugins/credentials/CredentialsProviderFilter.java b/src/main/java/com/cloudbees/plugins/credentials/CredentialsProviderFilter.java index 226207862..2cf62f027 100644 --- a/src/main/java/com/cloudbees/plugins/credentials/CredentialsProviderFilter.java +++ b/src/main/java/com/cloudbees/plugins/credentials/CredentialsProviderFilter.java @@ -272,7 +272,7 @@ public String getDisplayName() { * @return the full list of available providers without any filtering. */ @SuppressWarnings("unused") - @Restricted(NoExternalUse.class) // slapler EL binding + @Restricted(NoExternalUse.class) // stapler EL binding public List getProviderDescriptors() { return ExtensionList.lookup(CredentialsProvider.class); } @@ -388,7 +388,7 @@ public String getDisplayName() { * @return the full list of available providers without any filtering. */ @SuppressWarnings("unused") - @Restricted(NoExternalUse.class) // slapler EL binding + @Restricted(NoExternalUse.class) // stapler EL binding public List getProviderDescriptors() { return ExtensionList.lookup(CredentialsProvider.class); } diff --git a/src/main/java/com/cloudbees/plugins/credentials/CredentialsProviderManager.java b/src/main/java/com/cloudbees/plugins/credentials/CredentialsProviderManager.java index 647dc6df2..6fd1a0221 100644 --- a/src/main/java/com/cloudbees/plugins/credentials/CredentialsProviderManager.java +++ b/src/main/java/com/cloudbees/plugins/credentials/CredentialsProviderManager.java @@ -438,7 +438,7 @@ public boolean configure(StaplerRequest req, JSONObject json) throws FormExcepti if (Jenkins.get().hasPermission(Jenkins.ADMINISTER)) { if (!json.has("restrictions")) { // JENKINS-36090 stapler "helpfully" does not submit the restrictions if there are none - // and hence you can never delete the laste one + // and hence you can never delete the last one json.put("restrictions", new JSONArray()); } req.bindJSON(this, json); diff --git a/src/main/java/com/cloudbees/plugins/credentials/CredentialsTypeFilter.java b/src/main/java/com/cloudbees/plugins/credentials/CredentialsTypeFilter.java index ec695f7d5..f6336bfde 100644 --- a/src/main/java/com/cloudbees/plugins/credentials/CredentialsTypeFilter.java +++ b/src/main/java/com/cloudbees/plugins/credentials/CredentialsTypeFilter.java @@ -271,7 +271,7 @@ public String getDisplayName() { * @return the full list of available types without any filtering. */ @SuppressWarnings("unused") - @Restricted(NoExternalUse.class) // slapler EL binding + @Restricted(NoExternalUse.class) // stapler EL binding public List getTypeDescriptors() { return ExtensionList.lookup(CredentialsDescriptor.class); } @@ -387,7 +387,7 @@ public String getDisplayName() { * @return the full list of available types without any filtering. */ @SuppressWarnings("unused") - @Restricted(NoExternalUse.class) // slapler EL binding + @Restricted(NoExternalUse.class) // stapler EL binding public List getTypeDescriptors() { return ExtensionList.lookup(CredentialsDescriptor.class); } diff --git a/src/main/java/com/cloudbees/plugins/credentials/UserCredentialsProvider.java b/src/main/java/com/cloudbees/plugins/credentials/UserCredentialsProvider.java index 01f52c661..b08272b5a 100644 --- a/src/main/java/com/cloudbees/plugins/credentials/UserCredentialsProvider.java +++ b/src/main/java/com/cloudbees/plugins/credentials/UserCredentialsProvider.java @@ -444,7 +444,7 @@ private synchronized boolean updateCredentials(@NonNull Domain domain, @NonNull /** * Helper method to check the specified permission. * - * @param p the permission to checl. + * @param p the permission to check. */ private void checkPermission(Permission p) { if (user.equals(User.current())) { diff --git a/src/test/java/com/cloudbees/plugins/credentials/CredentialsProviderTest.java b/src/test/java/com/cloudbees/plugins/credentials/CredentialsProviderTest.java index 5b3403f88..deee8eb74 100644 --- a/src/test/java/com/cloudbees/plugins/credentials/CredentialsProviderTest.java +++ b/src/test/java/com/cloudbees/plugins/credentials/CredentialsProviderTest.java @@ -262,7 +262,7 @@ public void testLegacyCredentialMigration() throws Exception { } @Test - public void testNodeCredentialFingerprintsAreRemovedForNonExistantNodes() throws Exception { + public void testNodeCredentialFingerprintsAreRemovedForNonExistentNodes() throws Exception { // Create dummy credentials to use DummyCredentials globalCred = new DummyCredentials(CredentialsScope.GLOBAL, "globalCred", "pwd"); // Find how many times this credential has been currently tracked diff --git a/src/test/java/com/cloudbees/plugins/credentials/cli/CLICommandsTest.java b/src/test/java/com/cloudbees/plugins/credentials/cli/CLICommandsTest.java index 4e656f3d9..a0b079a70 100644 --- a/src/test/java/com/cloudbees/plugins/credentials/cli/CLICommandsTest.java +++ b/src/test/java/com/cloudbees/plugins/credentials/cli/CLICommandsTest.java @@ -317,10 +317,10 @@ public void listCredentialsAsXML() throws IOException { new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, "smokes-id", "smoke testing", "smoke", "smoke text"); UsernamePasswordCredentialsImpl global = - new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, "global-cred-id", "Globla Credentials", "john", + new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, "global-cred-id", "Global Credentials", "john", "john"); UsernamePasswordCredentialsImpl globalDomainSystemScope = - new UsernamePasswordCredentialsImpl(CredentialsScope.SYSTEM, "global-cred-id-system", "Globla Credentials", "john", + new UsernamePasswordCredentialsImpl(CredentialsScope.SYSTEM, "global-cred-id-system", "Global Credentials", "john", "john"); CLICommandInvoker invoker = new CLICommandInvoker(r, new ListCredentialsAsXmlCommand()); CLICommandInvoker.Result result = invoker.invokeWithArgs("system::system::jenkins"); diff --git a/src/test/resources/com/cloudbees/plugins/credentials/cli/credentials-input.xml b/src/test/resources/com/cloudbees/plugins/credentials/cli/credentials-input.xml index 9abe22a67..17b492c55 100644 --- a/src/test/resources/com/cloudbees/plugins/credentials/cli/credentials-input.xml +++ b/src/test/resources/com/cloudbees/plugins/credentials/cli/credentials-input.xml @@ -7,7 +7,7 @@ GLOBAL global-cred-id - Globla Credentials + Global Credentials john @@ -37,4 +37,4 @@ - \ No newline at end of file +