This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy-geb.git


The following commit(s) were added to refs/heads/master by this push:
     new 183b428e minor refactor: fix style warnings
183b428e is described below

commit 183b428e2d3a123b0db1059e97de319e8679269d
Author: Paul King <[email protected]>
AuthorDate: Fri Dec 20 17:25:39 2024 +1000

    minor refactor: fix style warnings
---
 doc/manual/src/docs/asciidoc/040-pages.adoc              |  2 +-
 doc/manual/src/docs/asciidoc/080-javascript.adoc         |  6 +++---
 doc/manual/src/docs/asciidoc/140-project.adoc            |  6 +++---
 doc/site/src/test/groovy/geb/crawl/NormalizeURL.java     | 13 ++++---------
 .../geb/gradle/saucelabs/UnpackSauceConnect.groovy       |  2 +-
 module/geb-core/src/main/groovy/geb/Browser.groovy       |  2 +-
 module/geb-core/src/main/groovy/geb/Module.groovy        |  2 +-
 module/geb-core/src/main/groovy/geb/Page.groovy          |  8 ++++----
 .../groovy/geb/buildadapter/BuildAdapterFactory.groovy   |  2 +-
 .../src/main/groovy/geb/content/Navigable.groovy         |  2 +-
 .../src/main/groovy/geb/driver/CloudDriverFactory.groovy |  2 +-
 .../main/groovy/geb/driver/NameBasedDriverFactory.groovy |  2 +-
 .../main/groovy/geb/driver/RemoteDriverOperations.groovy |  2 +-
 .../src/main/groovy/geb/frame/DefaultFrameSupport.groovy | 14 +++++++-------
 .../src/main/groovy/geb/frame/FrameSupport.groovy        | 14 +++++++-------
 .../groovy/geb/frame/UninitializedFrameSupport.groovy    | 14 +++++++-------
 .../main/groovy/geb/navigator/DefaultNavigator.groovy    | 10 +++++-----
 .../src/main/groovy/geb/navigator/Navigator.groovy       |  8 ++++----
 .../main/groovy/geb/waiting/DefaultWaitingSupport.groovy |  8 ++++----
 .../geb/waiting/UninitializedWaitingSupport.groovy       |  2 +-
 .../src/main/groovy/geb/waiting/WaitingSupport.groovy    | 16 ++++++++--------
 .../geb/conf/ConfigurationDriverCreationSpec.groovy      |  4 ++--
 .../groovy/geb/transform/implicitassertions/Runtime.java |  2 +-
 .../ImplicitAssertionsTransformationSpec.groovy          |  2 +-
 .../groovy/geb/waiting/PotentiallyWaitingExecutor.groovy |  2 +-
 .../geb-waiting/src/main/groovy/geb/waiting/Wait.groovy  |  2 +-
 26 files changed, 72 insertions(+), 77 deletions(-)

diff --git a/doc/manual/src/docs/asciidoc/040-pages.adoc 
b/doc/manual/src/docs/asciidoc/040-pages.adoc
index db4880b4..1fbbf85f 100644
--- a/doc/manual/src/docs/asciidoc/040-pages.adoc
+++ b/doc/manual/src/docs/asciidoc/040-pages.adoc
@@ -545,7 +545,7 @@ The `verifyAt()` method call will either:
 “At checkers” should be kept simple - they should only verify that the 
expected page is rendered and not deal with any page specific logic.
 
 They should only allow to check that the browser is, for example, at the order 
summary page and not at the product details or, even worse, the not found page.
-They should not, on the other hand, verify anything related to the logic 
associated with the page checked, like for example the structure of it or some 
predicate that should always be fulfiled.
+They should not, on the other hand, verify anything related to the logic 
associated with the page checked, like for example the structure of it or some 
predicate that should always be fulfilled.
 Such checks are better suited for a test than an “at checker”.
 That's because “at checkers” are evaluated multiple times, quite often 
implicitly, like when using `to()` method, effectively meaning that the same 
thing is verified over and over again.
 
diff --git a/doc/manual/src/docs/asciidoc/080-javascript.adoc 
b/doc/manual/src/docs/asciidoc/080-javascript.adoc
index d9bc3c20..a8ba6bd8 100644
--- a/doc/manual/src/docs/asciidoc/080-javascript.adoc
+++ b/doc/manual/src/docs/asciidoc/080-javascript.adoc
@@ -237,7 +237,7 @@ Quite often the asynchronicity is hard to spot if the 
asynchronous events occur
 [IMPORTANT]
 ====
 This section introduces a feature which depends on a Chromium specific, custom 
WebDriver command.
-Calling the methods mentioned in the next paraghraph will only work when 
driving a Chromium based browser (Chromium, Chrome or Edge) and will throw an 
exception for other browsers.
+Calling the methods mentioned in the next paragraph will only work when 
driving a Chromium based browser (Chromium, Chrome or Edge) and will throw an 
exception for other browsers.
 ====
 
 Thankfully Chrome driver supports controlling network conditions via it's 
