diff --git a/cruise.umple/src/generators/Generator_CodeJava.ump b/cruise.umple/src/generators/Generator_CodeJava.ump index 97a7f0981..60b82d522 100644 --- a/cruise.umple/src/generators/Generator_CodeJava.ump +++ b/cruise.umple/src/generators/Generator_CodeJava.ump @@ -3379,6 +3379,8 @@ the if(parent.getHasProxyPattern()) is neccessary to check if the parent's real TraceLookupMap.put("templatelttng","LTTngUst.{0}( {1} );"); TraceLookupMap.put("timestamp","System.currentTimeMillis()"); TraceLookupMap.put("identifier","System.identityHashCode({0})"); + // The following is deprecated as of Java 19; as of Java 19 threadId should be used + // But we need to wait at least 3 years after intro of Java 19 ... see issue #2018 TraceLookupMap.put("thread","Thread.currentThread().getId()"); TraceLookupMap.put("self","this"); TraceLookupMap.put("increment","{0}++;"); diff --git a/umpleonline/umplibrary/manualexamples/Tracers1.ump b/umpleonline/umplibrary/manualexamples/Tracers1.ump index 8a896eab8..ce6422951 100644 --- a/umpleonline/umplibrary/manualexamples/Tracers1.ump +++ b/umpleonline/umplibrary/manualexamples/Tracers1.ump @@ -1,11 +1,16 @@ // this example generates traces using the // File tracer + tracer File; +@SuppressWarnings("deprecation") class Student { Integer id; trace id; } + +// The suppressWarnings annotation allows this example +// to keep working as of Java 19 as per Umple issue £2018 //$?[End_of_model]$? // @@@skipphpcompile - Skipped due to issue 698 \ No newline at end of file diff --git a/umpleonline/umplibrary/manualexamples/Tracers2.ump b/umpleonline/umplibrary/manualexamples/Tracers2.ump index 67628db8a..f5ac04cd5 100644 --- a/umpleonline/umplibrary/manualexamples/Tracers2.ump +++ b/umpleonline/umplibrary/manualexamples/Tracers2.ump @@ -2,6 +2,7 @@ // native logging API tracer JavaAPI; +@SuppressWarnings("deprecation") class Student { Integer id; diff --git a/umpleonline/umplibrary/manualexamples/TracingAssociations1.ump b/umpleonline/umplibrary/manualexamples/TracingAssociations1.ump index 902fbc0e2..90aee2cb9 100644 --- a/umpleonline/umplibrary/manualexamples/TracingAssociations1.ump +++ b/umpleonline/umplibrary/manualexamples/TracingAssociations1.ump @@ -5,6 +5,7 @@ class Student { Integer id; } +@SuppressWarnings("deprecation") class Professor { 1 -- * Student supervisor; diff --git a/umpleonline/umplibrary/manualexamples/TracingAssociations2.ump b/umpleonline/umplibrary/manualexamples/TracingAssociations2.ump index fe0eac425..30ba66652 100644 --- a/umpleonline/umplibrary/manualexamples/TracingAssociations2.ump +++ b/umpleonline/umplibrary/manualexamples/TracingAssociations2.ump @@ -5,6 +5,7 @@ class Student { Integer id; } +@SuppressWarnings("deprecation") class Professor { 1 -- * Student supervisor; diff --git a/umpleonline/umplibrary/manualexamples/TracingAssociations3.ump b/umpleonline/umplibrary/manualexamples/TracingAssociations3.ump index fed1283a4..274729cf8 100644 --- a/umpleonline/umplibrary/manualexamples/TracingAssociations3.ump +++ b/umpleonline/umplibrary/manualexamples/TracingAssociations3.ump @@ -5,6 +5,7 @@ class Student { Integer id; } +@SuppressWarnings("deprecation") class Professor { 1 -- * Student supervisor; diff --git a/umpleonline/umplibrary/manualexamples/TracingAttributes1.ump b/umpleonline/umplibrary/manualexamples/TracingAttributes1.ump index de737b6e7..2837ed550 100644 --- a/umpleonline/umplibrary/manualexamples/TracingAttributes1.ump +++ b/umpleonline/umplibrary/manualexamples/TracingAttributes1.ump @@ -1,4 +1,5 @@ // This traces setId() and setName() +@SuppressWarnings("deprecation") class Student { Integer id; diff --git a/umpleonline/umplibrary/manualexamples/TracingAttributes2.ump b/umpleonline/umplibrary/manualexamples/TracingAttributes2.ump index 914996087..f792c11ec 100644 --- a/umpleonline/umplibrary/manualexamples/TracingAttributes2.ump +++ b/umpleonline/umplibrary/manualexamples/TracingAttributes2.ump @@ -1,4 +1,5 @@ // This traces getId() method +@SuppressWarnings("deprecation") class Student { Integer id; diff --git a/umpleonline/umplibrary/manualexamples/TracingAttributes3.ump b/umpleonline/umplibrary/manualexamples/TracingAttributes3.ump index 4ed091be9..b11dfb796 100644 --- a/umpleonline/umplibrary/manualexamples/TracingAttributes3.ump +++ b/umpleonline/umplibrary/manualexamples/TracingAttributes3.ump @@ -1,4 +1,5 @@ // This example traces getId() and setId() +@SuppressWarnings("deprecation") class Student { Integer id; diff --git a/umpleonline/umplibrary/manualexamples/TracingAttributeswithConditions2.ump b/umpleonline/umplibrary/manualexamples/TracingAttributeswithConditions2.ump index 274899335..6f4cabac9 100644 --- a/umpleonline/umplibrary/manualexamples/TracingAttributeswithConditions2.ump +++ b/umpleonline/umplibrary/manualexamples/TracingAttributeswithConditions2.ump @@ -2,6 +2,7 @@ // this example injects trace code in attribute // setter with specified postcondition +@SuppressWarnings("deprecation") class Student { name; diff --git a/umpleonline/umplibrary/manualexamples/TracingAttributeswithOccurrences1.ump b/umpleonline/umplibrary/manualexamples/TracingAttributeswithOccurrences1.ump index 94adf71d6..69022fb8c 100644 --- a/umpleonline/umplibrary/manualexamples/TracingAttributeswithOccurrences1.ump +++ b/umpleonline/umplibrary/manualexamples/TracingAttributeswithOccurrences1.ump @@ -2,6 +2,7 @@ // this example traces attribute name whenever // its value is changed for 5 times +@SuppressWarnings("deprecation") class Student { name; diff --git a/umpleonline/umplibrary/manualexamples/TracingAttributeswithOccurrences2.ump b/umpleonline/umplibrary/manualexamples/TracingAttributeswithOccurrences2.ump index 9717b8ece..2793a74fa 100644 --- a/umpleonline/umplibrary/manualexamples/TracingAttributeswithOccurrences2.ump +++ b/umpleonline/umplibrary/manualexamples/TracingAttributeswithOccurrences2.ump @@ -2,6 +2,7 @@ // this example traces attribute name whenever // its value is accessed for 5 times +@SuppressWarnings("deprecation") class Student { name; diff --git a/umpleonline/umplibrary/manualexamples/TracingAttributeswithtimeline1.ump b/umpleonline/umplibrary/manualexamples/TracingAttributeswithtimeline1.ump index 416bab950..b60d30db3 100644 --- a/umpleonline/umplibrary/manualexamples/TracingAttributeswithtimeline1.ump +++ b/umpleonline/umplibrary/manualexamples/TracingAttributeswithtimeline1.ump @@ -1,3 +1,4 @@ +@SuppressWarnings("deprecation") class Student { name; diff --git a/umpleonline/umplibrary/manualexamples/TracingAttributeswithtimeline2.ump b/umpleonline/umplibrary/manualexamples/TracingAttributeswithtimeline2.ump index 3bd2a23d4..4a1d71855 100644 --- a/umpleonline/umplibrary/manualexamples/TracingAttributeswithtimeline2.ump +++ b/umpleonline/umplibrary/manualexamples/TracingAttributeswithtimeline2.ump @@ -2,6 +2,7 @@ // attribute name until condition becomes true // and then always continue tracing +@SuppressWarnings("deprecation") class Student { name; diff --git a/umpleonline/umplibrary/manualexamples/TracingBasics1.ump b/umpleonline/umplibrary/manualexamples/TracingBasics1.ump index 406c21732..58e4d5825 100644 --- a/umpleonline/umplibrary/manualexamples/TracingBasics1.ump +++ b/umpleonline/umplibrary/manualexamples/TracingBasics1.ump @@ -1,4 +1,4 @@ - +@SuppressWarnings("deprecation") class Student { Integer id; diff --git a/umpleonline/umplibrary/manualexamples/TracingBasics2.ump b/umpleonline/umplibrary/manualexamples/TracingBasics2.ump index f049a7781..012e6f647 100644 --- a/umpleonline/umplibrary/manualexamples/TracingBasics2.ump +++ b/umpleonline/umplibrary/manualexamples/TracingBasics2.ump @@ -1,4 +1,4 @@ - +@SuppressWarnings("deprecation") class Student { lazy Integer id; diff --git a/umpleonline/umplibrary/manualexamples/TracingConstraints1.ump b/umpleonline/umplibrary/manualexamples/TracingConstraints1.ump index 4b665d72f..afe767113 100644 --- a/umpleonline/umplibrary/manualexamples/TracingConstraints1.ump +++ b/umpleonline/umplibrary/manualexamples/TracingConstraints1.ump @@ -1,3 +1,4 @@ +@SuppressWarnings("deprecation") class Student { name; @@ -16,6 +17,7 @@ class Student trace name for 5; } +@SuppressWarnings("deprecation") class Professor { name; 1 -- * Student supervisor; diff --git a/umpleonline/umplibrary/manualexamples/TracingConstraints2.ump b/umpleonline/umplibrary/manualexamples/TracingConstraints2.ump index 18bc7940c..26a4c1101 100644 --- a/umpleonline/umplibrary/manualexamples/TracingConstraints2.ump +++ b/umpleonline/umplibrary/manualexamples/TracingConstraints2.ump @@ -1,3 +1,4 @@ +@SuppressWarnings("deprecation") class Student { name; diff --git a/umpleonline/umplibrary/manualexamples/TracingConstraints3.ump b/umpleonline/umplibrary/manualexamples/TracingConstraints3.ump index 2a1d394ca..923c37c95 100644 --- a/umpleonline/umplibrary/manualexamples/TracingConstraints3.ump +++ b/umpleonline/umplibrary/manualexamples/TracingConstraints3.ump @@ -1,3 +1,4 @@ +@SuppressWarnings("deprecation") class Student { name; diff --git a/umpleonline/umplibrary/manualexamples/TracingMethods1.ump b/umpleonline/umplibrary/manualexamples/TracingMethods1.ump index 03c82ae8f..8ecc2a991 100644 --- a/umpleonline/umplibrary/manualexamples/TracingMethods1.ump +++ b/umpleonline/umplibrary/manualexamples/TracingMethods1.ump @@ -1,6 +1,7 @@ // this example shows how to trace // non-generated method entry +@SuppressWarnings("deprecation") class JavaMethod { trace method(); diff --git a/umpleonline/umplibrary/manualexamples/TracingMethods2.ump b/umpleonline/umplibrary/manualexamples/TracingMethods2.ump index 82245b343..e0cb560cc 100644 --- a/umpleonline/umplibrary/manualexamples/TracingMethods2.ump +++ b/umpleonline/umplibrary/manualexamples/TracingMethods2.ump @@ -3,6 +3,7 @@ // statement, trace code is injected before // the return +@SuppressWarnings("deprecation") class JavaMethod { trace exit method(); diff --git a/umpleonline/umplibrary/manualexamples/TracingStateMachines1.ump b/umpleonline/umplibrary/manualexamples/TracingStateMachines1.ump index 9a3acfce4..0190bee76 100644 --- a/umpleonline/umplibrary/manualexamples/TracingStateMachines1.ump +++ b/umpleonline/umplibrary/manualexamples/TracingStateMachines1.ump @@ -1,3 +1,4 @@ +@SuppressWarnings("deprecation") class LightBulb { Integer v = 0; diff --git a/umpleonline/umplibrary/manualexamples/TracingStateMachines2.ump b/umpleonline/umplibrary/manualexamples/TracingStateMachines2.ump index 5798e9843..94f99adee 100644 --- a/umpleonline/umplibrary/manualexamples/TracingStateMachines2.ump +++ b/umpleonline/umplibrary/manualexamples/TracingStateMachines2.ump @@ -1,3 +1,4 @@ +@SuppressWarnings("deprecation") class LightBulb { status diff --git a/umpleonline/umplibrary/manualexamples/TracingStateMachines3.ump b/umpleonline/umplibrary/manualexamples/TracingStateMachines3.ump index 1b104f664..88679b3b4 100644 --- a/umpleonline/umplibrary/manualexamples/TracingStateMachines3.ump +++ b/umpleonline/umplibrary/manualexamples/TracingStateMachines3.ump @@ -1,6 +1,7 @@ // this example will trace all states of // State machine GarageDoor +@SuppressWarnings("deprecation") class GarageDoor { // UML state machine digram for a Garage door, diff --git a/umpleonline/umplibrary/manualexamples/W301TracingEntityNotFound2.ump b/umpleonline/umplibrary/manualexamples/W301TracingEntityNotFound2.ump index 6ec592832..5cbec6b1d 100644 --- a/umpleonline/umplibrary/manualexamples/W301TracingEntityNotFound2.ump +++ b/umpleonline/umplibrary/manualexamples/W301TracingEntityNotFound2.ump @@ -1,6 +1,7 @@ //The warning is resolved //by correcting the name of the //attribute to be traced +@SuppressWarnings("deprecation") class A { Integer identifier; diff --git a/umpleonline/umplibrary/manualexamples/W302TracerNotRecognized1.ump b/umpleonline/umplibrary/manualexamples/W302TracerNotRecognized1.ump index a31650103..6315ea69f 100644 --- a/umpleonline/umplibrary/manualexamples/W302TracerNotRecognized1.ump +++ b/umpleonline/umplibrary/manualexamples/W302TracerNotRecognized1.ump @@ -1,7 +1,9 @@ + //The tracer used is not recognized, //the Console tracer will be used tracer OtherTracer; +@SuppressWarnings("deprecation") class A { Integer id; diff --git a/umpleonline/umplibrary/manualexamples/W302TracerNotRecognized2.ump b/umpleonline/umplibrary/manualexamples/W302TracerNotRecognized2.ump index 34ec5bb00..c5a5ff8aa 100644 --- a/umpleonline/umplibrary/manualexamples/W302TracerNotRecognized2.ump +++ b/umpleonline/umplibrary/manualexamples/W302TracerNotRecognized2.ump @@ -2,6 +2,7 @@ //the warning tracer File; +@SuppressWarnings("deprecation") class A { Integer id;