File tree Expand file tree Collapse file tree 4 files changed +19
-2
lines changed
main/java/software/aws/solution/clickstream/client
test/java/software/aws/solution/clickstream/util Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ private void checkAppVersionUpdate() {
120120 this .clickstreamContext .getAnalyticsClient ().createEvent (Event .PresetEvent .APP_UPDATE );
121121 event .addAttribute (Event .ReservedAttribute .PREVIOUS_APP_VERSION , previousAppVersion );
122122 this .clickstreamContext .getAnalyticsClient ().recordEvent (event );
123+ clickstreamContext .getSystem ().getPreferences ().putString ("appVersion" , currentVersion );
123124 }
124125 } else {
125126 clickstreamContext .getSystem ().getPreferences ()
@@ -139,6 +140,7 @@ private void checkOSVersionUpdate() {
139140 this .clickstreamContext .getAnalyticsClient ().createEvent (Event .PresetEvent .OS_UPDATE );
140141 event .addAttribute (Event .ReservedAttribute .PREVIOUS_OS_VERSION , previousOSVersion );
141142 this .clickstreamContext .getAnalyticsClient ().recordEvent (event );
143+ clickstreamContext .getSystem ().getPreferences ().putString ("osVersion" , currentOSVersion );
142144 }
143145 } else {
144146 clickstreamContext .getSystem ().getPreferences ()
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ public static String compressForGzip(String ungzipStr) {
5757 LOG .error ("IOException occur when compressForGzip." );
5858 }
5959 if (encode != null ) {
60- return Base64 .encodeToString (encode , Base64 .DEFAULT );
60+ return Base64 .encodeToString (encode , Base64 .NO_WRAP );
6161 } else {
6262 LOG .error ("compressForGzip fail." );
6363 return null ;
Original file line number Diff line number Diff line change @@ -134,4 +134,19 @@ public void clipStringForAppendEllipses() {
134134 assertTrue (StringUtil .clipString ("abcdefgh" , 5 , true ).endsWith ("..." ));
135135 assertFalse (StringUtil .clipString ("abcdefgh" , 10 , true ).endsWith ("..." ));
136136 }
137+
138+ /**
139+ * test validate gzip with no wrap.
140+ */
141+ @ Test
142+ public void validateGzipWithNoWrap () {
143+ String str = "abcdeabcde" ;
144+ StringBuilder sb = new StringBuilder ();
145+ for (int i = 0 ; i < 100 ; i ++) {
146+ sb .append (str );
147+ }
148+ String gzippedStr = StringUtil .compressForGzip (sb .toString ());
149+ assert gzippedStr != null ;
150+ assertFalse (gzippedStr .contains ("\n " ));
151+ }
137152}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ org.gradle.jvmargs=-Xmx4g
1212# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1313org.gradle.parallel =true
1414
15- VERSION_NAME =0.4.0
15+ VERSION_NAME =0.4.1
1616
1717POM_GROUP =software.aws.solution
1818POM_ARTIFACT_ID =clickstream
You can’t perform that action at this time.
0 commit comments