You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lock file still exists after application termination.
Next time SingleInstanceServer fails to start with the following exception:
java.io.IOException: Cannot rename C:\Users\user\AppData\Local\Temp\user\netx\locks\http___localhost_jnlp.jnlp.temp to C:\Users\user\AppData\Local\Temp\user\netx\locks\http___localhost_jnlp.jnlp
at net.adoptopenjdk.icedteaweb.io.FileUtils.createRestrictedFile(FileUtils.java:331)
at net.adoptopenjdk.icedteaweb.io.FileUtils.createRestrictedFile(FileUtils.java:172)
at net.sourceforge.jnlp.services.SingleInstanceLock.createWithPort(SingleInstanceLock.java:70)
at net.sourceforge.jnlp.services.SingleInstanceLockTest.testCreateWithPort(SingleInstanceLockTest.java:34)
Test case demonstraits the problem:
public final class SingleInstanceLockTest
extends NoStdOutErrTest
{
@Test
public void testCreateWithPort()
throws Exception
{
final URL url = this.getClass().getClassLoader().getResource("net/sourceforge/jnlp/basic.jnlp");
final JNLPFile jnlpFile = new JNLPFile(url.openStream(), url, new ParserSettings(false,false,false));
assert jnlpFile!=null;
final SingleInstanceLock sil = new SingleInstanceLock(jnlpFile);
sil.lockFile.delete();
assert sil.lockFile.exists()==false;
sil.createWithPort(123);
assert sil.lockFile.exists()==true;
assert "123".equals(FileUtils.loadFileAsUtf8String(sil.lockFile).trim());
sil.createWithPort(456);
assert sil.lockFile.exists()==true;
assert "456".equals(FileUtils.loadFileAsUtf8String(sil.lockFile).trim());
}
}
The text was updated successfully, but these errors were encountered:
After first start lock file with a port number is created
C:\Users\user\AppData\Local\Temp\user\netx\locks\http___localhost_jnlp.jnlp.
Lock file still exists after application termination.
Next time SingleInstanceServer fails to start with the following exception:
Test case demonstraits the problem:
The text was updated successfully, but these errors were encountered: