我在我的s2上有一个预定义的应用程序,让我收听广播.它不使用互联网,而是使用周围的无线电波.有什么方法可以使用该功能以编程方式启动无线电并搜索广播电台?
我必须使用XQuery生成一系列随机数.我找到了一组库,但这些都是付费的.如果有人能给我一个方向,我会非常感激(最好是代码).
我遇到以下问题,我尝试启动jetty,我得到以下的例外:
Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test failed: There was an error in the forked process
[ERROR] org.apache.maven.surefire.testset.TestSetFailedException: java.lang.RuntimeException: com.google.inject.internal.util.$ComputationException: java.lang.ArrayIndexOutOfBoundsException: 51966
[ERROR] at org.apache.maven.surefire.common.junit4.JUnit4RunListener.rethrowAnyTestMechanismFailures(JUnit4RunListener.java:206)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:114)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:85)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:54)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:134)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] Caused by: java.lang.RuntimeException: com.google.inject.internal.util.$ComputationException: java.lang.ArrayIndexOutOfBoundsException: 51966
[ERROR] at org.apache.maven.surefire.junitcore.TestSet.replay(TestSet.java:100)
[ERROR] at org.apache.maven.surefire.junitcore.ConcurrentRunListener.testSetCompleted(ConcurrentRunListener.java:82)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreRunListener.testRunFinished(JUnitCoreRunListener.java:73)
[ERROR] at org.junit.runner.notification.RunNotifier$2.notifyListener(RunNotifier.java:95)
[ERROR] at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:61)
[ERROR] at org.junit.runner.notification.RunNotifier.fireTestRunFinished(RunNotifier.java:92)
[ERROR] at org.junit.runner.JUnitCore.run(JUnitCore.java:161)
[ERROR] at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:113)
[ERROR] …Run Code Online (Sandbox Code Playgroud) 我面临以下问题:我有一个类作为数据成员java.util.Optional对象,我需要将变换放入json.代码看起来像这样的通用方式:
public class MyClass{
public java.util.Optional<MyCustomObject> object;
public Myclass(java.util.Optional<MyCustomObject> object){
this.object = object;
}
public java.util.Optional<MyCustomObject> getObject(){
return this.object;
}
public void setObject(java.util.Optional<MyCustomObject> object){
return this.object = object;
}
}
Run Code Online (Sandbox Code Playgroud)
当我把它变成一个json我得到这样的东西:
Optional[
object
]
Run Code Online (Sandbox Code Playgroud)
我想摆脱json中的Optional部分.我能这样做吗?