patton73 commented on issue #7606:
URL: https://github.com/apache/netbeans/issues/7606#issuecomment-2320329376

   > OK, the culprit is now known, reproduced on 
https://github.com/Rebirth-Project/version-comparator. The 
[`net.researchgate.release`](https://plugins.gradle.org/plugin/net.researchgate.release)
 plugin [prompts on the `stdin` or 
console](https://github.com/researchgate/gradle-release/blob/main/src/main/groovy/net/researchgate/release/PluginHelper.groovy#L177)
 for release version; the getter is called as a part of project introspection, 
as the `releaseVersion` is a valid and readable task property. Sadly the helper 
method is not `private` which makes it a public object property in `groovy`.
   > 
   > Here's the relevant part of stacktrace from the gradle daemon:
   > 
   > ```
   > "Daemon worker" #31 prio=5 os_prio=0 cpu=4670,32ms elapsed=215,31s 
tid=0x00007f3784008770 nid=0x5fb5e in Object.wait()  [0x00007f37e8cce000]
   >    java.lang.Thread.State: WAITING (on object monitor)
   >         at java.lang.Object.wait([email protected]/Native Method)
   >         - waiting on <0x00000000e1060b38> (a java.lang.Object)
   >         at java.lang.Object.wait([email protected]/Object.java:338)
   >         at 
org.gradle.internal.daemon.clientinput.StdInStream.waitForContent(StdInStream.java:77)
   >         at 
org.gradle.internal.daemon.clientinput.StdInStream.read(StdInStream.java:57)
   >         - locked <0x00000000e1060b38> (a java.lang.Object)
   >         at 
sun.nio.cs.StreamDecoder.readBytes([email protected]/StreamDecoder.java:270)
   >         at 
sun.nio.cs.StreamDecoder.implRead([email protected]/StreamDecoder.java:313)
   >         at 
sun.nio.cs.StreamDecoder.read([email protected]/StreamDecoder.java:188)
   >         - locked <0x00000000ed478050> (a java.io.InputStreamReader)
   >         at 
java.io.InputStreamReader.read([email protected]/InputStreamReader.java:177)
   >         at 
java.io.BufferedReader.fill([email protected]/BufferedReader.java:162)
   >         at 
java.io.BufferedReader.readLine([email protected]/BufferedReader.java:329)
   >         - locked <0x00000000ed478050> (a java.io.InputStreamReader)
   >         at 
java.io.BufferedReader.readLine([email protected]/BufferedReader.java:396)
   >         at java_io_BufferedReader$readLine.call(Unknown Source)
   >         at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
   >         at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
   >         at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130)
   >         at 
net.researchgate.release.PluginHelper.readLine(PluginHelper.groovy:183)
   >         at 
jdk.internal.reflect.NativeMethodAccessorImpl.invoke0([email protected]/Native 
Method)
   >         at 
jdk.internal.reflect.NativeMethodAccessorImpl.invoke([email protected]/NativeMethodAccessorImpl.java:77)
   >         at 
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke([email protected]/DelegatingMethodAccessorImpl.java:43)
   >         at 
java.lang.reflect.Method.invoke([email protected]/Method.java:568)
   >         at 
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
   >         at 
org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:149)
   >         at 
org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMethodSite.java:100)
   >         at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:55)
   >         at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:217)
   >         at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:240)
   >         at 
net.researchgate.release.PluginHelper.getReleaseVersion(PluginHelper.groovy:149)
   >         at 
net.researchgate.release.PluginHelper.getReleaseVersion(PluginHelper.groovy)
   >         at 
jdk.internal.reflect.NativeMethodAccessorImpl.invoke0([email protected]/Native 
Method)
   >         at 
jdk.internal.reflect.NativeMethodAccessorImpl.invoke([email protected]/NativeMethodAccessorImpl.java:77)
   >         at 
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke([email protected]/DelegatingMethodAccessorImpl.java:43)
   >         at 
java.lang.reflect.Method.invoke([email protected]/Method.java:568)
   >         at 
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
   >         at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
   >         at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1942)
   >         at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3815)
   > ```
   > 
   > I've tried quick patches like giving the gradle's BuildAction an empty 
(byte[0]) `InputStream` or even a **closed** `Inputstream`, but that did not 
seem to make any difference (surprisingly). I need to try another magic or - at 
the worst - make an exclusion for this class:property.
   
   You are saying that the "release" task is called automatically even if you 
do not call the task? Since that is the task that prompts for input.  And this 
does not happen if you compile by command line.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to