File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed
main/java/com/securenative
test/java/com/securenative/utils Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,12 @@ private SecureNative(SecureNativeOptions options) throws SecureNativeSDKExceptio
3030 throw new SecureNativeSDKException ("You must pass your SecureNative api key" );
3131 }
3232 this .options = options ;
33- this .apiManager = new ApiManagerImpl (new SecureNativeEventManager (new SecureNativeHTTPClient (options ), options ), options );
33+
34+ EventManager eventManager = new SecureNativeEventManager (new SecureNativeHTTPClient (options ), options );
35+ if (options .getAutoSend ()){
36+ eventManager .startEventsPersist ();
37+ }
38+ this .apiManager = new ApiManagerImpl (eventManager , options );
3439 Logger .initLogger (options .getLogLevel ());
3540 }
3641
Original file line number Diff line number Diff line change 1+ package com .securenative .utils ;
2+
3+ import org .junit .jupiter .api .Test ;
4+
5+ import java .io .IOException ;
6+ import java .net .JarURLConnection ;
7+ import java .net .URL ;
8+ import java .util .Enumeration ;
9+ import java .util .jar .Attributes ;
10+ import java .util .jar .Manifest ;
11+
12+ public class VersionTest {
13+
14+ @ Test
15+ public void testManifest () throws IOException {
16+ URL res = org .junit .Assert .class .getResource (org .junit .Assert .class .getSimpleName () + ".class" );
17+ JarURLConnection conn = (JarURLConnection ) res .openConnection ();
18+ Manifest mf = conn .getManifest ();
19+
20+ Attributes atts = mf .getMainAttributes ();
21+ for (Object v : atts .values ()) {
22+ System .out .println (v );
23+ }
24+ }
25+ }
You can’t perform that action at this time.
0 commit comments