diff -r e6c51c4b4d20 netx/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImpl.java --- a/netx/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImpl.java Wed Mar 13 14:51:20 2013 +0100 +++ b/netx/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImpl.java Fri Mar 15 15:41:03 2013 +0100 @@ -180,7 +180,11 @@ result = result && codeBase.matches(unsignedAppletActionEntry.getCodeBase().getRegEx()); } if (archives != null) { - result = result && compareArchives(archives, unsignedAppletActionEntry.getArchives()); + List saved = unsignedAppletActionEntry.getArchives(); + if (saved == null || saved.isEmpty()) { + return result; + } + result = result && compareArchives(archives, saved); } return result; } diff -r e6c51c4b4d20 tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImplTest.java --- a/tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImplTest.java Wed Mar 13 14:51:20 2013 +0100 +++ b/tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImplTest.java Fri Mar 15 15:41:03 2013 +0100 @@ -42,6 +42,7 @@ import java.io.IOException; import java.util.Arrays; import net.sourceforge.jnlp.ServerAccess; +import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; @@ -61,9 +62,28 @@ f4 = File.createTempFile("itwMatching", "testFile4"); ServerAccess.saveFile("A 123456 .* .* jar1,jar2", f1); ServerAccess.saveFile("A 123456 .* \\Qbla\\E jar1,jar2", f2); + ServerAccess.saveFile("" + + "A 1 \\Qhttp://jmol.sourceforge.net/demo/atoms/\\E \\Qhttp://jmol.sourceforge.net/jmol/\\E JmolApplet0.jar\n" + + "A 1363278653454 \\Qhttp://www.walter-fendt.de/ph14e\\E.* \\Qhttp://www.walter-fendt.de\\E.*\n" + + "n 1363281783104 \\Qhttp://www.walter-fendt.de/ph14e/inclplane.htm\\E \\Qhttp://www.walter-fendt.de/ph14_jar/\\E Ph14English.jar,SchiefeEbene.jar" + + "", f3); } - @Test + @AfterClass + public static void removeTestFiles() throws IOException { + f1.delete(); + f2.delete(); + f3.delete(); + } + + + @Test + public void wildcards1() { + UnsignedAppletActionStorageImpl i1 = new UnsignedAppletActionStorageImpl(f3); + UnsignedAppletActionEntry r1 = i1.getMatchingItem("http://www.walter-fendt.de/ph14e/inclplane.htm", "http://www.walter-fendt.de/ph14_jar/", Arrays.asList(new String[]{"Ph14English.jar","SchiefeEbene.jar"})); + System.out.println(r1.toString()); + } + @Test public void allMatchingDocAndCode() { UnsignedAppletActionStorageImpl i1 = new UnsignedAppletActionStorageImpl(f1); UnsignedAppletActionEntry r1 = i1.getMatchingItem("bla", "blaBla", Arrays.asList(new String[]{"jar1", "jar2"}));