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 33 <parent >
44 <groupId >net.lecousin</groupId >
55 <artifactId >core-parent-pom</artifactId >
6- <version >0.13.0 </version >
6+ <version >0.13.1 </version >
77 </parent >
88 <artifactId >core.javaee</artifactId >
9- <version >0.13.0 </version >
9+ <version >0.13.1 </version >
1010 <dependencies >
1111 <dependency >
1212 <groupId >net.lecousin</groupId >
1313 <artifactId >core</artifactId >
14- <version >0.13.0 </version >
14+ <version >0.13.1 </version >
1515 </dependency >
1616 <dependency >
1717 <groupId >javax.enterprise.concurrent</groupId >
Original file line number Diff line number Diff line change 22 xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
33 <modelVersion >4.0.0</modelVersion >
44 <artifactId >core</artifactId >
5- <version >0.13.0 </version >
5+ <version >0.13.1 </version >
66
77 <parent >
88 <groupId >net.lecousin</groupId >
99 <artifactId >core-parent-pom</artifactId >
10- <version >0.13.0 </version >
10+ <version >0.13.1 </version >
1111 </parent >
1212
1313 <name >lecousin.net Java core framework</name >
145145 <exclude >**/SplashScreen*.*</exclude >
146146 <exclude >**/ThreadingDebugHelper*.*</exclude >
147147 <exclude >**/TaskMonitoring*.*</exclude >
148+ <exclude >**/DebugUtil*.*</exclude >
148149 </excludes >
149150 </configuration >
150151 </plugin >
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ public void unblock() {
8181 Application app = LCCore .getApplication ();
8282 Logger log = app .isReleaseMode () ? null : app .getLoggerFactory ().getLogger (SynchronizationPoint .class );
8383 while (true ) {
84- if (log == null || !log .debug ())
84+ if (!log .debug ())
8585 for (int i = 0 ; i < listeners .size (); ++i )
8686 try { listeners .get (i ).run (); }
8787 catch (Throwable t ) { log .error (
Original file line number Diff line number Diff line change 55/**
66 * Get information about the system such as type of operating system, based on environment properties.
77 */
8- public class SystemEnvironment {
8+ public final class SystemEnvironment {
9+
10+ private SystemEnvironment () { /* no instance */ }
911
1012 /** Type of operating system. */
1113 public static enum OSFamily {
Original file line number Diff line number Diff line change @@ -325,6 +325,7 @@ public void run() {
325325
326326 AsyncWork <Integer , Exception > aw2 = new AsyncWork <>();
327327 aw2 .listenInline (() -> { aw2 .listenInline (() -> {}); });
328+ for (Object l : aw2 .getAllListeners ()) l .toString ();
328329 aw2 .cancel (new CancelException ("test" ));
329330
330331 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 11<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" >
22 <modelVersion >4.0.0</modelVersion >
33 <artifactId >log.bridges.commons-logging</artifactId >
4- <version >0.13.0 </version >
4+ <version >0.13.1 </version >
55
66 <parent >
77 <groupId >net.lecousin.framework</groupId >
88 <artifactId >log.bridges</artifactId >
9- <version >0.13.0 </version >
9+ <version >0.13.1 </version >
1010 <relativePath >..</relativePath >
1111 </parent >
1212
Original file line number Diff line number Diff line change 33 <groupId >net.lecousin.framework</groupId >
44 <artifactId >log.bridges</artifactId >
55 <packaging >pom</packaging >
6- <version >0.13.0 </version >
6+ <version >0.13.1 </version >
77
88 <parent >
99 <groupId >net.lecousin</groupId >
1010 <artifactId >core-parent-pom</artifactId >
11- <version >0.13.0 </version >
11+ <version >0.13.1 </version >
1212 </parent >
1313
1414 <modules >
3636 <dependency >
3737 <groupId >net.lecousin</groupId >
3838 <artifactId >core</artifactId >
39- <version >0.13.0 </version >
39+ <version >0.13.1 </version >
4040 </dependency >
4141 <dependency >
4242 <groupId >net.lecousin</groupId >
4343 <artifactId >core</artifactId >
44- <version >0.13.0 </version >
44+ <version >0.13.1 </version >
4545 <type >test-jar</type >
4646 </dependency >
4747 </dependencies >
Original file line number Diff line number Diff line change 33 <parent >
44 <groupId >net.lecousin.framework</groupId >
55 <artifactId >log.bridges</artifactId >
6- <version >0.13.0 </version >
6+ <version >0.13.1 </version >
77 <relativePath >..</relativePath >
88 </parent >
99 <artifactId >log.bridges.slf4j</artifactId >
10- <version >0.13.0 </version >
10+ <version >0.13.1 </version >
1111
1212
1313 <name >lecousin.net logging system bridge for SLF4J</name >
Original file line number Diff line number Diff line change 11<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" >
22 <modelVersion >4.0.0</modelVersion >
33 <artifactId >core-parent-pom</artifactId >
4- <version >0.13.0 </version >
4+ <version >0.13.1 </version >
55 <packaging >pom</packaging >
66 <parent >
77 <groupId >net.lecousin</groupId >
You can’t perform that action at this time.
0 commit comments