gpt4 book ai didi

java - 在 Intellij IDE 中对 ant 输入处理 java.lang.NegativeArraySizeException

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:14:50 25 4
gpt4 key购买 nike

<target name="readme" description="Create readme.txt for Build">
<echo>Creating readme.txt file </echo>
<input
message="Enter text for Readme.txt:"
addproperty="README_TXT"
defaultvalue="This is for file input: ${ant.project.name}"
/>
<echo>Text is: ${README_TXT} </echo>
</target>

执行此操作时,

  1. 当输入一个简单的排序字符串时 This is test line 它工作正常
  2. 当输入一个长字符串时,如 a,jsha,mskahskakshkahskhakshakskaksdhksdfsfd.,df,d'fdkf;dfdljflkdhfdhkfdkhfkdhfkdkfdkf

它抛出异常:

/proj1/build.xml:312: java.lang.NegativeArraySizeException
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.Main.start(Main.java:198)
at org.apache.tools.ant.Main.main(Main.java:286)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:30)
Caused by: java.lang.NegativeArraySizeException
at com.intellij.rt.ant.execution.IdeaInputHandler.readBytes(IdeaInputHandler.java:77)
at com.intellij.rt.ant.execution.IdeaInputHandler.handleInput(IdeaInputHandler.java:64)
at org.apache.tools.ant.taskdefs.Input.execute(Input.java:232)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
... 16 more

最佳答案

这是 IntelliJ IDEA 中的错误。欢迎您通过 https://youtrack.jetbrains.com/issues/IDEA 将其报告给问题跟踪器。

关于java - 在 Intellij IDE 中对 ant 输入处理 java.lang.NegativeArraySizeException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37524438/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com