Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.8.0
-
Fix Version/s: None
-
Component/s: groovy-jdk
-
Environment:Debian Lenny Linux
-
Number of attachments :
Description
Since upgrading http://media.io to Groovy 1.8.0, I very rarely get these exceptions:
groovy.lang.MissingMethodException: No signature of method: java.lang.String.shaHex() is applicable for argument types: () values: [] Possible solutions: size(), charAt(int), isCase(java.lang.Object), isCase(java.lang.Object), sleep(long), sleep(long, groovy.lang.Closure) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55) at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at media.entities.Info$_getCleanName_closure1.doCall(Info.groovy:87)
The code in Info.groovy uses categories together with commons-codec and looks like this:
@EqualsAndHashCode(excludes = 'size,outputName,outputSize,format,progress,downloaded,tags') class Info implements Serializable { private static final long serialVersionUID = 3L String name ... String getCleanName(String extension) { use (DigestUtils) { extension ? new StringBuilder(49).append(name.shaHex()).append('.').append(extension) : name.shaHex() } } }
My guess is that this happens less frequently than every 50000 calls so it's hard for me to reproduce.
Any ideas? Could this be a thread-safety thing?
Even if hard to reproduce, could you still try to make an easily reproducable sample?