Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TeeTime-Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nelson Tavares de Sousa
TeeTime-Framework
Commits
3c77564c
Commit
3c77564c
authored
9 years ago
by
Nelson Tavares de Sousa
Browse files
Options
Downloads
Patches
Plain Diff
compliance check is run by the ValidatingSignal now
parent
16dcf601
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/teetime/framework/AbstractStage.java
+1
-23
1 addition, 23 deletions
src/main/java/teetime/framework/AbstractStage.java
src/test/java/teetime/framework/AbstractStageTest.java
+1
-1
1 addition, 1 deletion
src/test/java/teetime/framework/AbstractStageTest.java
with
2 additions
and
24 deletions
src/main/java/teetime/framework/AbstractStage.java
+
1
−
23
View file @
3c77564c
...
@@ -29,7 +29,6 @@ import org.slf4j.LoggerFactory;
...
@@ -29,7 +29,6 @@ import org.slf4j.LoggerFactory;
import
teetime.framework.exceptionHandling.AbstractExceptionListener
;
import
teetime.framework.exceptionHandling.AbstractExceptionListener
;
import
teetime.framework.exceptionHandling.AbstractExceptionListener.FurtherExecution
;
import
teetime.framework.exceptionHandling.AbstractExceptionListener.FurtherExecution
;
import
teetime.framework.exceptionHandling.TerminateException
;
import
teetime.framework.exceptionHandling.TerminateException
;
import
teetime.framework.pipe.IPipe
;
import
teetime.framework.signal.ISignal
;
import
teetime.framework.signal.ISignal
;
import
teetime.framework.signal.StartingSignal
;
import
teetime.framework.signal.StartingSignal
;
import
teetime.framework.signal.TerminatingSignal
;
import
teetime.framework.signal.TerminatingSignal
;
...
@@ -279,7 +278,7 @@ public abstract class AbstractStage {
...
@@ -279,7 +278,7 @@ public abstract class AbstractStage {
}
}
public
void
onValidating
(
final
List
<
InvalidPortConnection
>
invalidPortConnections
)
{
public
void
onValidating
(
final
List
<
InvalidPortConnection
>
invalidPortConnections
)
{
this
.
validateOutputPorts
(
invalidPortConnections
);
this
.
checkTypeCompliance
(
);
changeState
(
StageState
.
VALIDATED
);
changeState
(
StageState
.
VALIDATED
);
}
}
...
@@ -292,7 +291,6 @@ public abstract class AbstractStage {
...
@@ -292,7 +291,6 @@ public abstract class AbstractStage {
*/
*/
@SuppressWarnings
(
"PMD.SignatureDeclareThrowsException"
)
@SuppressWarnings
(
"PMD.SignatureDeclareThrowsException"
)
public
void
onStarting
()
throws
Exception
{
public
void
onStarting
()
throws
Exception
{
checkTypeCompliance
();
if
(
logger
.
isDebugEnabled
())
{
if
(
logger
.
isDebugEnabled
())
{
logger
.
debug
(
"Stage {} within thread {}"
,
getId
(),
getOwningThread
().
getId
());
logger
.
debug
(
"Stage {} within thread {}"
,
getId
(),
getOwningThread
().
getId
());
}
}
...
@@ -446,26 +444,6 @@ public abstract class AbstractStage {
...
@@ -446,26 +444,6 @@ public abstract class AbstractStage {
return
outputPort
;
return
outputPort
;
}
}
/**
* This should check, if the OutputPorts are connected correctly. This is needed to avoid NullPointerExceptions and other errors.
*
* @param invalidPortConnections
* <i>(Passed as parameter for performance reasons)</i>
*/
@SuppressWarnings
(
"PMD.DataflowAnomalyAnalysis"
)
public
void
validateOutputPorts
(
final
List
<
InvalidPortConnection
>
invalidPortConnections
)
{
for
(
OutputPort
<?>
outputPort
:
outputPorts
.
getOpenedPorts
())
{
final
IPipe
<?>
pipe
=
outputPort
.
getPipe
();
final
Class
<?>
sourcePortType
=
outputPort
.
getType
();
final
Class
<?>
targetPortType
=
pipe
.
getTargetPort
().
getType
();
if
(
null
==
sourcePortType
||
!
sourcePortType
.
equals
(
targetPortType
))
{
final
InvalidPortConnection
invalidPortConnection
=
new
InvalidPortConnection
(
outputPort
,
pipe
.
getTargetPort
());
invalidPortConnections
.
add
(
invalidPortConnection
);
}
}
}
protected
void
terminate
()
{
protected
void
terminate
()
{
changeState
(
StageState
.
TERMINATING
);
changeState
(
StageState
.
TERMINATING
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/test/java/teetime/framework/AbstractStageTest.java
+
1
−
1
View file @
3c77564c
...
@@ -95,7 +95,7 @@ public class AbstractStageTest {
...
@@ -95,7 +95,7 @@ public class AbstractStageTest {
@Test
@Test
public
void
testCheckTypeCompliance
()
throws
Exception
{
public
void
testCheckTypeCompliance
()
throws
Exception
{
new
Execution
<
Configuration
>(
new
TestConnectionsConfig
(
false
));
new
Execution
<
Configuration
>(
new
TestConnectionsConfig
(
false
)
,
true
);
}
}
private
class
TestConnectionsConfig
extends
Configuration
{
private
class
TestConnectionsConfig
extends
Configuration
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment