@Test public void should_handle_dir_containing_classes_but_no_jars() { codeBase = getCodeBase(SAMPLE_CLASSES_DIR); assertThat(codeBase.getUrls(), notNullValue()); assertThat(codeBase.getUrls().length, is(1)); assertTrue(codeBase.getUrls()[0].getPath().endsWith("/")); CodeBaseFingerprint fingerprint = codeBase.getFingerprint(); assertThat(fingerprint.getNumClassFiles(), is(1)); assertThat(fingerprint.getNumJarFiles(), is(0)); int scannedClasses = new CodeBaseScanner().scanSignatures(codeBase); assertThat(scannedClasses, greaterThanOrEqualTo(1)); assertThat(codeBase.getSignatures(), hasSize(2)); assertThatCodeBaseContains(codeBase, "InClassesOnly"); assertThatCodeBaseNotContains(codeBase, "SampleApp"); assertThatCodeBaseNotContains(codeBase, "sample.lib"); }
URL[] getUrls() { if (needsExploding) { throw new UnsupportedOperationException("Exploding WAR or EAR not yet implemented"); } return urls.toArray(new URL[0]); }
CodeBase { URL[] getUrls() { if (needsExploding) { throw new UnsupportedOperationException("Exploding WAR or EAR not yet implemented"); } return urls.toArray(new URL[0]); } }
CodeBase { URL[] getUrls() { if (needsExploding) { throw new UnsupportedOperationException("Exploding WAR or EAR not yet implemented"); } return urls.toArray(new URL[0]); } CodeBase(AgentConfig config); }
CodeBase { URL[] getUrls() { if (needsExploding) { throw new UnsupportedOperationException("Exploding WAR or EAR not yet implemented"); } return urls.toArray(new URL[0]); } CodeBase(AgentConfig config); CodeBasePublication3 getCodeBasePublication(long customerId, int sequenceNumber); }
CodeBase { URL[] getUrls() { if (needsExploding) { throw new UnsupportedOperationException("Exploding WAR or EAR not yet implemented"); } return urls.toArray(new URL[0]); } CodeBase(AgentConfig config); CodeBasePublication3 getCodeBasePublication(long customerId, int sequenceNumber);  }