Thanks for the heads up - it was removed since it isn't possible to throw 
in client code anyway, and projects could emulate it themselves if 
necessary. I'm curious about why gwt-bean-validators must have it, as the 
original validator code did not have it - is it expecting it to be possible 
to throw? It has always had a private constructor to make that completely 
impossible.

I checked out the project so I could offer a pull request with the two 
different approaches that could be used to fix this, but it doesnt appear 
that the project builds out of the box - javadoc errors that are fatal just 
for a plain mvn install or mvn package. Stepping down to just mvn compile 
(so I could attempt to build, but never actually use it) then encounters a 
dependency-check issue. Any advice you can offer on building my own copy to 
contribute these fixes right away? 

Approach one: "super source" this exception - validators already require 
some super source, so there should already be a clear place to put this in 
the project.

Approach two: stop indicating that methods could throw this, or that 
try/catch blocks could catch it, since it wasn't possible to throw anyway. 
Any emulated java code cannot have this exception naturally (no 
classloader, no classes loaded from disk, etc), and as I mentioned, it has 
a private constructor.

Like I said, I'd be very glad to collaborate and build these patches and 
get them merged so we can get this resolved.

On Thursday, January 3, 2019 at 4:13:20 AM UTC-6, stuckagain wrote:
>
> Hi,
>
> I just noticed this morning that our project fails to build this morning 
> due to a change in HEAD-SNAPSHOT.
>
> We are using knightsoft gwt-bean-validators and its source is apparently 
> depending on the fact that GWT is emulating the NoSuchMethodException.
>
> I saw this commit where there is a mention that this was discussed:
>
> https://github.com/gwtproject/gwt/commit/329b21962075c675d1a2e2b3d48049ca5e9fe195
>
> This is what I get now when compiling:
> [INFO] Compiling module com.swift.cloud.platform.ui.demo.Demo
> [INFO]    Tracing compile failure path for type 
> 'org.apache.commons.beanutils.PropertyUtils'
> [INFO]       [ERROR] Errors in 
> 'jar:file:/home/dnouls/.m2/repository/de/knightsoft-net/gwt-bean-validators/1.0.0/gwt-bean-validators-1.0.0.jar!/de/knightsoftnet/validators/supersource/org/apache/commons/beanutils/PropertyUtils.java'
> [INFO]          [ERROR] Line 56: No source code is available for type 
> java.lang.NoSuchMethodException; did you forget to inherit a required 
> module?
> [INFO]    Tracing compile failure path for type 
> 'de.knightsoftnet.validators.shared.util.BeanPropertyReaderUtil'
> [INFO]       [ERROR] Errors in 
> 'jar:file:/home/dnouls/.m2/repository/de/knightsoft-net/mt-bean-validators/1.0.0/mt-bean-validators-1.0.0.jar!/de/knightsoftnet/validators/shared/util/BeanPropertyReaderUtil.java'
> [INFO]          [ERROR] Line 60: No source code is available for type 
> java.lang.NoSuchMethodException; did you forget to inherit a required 
> module?
> [INFO]    Tracing compile failure path for type 'java.net.URL'
> [INFO]       [ERROR] Errors in 
> 'jar:file:/home/dnouls/.m2/repository/de/knightsoft-net/gwt-bean-validators/1.0.0/gwt-bean-validators-1.0.0.jar!/de/knightsoftnet/validators/supersource/java/net/URL.java'
> [INFO]          [ERROR] Line 958: No source code is available for type 
> java.lang.NoSuchMethodException; did you forget to inherit a required 
> module?
> [INFO]    Tracing compile failure path for type 
> 'org.hibernate.validator.internal.util.logging.Log'
> [INFO]       [ERROR] Errors in 
> 'jar:file:/home/dnouls/.m2/repository/de/knightsoft-net/gwt-bean-validators/1.0.0/gwt-bean-validators-1.0.0.jar!/de/knightsoftnet/validators/supersource/org/hibernate/validator/internal/util/logging/Log.java'
> [INFO]          [ERROR] Line 415: No source code is available for type 
> java.lang.NoSuchMethodException; did you forget to inherit a required 
> module?
> [INFO]    Tracing compile failure path for type 
> 'de.knightsoftnet.validators.client.impl.AbstractGwtValidator'
> [INFO]       [ERROR] Errors in 
> 'jar:file:/home/dnouls/.m2/repository/de/knightsoft-net/gwt-bean-validators/1.0.0/gwt-bean-validators-1.0.0.jar!/de/knightsoftnet/validators/client/impl/AbstractGwtValidator.java'
> [INFO]          [ERROR] Line 144: No source code is available for type 
> java.lang.NoSuchMethodException; did you forget to inherit a required 
> module?
> [INFO]    Tracing compile failure path for type 
> 'org.apache.commons.beanutils.BeanUtils'
> [INFO]       [ERROR] Errors in 
> 'jar:file:/home/dnouls/.m2/repository/de/knightsoft-net/gwt-bean-validators/1.0.0/gwt-bean-validators-1.0.0.jar!/de/knightsoftnet/validators/supersource/org/apache/commons/beanutils/BeanUtils.java'
> [INFO]          [ERROR] Line 48: No source code is available for type 
> java.lang.NoSuchMethodException; did you forget to inherit a required 
> module?
> [INFO]    [ERROR] Aborting compile due to errors in some input files
>
> I wonder what the impact is of this change to other libraries out there. 
> I'll file a bug report on knightsoft's implementation, but what about libs 
> that are no longer maintained that might refer to this exception class ?
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/77375c07-74cf-4f3d-b12f-74a8b2a04982%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to