custom `setNetworkConditions` command which allows to control the network 
conditions of the browser.
@@ -253,8 +253,8 @@ 
include::{ct-snippets-dir}/geb/BrowserNetworkLatencySpec.groovy[tag=setNetworkLa
 
 [NOTE]
 ====
-There are various types of asynchronous events occuring in a browser and AJAX 
calls which are network related are only one example.
-Animations would be another example of asynchronicity in web applications and 
the methods mentioned above will have no influence on timining issues 
introduced by animations or any other asynchronous events.
+There are various types of asynchronous events occurring in a browser and AJAX 
calls which are network related are only one example.
+Animations would be another example of asynchronicity in web applications and 
the methods mentioned above will have no influence on timing issues introduced 
by animations or any other asynchronous events.
 ====
 
 == Alert and confirm dialogs
diff --git a/doc/manual/src/docs/asciidoc/140-project.adoc 
b/doc/manual/src/docs/asciidoc/140-project.adoc
index 95ac9883..fa607b7f 100644
--- a/doc/manual/src/docs/asciidoc/140-project.adoc
+++ b/doc/manual/src/docs/asciidoc/140-project.adoc
@@ -678,7 +678,7 @@ new <<form-element, `FormElement`>> module class.
 
 * Support for dealing with self-signed certificates in Download API using 
`SelfSignedCertificateHelper`. [issueh:150[]]
 * Connections created when using Download API can be configured globally using 
`defaultDownloadConfig` configuration option.
-* New `atCheckWaiting` configuration option allowing to implictly wrap “at” 
checkers in `waitFor` calls. [issueh:253[]]
+* New `atCheckWaiting` configuration option allowing to implicitly wrap “at” 
checkers in `waitFor` calls. [issueh:253[]]
 
 ==== Fixes
 
@@ -755,7 +755,7 @@ new <<form-element, `FormElement`>> module class.
 ==== Breaking changes
 
 * `click()` now instructs the browser to click *only on the first* element the 
navigator has matched
-* All `click()` method variants return the reciever
+* All `click()` method variants return the receiver
 * Content definitions with `required: false, wait: true` return `null` and do 
not throw `WaitTimeoutException` if the timeout expires
 * Assignment statements are not allowed anymore in closure expressions passed 
to `waitFor()` calls
 * `at()` now throws AssertionException if at checking fails instead of 
returning false
@@ -776,7 +776,7 @@ new <<form-element, `FormElement`>> module class.
 * New `withWindow()` and `withNewWindow()` methods for working with multiple 
windows
 * Added `getCurrentWindow()` and `getAvailableWindows()` methods to browser 
that delegate to the underlying driver instance
 * Content aliasing is now possible using `aliases` parameter in content DSL
-* If config script is not found a config class will be used if there is any - 
this is usefull if you run test using Geb from IDE
+* If config script is not found a config class will be used if there is any - 
this is useful if you run test using Geb from IDE
 * Drivers are now cached across the whole JVM, which avoids the browser 
startup cost in some situations
 * Added config option to disable quitting of cached browsers on JVM shutdown
 
diff --git a/doc/site/src/test/groovy/geb/crawl/NormalizeURL.java 
b/doc/site/src/test/groovy/geb/crawl/NormalizeURL.java
index 9ba8ff39..7637baac 100644
--- a/doc/site/src/test/groovy/geb/crawl/NormalizeURL.java
+++ b/doc/site/src/test/groovy/geb/crawl/NormalizeURL.java
@@ -48,12 +48,7 @@ public class NormalizeURL {
 
         if (params != null) {
             // Some params are only relevant for user tracking, so remove the 
most commons ones.
-            for (Iterator<String> i = params.keySet().iterator(); i.hasNext(); 
) {
-                final String key = i.next();
-                if (key.startsWith("utm_") || key.contains("session")) {
-                    i.remove();
-                }
-            }
+            params.keySet().removeIf(key -> key.startsWith("utm_") || 
key.contains("session"));
             queryString = "?" + canonicalize(params);
         } else {
             queryString = "";
@@ -81,10 +76,10 @@ public class NormalizeURL {
         }
 
         final String[] pairs = queryString.split("&");
-        final Map<String, String> params = new HashMap<String, 
String>(pairs.length);
+        final Map<String, String> params = new HashMap<>(pairs.length);
 
         for (final String pair : pairs) {
-            if (pair.length() < 1) {
+            if (pair.isEmpty()) {
                 continue;
             }
 
@@ -112,7 +107,7 @@ public class NormalizeURL {
             }
         }
 
-        return new TreeMap<String, String>(params);
+        return new TreeMap<>(params);
     }
 
     /**
diff --git 
a/integration/geb-gradle/src/main/groovy/geb/gradle/saucelabs/UnpackSauceConnect.groovy
 
b/integration/geb-gradle/src/main/groovy/geb/gradle/saucelabs/UnpackSauceConnect.groovy
index 063997a4..fcdb96d9 100644
--- 
a/integration/geb-gradle/src/main/groovy/geb/gradle/saucelabs/UnpackSauceConnect.groovy
+++ 
b/integration/geb-gradle/src/main/groovy/geb/gradle/saucelabs/UnpackSauceConnect.groovy
@@ -61,7 +61,7 @@ abstract class UnpackSauceConnect extends DefaultTask {
         deleteOutputFile()
 
         def operations = new SauceConnectOperations(sauceConnect)
-        def manager = 
operations.loadSauceConnectFourManagerClass().newInstance()
+        def manager = 
operations.loadSauceConnectFourManagerClass().getConstructor().newInstance()
 
         manager.extractZipFile(temporaryDir, operations.operatingSystem)
 
diff --git a/module/geb-core/src/main/groovy/geb/Browser.groovy 
b/module/geb-core/src/main/groovy/geb/Browser.groovy
index 50e8e103..625e0d5d 100644
--- a/module/geb-core/src/main/groovy/geb/Browser.groovy
+++ b/module/geb-core/src/main/groovy/geb/Browser.groovy
@@ -261,7 +261,7 @@ class Browser {
      *
      * @return an initialized page instance set as the current page
      */
-    public <T extends Page> T page(Class<T> pageClass) {
+    <T extends Page> T page(Class<T> pageClass) {
         makeCurrentPage(createPage(pageClass))
     }
 
diff --git a/module/geb-core/src/main/groovy/geb/Module.groovy 
b/module/geb-core/src/main/groovy/geb/Module.groovy
index b49d6146..64cf4b5f 100644
--- a/module/geb-core/src/main/groovy/geb/Module.groovy
+++ b/module/geb-core/src/main/groovy/geb/Module.groovy
@@ -122,7 +122,7 @@ class Module implements Navigator, PageContentContainer, 
Initializable, WaitingS
     }
 
     @Override
-    def <T> T waitFor(Map params = [:], String waitPreset, Closure<T> block) {
+    <T> T waitFor(Map params = [:], String waitPreset, Closure<T> block) {
         waitingSupport.waitFor(params, waitPreset, block)
     }
 
diff --git a/module/geb-core/src/main/groovy/geb/Page.groovy 
b/module/geb-core/src/main/groovy/geb/Page.groovy
index fdb71798..d02b0c4d 100644
--- a/module/geb-core/src/main/groovy/geb/Page.groovy
+++ b/module/geb-core/src/main/groovy/geb/Page.groovy
@@ -332,7 +332,7 @@ class Page implements Navigable, PageContentContainer, 
Initializable, WaitingSup
      * @throws {@link geb.waiting.WaitTimeoutException} if the block does not 
produce a true-ish value in time
      * @see geb.Configuration#getDefaultWait()
      */
-    public <T> T refreshWaitFor(Map params = [:], Closure<T> block) {
+    <T> T refreshWaitFor(Map params = [:], Closure<T> block) {
         waitingSupport.waitFor(params, withRefresh(block))
     }
 
@@ -347,7 +347,7 @@ class Page implements Navigable, PageContentContainer, 
Initializable, WaitingSup
      * @throws {@link geb.waiting.WaitTimeoutException} if the block does not 
produce a true-ish value in time
      * @see geb.Configuration#getWaitPreset(java.lang.String)
      */
-    public <T> T refreshWaitFor(Map params = [:], String waitPreset, 
Closure<T> block) {
+    <T> T refreshWaitFor(Map params = [:], String waitPreset, Closure<T> 
block) {
         waitingSupport.waitFor(params, waitPreset, withRefresh(block))
     }
 
@@ -361,7 +361,7 @@ class Page implements Navigable, PageContentContainer, 
Initializable, WaitingSup
      * @return the true-ish return value from {@code block}
      * @throws {@link geb.waiting.WaitTimeoutException} if the block does not 
produce a true-ish value in time
      */
-    public <T> T refreshWaitFor(Map params = [:], Number timeout, Closure<T> 
block) {
+    <T> T refreshWaitFor(Map params = [:], Number timeout, Closure<T> block) {
         waitingSupport.waitFor(params, timeout, withRefresh(block))
     }
 
@@ -376,7 +376,7 @@ class Page implements Navigable, PageContentContainer, 
Initializable, WaitingSup
      * @return the true-ish return value from {@code block}
      * @throws {@link geb.waiting.WaitTimeoutException} if the block does not 
produce a true-ish value in time
      */
-    public <T> T refreshWaitFor(Map params = [:], Number timeout, Number 
interval, Closure<T> block) {
+    <T> T refreshWaitFor(Map params = [:], Number timeout, Number interval, 
Closure<T> block) {
         waitingSupport.waitFor(params, timeout, interval, withRefresh(block))
     }
 
diff --git 
a/module/geb-core/src/main/groovy/geb/buildadapter/BuildAdapterFactory.groovy 
b/module/geb-core/src/main/groovy/geb/buildadapter/BuildAdapterFactory.groovy
index 01dad4b6..5c56c4f1 100644
--- 
a/module/geb-core/src/main/groovy/geb/buildadapter/BuildAdapterFactory.groovy
+++ 
b/module/geb-core/src/main/groovy/geb/buildadapter/BuildAdapterFactory.groovy
@@ -43,7 +43,7 @@ class BuildAdapterFactory {
     static BuildAdapter getBuildAdapter(ClassLoader classLoader) throws 
ClassNotFoundException {
         def className = System.getProperty(ADAPTER_PROPERTY_NAME)
         if (className) {
-            classLoader.loadClass(className).newInstance()
+            classLoader.loadClass(className).getConstructor().newInstance()
         } else {
             new SystemPropertiesBuildAdapter()
         }
diff --git a/module/geb-core/src/main/groovy/geb/content/Navigable.groovy 
b/module/geb-core/src/main/groovy/geb/content/Navigable.groovy
index 72f8ed6f..957ae109 100644
--- a/module/geb-core/src/main/groovy/geb/content/Navigable.groovy
+++ b/module/geb-core/src/main/groovy/geb/content/Navigable.groovy
@@ -49,7 +49,7 @@ interface Navigable extends Locator {
      * @param moduleClass a class extending {@link geb.Module}
      * @return an initialized instance of the module class passed as the 
argument
      */
-    public <T extends Module> T module(Class<T> moduleClass)
+    <T extends Module> T module(Class<T> moduleClass)
 
     /**
      * Initialize a module instance.
diff --git 
a/module/geb-core/src/main/groovy/geb/driver/CloudDriverFactory.groovy 
b/module/geb-core/src/main/groovy/geb/driver/CloudDriverFactory.groovy
index 404416df..8cf345ae 100644
--- a/module/geb-core/src/main/groovy/geb/driver/CloudDriverFactory.groovy
+++ b/module/geb-core/src/main/groovy/geb/driver/CloudDriverFactory.groovy
@@ -50,7 +50,7 @@ abstract class CloudDriverFactory {
         }
         capabilities.putAll(additionalCapabilities)
 
-        def desiredCapabilities = 
remoteDriverOperations.softLoadRemoteDriverClass('DesiredCapabilities').newInstance()
+        def desiredCapabilities = 
remoteDriverOperations.softLoadRemoteDriverClass('DesiredCapabilities').getConstructor().newInstance()
         configureCapabilities(username, key, desiredCapabilities)
         capabilities.each { capability, value ->
             desiredCapabilities.setCapability(capability, value)
diff --git 
a/module/geb-core/src/main/groovy/geb/driver/NameBasedDriverFactory.groovy 
b/module/geb-core/src/main/groovy/geb/driver/NameBasedDriverFactory.groovy
index 284b5ceb..1aff230c 100644
--- a/module/geb-core/src/main/groovy/geb/driver/NameBasedDriverFactory.groovy
+++ b/module/geb-core/src/main/groovy/geb/driver/NameBasedDriverFactory.groovy
@@ -45,7 +45,7 @@ class NameBasedDriverFactory implements DriverFactory {
         }
 
         if (driverClass) {
-            driverClass.newInstance()
+            driverClass.getConstructor().newInstance()
         } else {
             throw new UnableToLoadAnyDriversException(potentials as String[])
         }
diff --git 
a/module/geb-core/src/main/groovy/geb/driver/RemoteDriverOperations.groovy 
b/module/geb-core/src/main/groovy/geb/driver/RemoteDriverOperations.groovy
index 8646f388..7b935808 100644
--- a/module/geb-core/src/main/groovy/geb/driver/RemoteDriverOperations.groovy
+++ b/module/geb-core/src/main/groovy/geb/driver/RemoteDriverOperations.groovy
@@ -39,7 +39,7 @@ class RemoteDriverOperations {
      */
     WebDriver getAugmentedDriver(WebDriver driver) {
         asRemoteWebDriver(driver).map { remoteWebDriverClass ->
-            
softLoadRemoteDriverClass("Augmenter").newInstance().augment(driver) as 
WebDriver
+            
softLoadRemoteDriverClass("Augmenter").getConstructor().newInstance().augment(driver)
 as WebDriver
         }.orElse(driver)
     }
 
diff --git 
a/module/geb-core/src/main/groovy/geb/frame/DefaultFrameSupport.groovy 
b/module/geb-core/src/main/groovy/geb/frame/DefaultFrameSupport.groovy
index bcf265ac..e3fb1e8a 100644
--- a/module/geb-core/src/main/groovy/geb/frame/DefaultFrameSupport.groovy
+++ b/module/geb-core/src/main/groovy/geb/frame/DefaultFrameSupport.groovy
@@ -36,31 +36,31 @@ class DefaultFrameSupport implements FrameSupport {
         this.browser = browser
     }
 
-    public <P extends Page, T> T withFrame(frame, @DelegatesTo.Target Class<P> 
page, @DelegatesTo(strategy = DELEGATE_FIRST, genericTypeIndex = 0) Closure<T> 
block) {
+    <P extends Page, T> T withFrame(frame, @DelegatesTo.Target Class<P> page, 
@DelegatesTo(strategy = DELEGATE_FIRST, genericTypeIndex = 0) Closure<T> block) 
{
         withFrame(frame, createPage(page), block)
     }
 
-    public <P extends Page, T> T withFrame(frame, @DelegatesTo.Target P page, 
@DelegatesTo(strategy = DELEGATE_FIRST) Closure<T> block) {
+    <P extends Page, T> T withFrame(frame, @DelegatesTo.Target P page, 
@DelegatesTo(strategy = DELEGATE_FIRST) Closure<T> block) {
         executeWithFrame(frame, page, block)
     }
 
-    public <P extends Page, T> T withFrame(Navigator frameNavigator, 
@DelegatesTo.Target Class<P> page, @DelegatesTo(strategy = DELEGATE_FIRST, 
genericTypeIndex = 0) Closure<T> block) {
+    <P extends Page, T> T withFrame(Navigator frameNavigator, 
@DelegatesTo.Target Class<P> page, @DelegatesTo(strategy = DELEGATE_FIRST, 
genericTypeIndex = 0) Closure<T> block) {
         withFrame(frameNavigator, createPage(page), block)
     }
 
-    public <P extends Page, T> T withFrame(Navigator frameNavigator, 
@DelegatesTo.Target P page, @DelegatesTo(strategy = DELEGATE_FIRST) Closure<T> 
block) {
+    <P extends Page, T> T withFrame(Navigator frameNavigator, 
@DelegatesTo.Target P page, @DelegatesTo(strategy = DELEGATE_FIRST) Closure<T> 
block) {
         executeWithFrame(frameNavigator, page, block)
     }
 
-    public <T> T withFrame(frame, Closure<T> block) {
+    <T> T withFrame(frame, Closure<T> block) {
         executeWithFrame(frame, null, block)
     }
 
-    public <T> T withFrame(Navigator frameNavigator, Closure<T> block) {
+    <T> T withFrame(Navigator frameNavigator, Closure<T> block) {
         executeWithFrame(frameNavigator, null, block)
     }
 
-    public <T> T withFrame(TemplateDerivedPageContent frame, Closure<T> block) 
{
+    <T> T withFrame(TemplateDerivedPageContent frame, Closure<T> block) {
         def page = frame.templateParams.page
         page ? withFrame(frame, page, block) : withFrame(frame as Navigator, 
block)
     }
diff --git a/module/geb-core/src/main/groovy/geb/frame/FrameSupport.groovy 
b/module/geb-core/src/main/groovy/geb/frame/FrameSupport.groovy
index a7e2a8d3..a3783ff4 100644
--- a/module/geb-core/src/main/groovy/geb/frame/FrameSupport.groovy
+++ b/module/geb-core/src/main/groovy/geb/frame/FrameSupport.groovy
@@ -26,17 +26,17 @@ import static groovy.lang.Closure.DELEGATE_FIRST
 
 interface FrameSupport {
 
-    public <T> T withFrame(frame, Closure<T> block)
+    <T> T withFrame(frame, Closure<T> block)
 
-    public <P extends Page, T> T withFrame(frame, @DelegatesTo.Target Class<P> 
page, @DelegatesTo(strategy = DELEGATE_FIRST, genericTypeIndex = 0) Closure<T> 
block)
+    <P extends Page, T> T withFrame(frame, @DelegatesTo.Target Class<P> page, 
@DelegatesTo(strategy = DELEGATE_FIRST, genericTypeIndex = 0) Closure<T> block)
 
-    public <P extends Page, T> T withFrame(frame, @DelegatesTo.Target P page, 
@DelegatesTo(strategy = DELEGATE_FIRST) Closure<T> block)
+    <P extends Page, T> T withFrame(frame, @DelegatesTo.Target P page, 
@DelegatesTo(strategy = DELEGATE_FIRST) Closure<T> block)
 
-    public <P extends Page, T> T withFrame(Navigator frame, 
@DelegatesTo.Target Class<P> page, @DelegatesTo(strategy = DELEGATE_FIRST, 
genericTypeIndex = 0) Closure<T> block)
+    <P extends Page, T> T withFrame(Navigator frame, @DelegatesTo.Target 
Class<P> page, @DelegatesTo(strategy = DELEGATE_FIRST, genericTypeIndex = 0) 
Closure<T> block)
 
-    public <P extends Page, T> T withFrame(Navigator frame, 
@DelegatesTo.Target P page, @DelegatesTo(strategy = DELEGATE_FIRST) Closure<T> 
block)
+    <P extends Page, T> T withFrame(Navigator frame, @DelegatesTo.Target P 
page, @DelegatesTo(strategy = DELEGATE_FIRST) Closure<T> block)
 
-    public <T> T withFrame(Navigator frame, Closure<T> block)
+    <T> T withFrame(Navigator frame, Closure<T> block)
 
-    public <T> T withFrame(TemplateDerivedPageContent frame, Closure<T> block)
+    <T> T withFrame(TemplateDerivedPageContent frame, Closure<T> block)
 }
\ No newline at end of file
diff --git 
a/module/geb-core/src/main/groovy/geb/frame/UninitializedFrameSupport.groovy 
b/module/geb-core/src/main/groovy/geb/frame/UninitializedFrameSupport.groovy
index af1a6872..dc8c0352 100644
--- a/module/geb-core/src/main/groovy/geb/frame/UninitializedFrameSupport.groovy
+++ b/module/geb-core/src/main/groovy/geb/frame/UninitializedFrameSupport.groovy
@@ -33,37 +33,37 @@ class UninitializedFrameSupport implements FrameSupport {
     }
 
     @Override
-    public <P extends Page, T> T withFrame(frame, @DelegatesTo.Target Class<P> 
page, @DelegatesTo(strategy = DELEGATE_FIRST, genericTypeIndex = 0) Closure<T> 
block) {
+    <P extends Page, T> T withFrame(frame, @DelegatesTo.Target Class<P> page, 
@DelegatesTo(strategy = DELEGATE_FIRST, genericTypeIndex = 0) Closure<T> block) 
{
         throw initializable.uninitializedException()
     }
 
     @Override
-    public <P extends Page, T> T withFrame(frame, @DelegatesTo.Target P page, 
@DelegatesTo(strategy = DELEGATE_FIRST) Closure<T> block) {
+    <P extends Page, T> T withFrame(frame, @DelegatesTo.Target P page, 
@DelegatesTo(strategy = DELEGATE_FIRST) Closure<T> block) {
         throw initializable.uninitializedException()
     }
 
     @Override
-    public <P extends Page, T> T withFrame(Navigator frame, 
@DelegatesTo.Target Class<P> page, @DelegatesTo(strategy = DELEGATE_FIRST, 
genericTypeIndex = 0) Closure<T> block) {
+    <P extends Page, T> T withFrame(Navigator frame, @DelegatesTo.Target 
Class<P> page, @DelegatesTo(strategy = DELEGATE_FIRST, genericTypeIndex = 0) 
Closure<T> block) {
         throw initializable.uninitializedException()
     }
 
     @Override
-    public <P extends Page, T> T withFrame(Navigator frame, 
@DelegatesTo.Target P page, @DelegatesTo(strategy = DELEGATE_FIRST) Closure<T> 
block) {
+    <P extends Page, T> T withFrame(Navigator frame, @DelegatesTo.Target P 
page, @DelegatesTo(strategy = DELEGATE_FIRST) Closure<T> block) {
         throw initializable.uninitializedException()
     }
 
     @Override
-    public <T> T withFrame(Object frame, Closure<T> block) {
+    <T> T withFrame(Object frame, Closure<T> block) {
         throw initializable.uninitializedException()
     }
 
     @Override
-    public <T> T withFrame(Navigator frame, Closure<T> block) {
+    <T> T withFrame(Navigator frame, Closure<T> block) {
         throw initializable.uninitializedException()
     }
 
     @Override
-    public <T> T withFrame(TemplateDerivedPageContent frame, Closure<T> block) 
{
+    <T> T withFrame(TemplateDerivedPageContent frame, Closure<T> block) {
         throw initializable.uninitializedException()
     }
 }
diff --git 
a/module/geb-core/src/main/groovy/geb/navigator/DefaultNavigator.groovy 
b/module/geb-core/src/main/groovy/geb/navigator/DefaultNavigator.groovy
index c09aa473..03ef0cf9 100644
--- a/module/geb-core/src/main/groovy/geb/navigator/DefaultNavigator.groovy
+++ b/module/geb-core/src/main/groovy/geb/navigator/DefaultNavigator.groovy
@@ -193,15 +193,15 @@ class DefaultNavigator implements Navigator {
         new JQueryAdapter(this)
     }
 
-    public <T extends Module> T module(Class<T> moduleClass) {
+    <T extends Module> T module(Class<T> moduleClass) {
         if (!Module.isAssignableFrom(moduleClass)) {
             throw new IllegalArgumentException("$moduleClass is not a subclass 
of ${Module}")
         }
 
-        module(moduleClass.newInstance())
+        module(moduleClass.getConstructor().newInstance())
     }
 
-    public <T extends Module> T module(T module) {
+    <T extends Module> T module(T module) {
         def baseNavigatorFactory = browser.navigatorFactory.relativeTo(this)
 
         NavigatorFactory moduleBaseNavigatorFactory = 
ModuleBaseCalculator.calculate(browser, module,
@@ -212,12 +212,12 @@ class DefaultNavigator implements Navigator {
         module
     }
 
-    public <T extends Module> List<T> moduleList(Class<T> moduleClass) {
+    <T extends Module> List<T> moduleList(Class<T> moduleClass) {
         iterator()*.module(moduleClass)
     }
 
     @SuppressWarnings(["UnnecessaryCollectCall"])
-    public <T extends Module> List<T> moduleList(Closure<T> moduleFactory) {
+    <T extends Module> List<T> moduleList(Closure<T> moduleFactory) {
         iterator().collect { it.module(moduleFactory.call()) }
     }
 
diff --git a/module/geb-core/src/main/groovy/geb/navigator/Navigator.groovy 
b/module/geb-core/src/main/groovy/geb/navigator/Navigator.groovy
index 75d96649..20ca8a3e 100644
--- a/module/geb-core/src/main/groovy/geb/navigator/Navigator.groovy
+++ b/module/geb-core/src/main/groovy/geb/navigator/Navigator.groovy
@@ -975,7 +975,7 @@ interface Navigator extends Iterable<Navigator>, Locator, 
StringRepresentationPr
      * @param moduleClass a class extending {@link geb.Module}
      * @return an initialized instance of the module class passed as the 
argument
      */
-    public <T extends Module> T module(Class<T> moduleClass)
+    <T extends Module> T module(Class<T> moduleClass)
 
     /**
      * Initialize a module instance using {@code this} as its base.
@@ -983,7 +983,7 @@ interface Navigator extends Iterable<Navigator>, Locator, 
StringRepresentationPr
      * @param module an instance of a class extending {@link geb.Module}
      * @return an initialized instance of passed as the argument
      */
-    public <T extends Module> T module(T module)
+    <T extends Module> T module(T module)
 
     /**
      * Create and initialize a list of module instances using navigators 
created from web elements which make up {@code this} navigator as their bases.
@@ -991,7 +991,7 @@ interface Navigator extends Iterable<Navigator>, Locator, 
StringRepresentationPr
      * @param moduleClass a class extending {@link geb.Module}
      * @return a list of initialized instances of the module class passed as 
the argument
      */
-    public <T extends Module> List<T> moduleList(Class<T> moduleClass)
+    <T extends Module> List<T> moduleList(Class<T> moduleClass)
 
     /**
      * Create a list of module instances using the provided factory and 
initialize them using navigators created from web elements which make up {@code 
this} navigator as their bases.
@@ -999,7 +999,7 @@ interface Navigator extends Iterable<Navigator>, Locator, 
StringRepresentationPr
      * @param moduleFactory a closure that should return a new module instance 
every time it's called
      * @return a list of initialized module instances created using the 
factory closure passed in as the argument
      */
-    public <T extends Module> List<T> moduleList(Closure<T> moduleFactory)
+    <T extends Module> List<T> moduleList(Closure<T> moduleFactory)
 
     /**
      * Checks if the sole element of {@code this} navigator is focused by 
comparing it to the element returned from {@link 
org.openqa.selenium.WebDriver.TargetLocator#activeElement()}.
diff --git 
a/module/geb-core/src/main/groovy/geb/waiting/DefaultWaitingSupport.groovy 
b/module/geb-core/src/main/groovy/geb/waiting/DefaultWaitingSupport.groovy
index b5b6c944..5caaf679 100644
--- a/module/geb-core/src/main/groovy/geb/waiting/DefaultWaitingSupport.groovy
+++ b/module/geb-core/src/main/groovy/geb/waiting/DefaultWaitingSupport.groovy
@@ -33,19 +33,19 @@ class DefaultWaitingSupport implements WaitingSupport {
         this.config = config
     }
 
-    public <T> T waitFor(Map params = [:], String waitPreset, Closure<T> 
block) {
+    <T> T waitFor(Map params = [:], String waitPreset, Closure<T> block) {
         doWaitFor(params, config.getWaitPreset(waitPreset), block)
     }
 
-    public <T> T waitFor(Map params = [:], Closure<T> block) {
+    <T> T waitFor(Map params = [:], Closure<T> block) {
         doWaitFor(params, config.defaultWait, block)
     }
 
-    public <T> T waitFor(Map params = [:], Number timeout, Closure<T> block) {
+    <T> T waitFor(Map params = [:], Number timeout, Closure<T> block) {
         doWaitFor(params, config.getWait(timeout), block)
     }
 
-    public <T> T waitFor(Map params = [:], Number timeout, Number interval, 
Closure<T> block) {
+    <T> T waitFor(Map params = [:], Number timeout, Number interval, 
Closure<T> block) {
         doWaitFor(params, new Wait(timeout, interval), block)
     }
 
diff --git 
a/module/geb-core/src/main/groovy/geb/waiting/UninitializedWaitingSupport.groovy
 
b/module/geb-core/src/main/groovy/geb/waiting/UninitializedWaitingSupport.groovy
index f8c5b674..b36f06a5 100644
--- 
a/module/geb-core/src/main/groovy/geb/waiting/UninitializedWaitingSupport.groovy
+++ 
b/module/geb-core/src/main/groovy/geb/waiting/UninitializedWaitingSupport.groovy
@@ -28,7 +28,7 @@ class UninitializedWaitingSupport implements WaitingSupport {
     }
 
     @Override
-    def <T> T waitFor(Map params = [:], String waitPreset, Closure<T> block) {
+    <T> T waitFor(Map params = [:], String waitPreset, Closure<T> block) {
         throw initializable.uninitializedException()
     }
 
diff --git a/module/geb-core/src/main/groovy/geb/waiting/WaitingSupport.groovy 
b/module/geb-core/src/main/groovy/geb/waiting/WaitingSupport.groovy
index 1ccbeb1c..99b1f0a7 100644
--- a/module/geb-core/src/main/groovy/geb/waiting/WaitingSupport.groovy
+++ b/module/geb-core/src/main/groovy/geb/waiting/WaitingSupport.groovy
@@ -30,9 +30,9 @@ interface WaitingSupport {
      * @throws {@link geb.waiting.WaitTimeoutException} if the block does not 
produce a true-ish value in time
      * @see geb.Configuration#getWaitPreset(java.lang.String)
      */
-    public <T> T waitFor(String waitPreset, Closure<T> block)
+    <T> T waitFor(String waitPreset, Closure<T> block)
 
-    public <T> T waitFor(Map params, String waitPreset, Closure<T> block)
+    <T> T waitFor(Map params, String waitPreset, Closure<T> block)
 
     /**
      * Uses the {@link geb.Configuration#getDefaultWait() default wait} from 
the {@code configuration} to
@@ -43,9 +43,9 @@ interface WaitingSupport {
      * @throws {@link geb.waiting.WaitTimeoutException} if the block does not 
produce a true-ish value in time
      * @see geb.Configuration#getDefaultWait()
      */
-    public <T> T waitFor(Closure<T> block)
+    <T> T waitFor(Closure<T> block)
 
-    public <T> T waitFor(Map params, Closure<T> block)
+    <T> T waitFor(Map params, Closure<T> block)
 
     /**
      * Invokes {@code block} every {@link 
geb.Configuration#getDefaultWaitRetryInterval()} seconds, until it returns
@@ -56,9 +56,9 @@ interface WaitingSupport {
      * @return the true-ish return value from {@code block}
      * @throws {@link geb.waiting.WaitTimeoutException} if the block does not 
produce a true-ish value in time
      */
-    public <T> T waitFor(Number timeout, Closure<T> block)
+    <T> T waitFor(Number timeout, Closure<T> block)
 
-    public <T> T waitFor(Map params, Number timeout, Closure<T> block)
+    <T> T waitFor(Map params, Number timeout, Closure<T> block)
 
     /**
      * Invokes {@code block} every {@code interval} seconds, until it returns
@@ -70,8 +70,8 @@ interface WaitingSupport {
      * @return the true-ish return value from {@code block}
      * @throws {@link geb.waiting.WaitTimeoutException} if the block does not 
produce a true-ish value in time
      */
-    public <T> T waitFor(Number timeout, Number interval, Closure<T> block)
+    <T> T waitFor(Number timeout, Number interval, Closure<T> block)
 
-    public <T> T waitFor(Map params, Number timeout, Number interval, 
Closure<T> block)
+    <T> T waitFor(Map params, Number timeout, Number interval, Closure<T> 
block)
 
 }
\ No newline at end of file
diff --git 
a/module/geb-core/src/test/groovy/geb/conf/ConfigurationDriverCreationSpec.groovy
 
b/module/geb-core/src/test/groovy/geb/conf/ConfigurationDriverCreationSpec.groovy
index 4187d26d..0840b910 100644
--- 
a/module/geb-core/src/test/groovy/geb/conf/ConfigurationDriverCreationSpec.groovy
+++ 
b/module/geb-core/src/test/groovy/geb/conf/ConfigurationDriverCreationSpec.groovy
@@ -67,7 +67,7 @@ class ConfigurationDriverCreationSpec extends Specification {
     }
 
     def c(m = [:]) {
-        def c = loadClass(ConfigObject).newInstance()
+        def c = loadClass(ConfigObject).getConstructor().newInstance()
         c.putAll(m)
         c
     }
@@ -142,7 +142,7 @@ class ConfigurationDriverCreationSpec extends Specification 
{
 
     def "specify instance"() {
         when:
-        def driver = loadClass(HtmlUnitDriver).newInstance()
+        def driver = loadClass(HtmlUnitDriver).getConstructor().newInstance()
         d = conf(c(driver: driver)).driver
         then:
         Exception e = thrown()
diff --git 
a/module/geb-implicit-assertions/src/main/groovy/geb/transform/implicitassertions/Runtime.java
 
b/module/geb-implicit-assertions/src/main/groovy/geb/transform/implicitassertions/Runtime.java
index 109ef5c1..3c8bc77f 100644
--- 
a/module/geb-implicit-assertions/src/main/groovy/geb/transform/implicitassertions/Runtime.java
+++ 
b/module/geb-implicit-assertions/src/main/groovy/geb/transform/implicitassertions/Runtime.java
@@ -24,7 +24,7 @@ import org.codehaus.groovy.runtime.InvokerHelper;
 
 public abstract class Runtime {
 
-    private static ThreadLocal<Object> recordedValue = new 
ThreadLocal<Object>();
+    private static ThreadLocal<Object> recordedValue = new ThreadLocal<>();
 
     @SuppressWarnings("UnusedDeclaration")
     public static boolean isVoidMethod(Object target, String method, Object... 
args) {
diff --git 
a/module/geb-implicit-assertions/src/test/groovy/geb/transform/implicitassertions/ImplicitAssertionsTransformationSpec.groovy
 
b/module/geb-implicit-assertions/src/test/groovy/geb/transform/implicitassertions/ImplicitAssertionsTransformationSpec.groovy
index b7baec05..8130e777 100644
--- 
a/module/geb-implicit-assertions/src/test/groovy/geb/transform/implicitassertions/ImplicitAssertionsTransformationSpec.groovy
+++ 
b/module/geb-implicit-assertions/src/test/groovy/geb/transform/implicitassertions/ImplicitAssertionsTransformationSpec.groovy
@@ -180,7 +180,7 @@ class ImplicitAssertionsTransformationSpec extends 
Specification {
     }
 
     private getTransformedInstanceWithClosureBody(String... code) {
-        getTransformedClassWithClosureBody(code).newInstance()
+        getTransformedClassWithClosureBody(code).getConstructor().newInstance()
     }
 
 }
diff --git 
a/module/geb-waiting/src/main/groovy/geb/waiting/PotentiallyWaitingExecutor.groovy
 
b/module/geb-waiting/src/main/groovy/geb/waiting/PotentiallyWaitingExecutor.groovy
index bc834c8f..7020d90b 100644
--- 
a/module/geb-waiting/src/main/groovy/geb/waiting/PotentiallyWaitingExecutor.groovy
+++ 
b/module/geb-waiting/src/main/groovy/geb/waiting/PotentiallyWaitingExecutor.groovy
@@ -26,7 +26,7 @@ class PotentiallyWaitingExecutor {
         this.wait = wait
     }
 
-    public <T> T execute(Closure<T> block) {
+    <T> T execute(Closure<T> block) {
         if (wait) {
             wait.waitFor(block)
         } else {
diff --git a/module/geb-waiting/src/main/groovy/geb/waiting/Wait.groovy 
b/module/geb-waiting/src/main/groovy/geb/waiting/Wait.groovy
index 0970c45d..581757f5 100644
--- a/module/geb-waiting/src/main/groovy/geb/waiting/Wait.groovy
+++ b/module/geb-waiting/src/main/groovy/geb/waiting/Wait.groovy
@@ -98,7 +98,7 @@ class Wait {
      * again after the {@code retryInterval} has expired. If the last 
invocation of {@code block} throws an exception
      * it will be the <em>cause</em> of the {@link 
geb.waiting.WaitTimeoutException} that will be thrown.
      */
-    public <T> T waitFor(Closure<T> block) {
+    <T> T waitFor(Closure<T> block) {
         def timeoutThreshold = timeoutThresholdFromNow()
         def pass
         def thrown = null


Reply via email to