File tree Expand file tree Collapse file tree 10 files changed +53
-16
lines changed
main/java/net/lecousin/framework
test/java/net/lecousin/framework/core/tests
net.lecousin.framework.log.bridges Expand file tree Collapse file tree 10 files changed +53
-16
lines changed Original file line number Diff line number Diff line change 3
3
<parent >
4
4
<groupId >net.lecousin</groupId >
5
5
<artifactId >core-parent-pom</artifactId >
6
- <version >0.13.0 </version >
6
+ <version >0.13.1 </version >
7
7
</parent >
8
8
<artifactId >core.javaee</artifactId >
9
- <version >0.13.0 </version >
9
+ <version >0.13.1 </version >
10
10
<dependencies >
11
11
<dependency >
12
12
<groupId >net.lecousin</groupId >
13
13
<artifactId >core</artifactId >
14
- <version >0.13.0 </version >
14
+ <version >0.13.1 </version >
15
15
</dependency >
16
16
<dependency >
17
17
<groupId >javax.enterprise.concurrent</groupId >
Original file line number Diff line number Diff line change 2
2
xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
3
3
<modelVersion >4.0.0</modelVersion >
4
4
<artifactId >core</artifactId >
5
- <version >0.13.0 </version >
5
+ <version >0.13.1 </version >
6
6
7
7
<parent >
8
8
<groupId >net.lecousin</groupId >
9
9
<artifactId >core-parent-pom</artifactId >
10
- <version >0.13.0 </version >
10
+ <version >0.13.1 </version >
11
11
</parent >
12
12
13
13
<name >lecousin.net Java core framework</name >
145
145
<exclude >**/SplashScreen*.*</exclude >
146
146
<exclude >**/ThreadingDebugHelper*.*</exclude >
147
147
<exclude >**/TaskMonitoring*.*</exclude >
148
+ <exclude >**/DebugUtil*.*</exclude >
148
149
</excludes >
149
150
</configuration >
150
151
</plugin >
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ public void unblock() {
81
81
Application app = LCCore .getApplication ();
82
82
Logger log = app .isReleaseMode () ? null : app .getLoggerFactory ().getLogger (SynchronizationPoint .class );
83
83
while (true ) {
84
- if (log == null || !log .debug ())
84
+ if (!log .debug ())
85
85
for (int i = 0 ; i < listeners .size (); ++i )
86
86
try { listeners .get (i ).run (); }
87
87
catch (Throwable t ) { log .error (
Original file line number Diff line number Diff line change 5
5
/**
6
6
* Get information about the system such as type of operating system, based on environment properties.
7
7
*/
8
- public class SystemEnvironment {
8
+ public final class SystemEnvironment {
9
+
10
+ private SystemEnvironment () { /* no instance */ }
9
11
10
12
/** Type of operating system. */
11
13
public static enum OSFamily {
Original file line number Diff line number Diff line change @@ -325,6 +325,7 @@ public void run() {
325
325
326
326
AsyncWork <Integer , Exception > aw2 = new AsyncWork <>();
327
327
aw2 .listenInline (() -> { aw2 .listenInline (() -> {}); });
328
+ for (Object l : aw2 .getAllListeners ()) l .toString ();
328
329
aw2 .cancel (new CancelException ("test" ));
329
330
330
331
try {
Original file line number Diff line number Diff line change
1
+ package net .lecousin .framework .core .tests .memory ;
2
+
3
+ import org .junit .Assert ;
4
+ import org .junit .Test ;
5
+
6
+ import net .lecousin .framework .core .test .LCCoreAbstractTest ;
7
+ import net .lecousin .framework .memory .CachedObject ;
8
+
9
+ public class TestCachedObject extends LCCoreAbstractTest {
10
+
11
+
12
+ @ Test (timeout =30000 )
13
+ public void test () {
14
+ CachedObject <Integer > co = new CachedObject <Integer >(Integer .valueOf (51 ), 5000 ) {
15
+ @ Override
16
+ protected void closeCachedObject (Integer object ) {
17
+ }
18
+ };
19
+ Assert .assertEquals (51 , co .get ().intValue ());
20
+ Assert .assertEquals (0 , co .getUsage ());
21
+ Object user = new Object ();
22
+ co .use (user );
23
+ Assert .assertEquals (1 , co .getUsage ());
24
+ co .getLastUsage ();
25
+ co .getExpiration ();
26
+ co .cachedDataCurrentUsage ();
27
+ co .cachedDataLastUsage ();
28
+ co .release (user );
29
+ Assert .assertEquals (51 , co .get ().intValue ());
30
+ Assert .assertEquals (0 , co .getUsage ());
31
+ co .close ();
32
+ }
33
+ }
Original file line number Diff line number Diff line change 1
1
<project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
2
2
<modelVersion >4.0.0</modelVersion >
3
3
<artifactId >log.bridges.commons-logging</artifactId >
4
- <version >0.13.0 </version >
4
+ <version >0.13.1 </version >
5
5
6
6
<parent >
7
7
<groupId >net.lecousin.framework</groupId >
8
8
<artifactId >log.bridges</artifactId >
9
- <version >0.13.0 </version >
9
+ <version >0.13.1 </version >
10
10
<relativePath >..</relativePath >
11
11
</parent >
12
12
Original file line number Diff line number Diff line change 3
3
<groupId >net.lecousin.framework</groupId >
4
4
<artifactId >log.bridges</artifactId >
5
5
<packaging >pom</packaging >
6
- <version >0.13.0 </version >
6
+ <version >0.13.1 </version >
7
7
8
8
<parent >
9
9
<groupId >net.lecousin</groupId >
10
10
<artifactId >core-parent-pom</artifactId >
11
- <version >0.13.0 </version >
11
+ <version >0.13.1 </version >
12
12
</parent >
13
13
14
14
<modules >
36
36
<dependency >
37
37
<groupId >net.lecousin</groupId >
38
38
<artifactId >core</artifactId >
39
- <version >0.13.0 </version >
39
+ <version >0.13.1 </version >
40
40
</dependency >
41
41
<dependency >
42
42
<groupId >net.lecousin</groupId >
43
43
<artifactId >core</artifactId >
44
- <version >0.13.0 </version >
44
+ <version >0.13.1 </version >
45
45
<type >test-jar</type >
46
46
</dependency >
47
47
</dependencies >
Original file line number Diff line number Diff line change 3
3
<parent >
4
4
<groupId >net.lecousin.framework</groupId >
5
5
<artifactId >log.bridges</artifactId >
6
- <version >0.13.0 </version >
6
+ <version >0.13.1 </version >
7
7
<relativePath >..</relativePath >
8
8
</parent >
9
9
<artifactId >log.bridges.slf4j</artifactId >
10
- <version >0.13.0 </version >
10
+ <version >0.13.1 </version >
11
11
12
12
13
13
<name >lecousin.net logging system bridge for SLF4J</name >
Original file line number Diff line number Diff line change 1
1
<project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
2
2
<modelVersion >4.0.0</modelVersion >
3
3
<artifactId >core-parent-pom</artifactId >
4
- <version >0.13.0 </version >
4
+ <version >0.13.1 </version >
5
5
<packaging >pom</packaging >
6
6
<parent >
7
7
<groupId >net.lecousin</groupId >
You can’t perform that action at this time.
0 commit comments