Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frascati
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
114
Issues
114
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
frascati
frascati
Commits
e4778b8e
Commit
e4778b8e
authored
Jun 09, 2015
by
Lionel Seinturier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for last commit.
parent
54e5e183
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
tinfi/runtime/oo/src/main/java/org/ow2/frascati/tinfi/control/content/ContentClassMetaData.java
.../frascati/tinfi/control/content/ContentClassMetaData.java
+11
-10
tinfi/runtime/oo/src/main/java/org/ow2/frascati/tinfi/control/content/scope/AbstractScopeManager.java
...ati/tinfi/control/content/scope/AbstractScopeManager.java
+3
-3
No files found.
tinfi/runtime/oo/src/main/java/org/ow2/frascati/tinfi/control/content/ContentClassMetaData.java
View file @
e4778b8e
...
...
@@ -217,7 +217,7 @@ public class ContentClassMetaData {
"org.osoa.sca.annotations.EagerInit"
);
if
(
eagerinit
)
{
if
(
scope
==
null
||
!
scope
.
equals
(
"COMPOSITE"
)
)
{
String
msg
=
final
String
msg
=
"Class "
+
fcContentClass
+
" annotated with @EagerInit should be composite-scoped"
;
throw
new
IllegalContentClassMetaData
(
msg
);
...
...
@@ -251,7 +251,7 @@ public class ContentClassMetaData {
"org.osoa.sca.annotations.Constructor"
);
Constructor
<?>[]
ctors
=
Filters
.
filter
(
constructors
,
filter
);
if
(
ctors
.
length
>
1
)
{
String
msg
=
final
String
msg
=
"Only one constructor should be annotated with @Constructor"
;
throw
new
IllegalContentClassMetaData
(
msg
);
}
...
...
@@ -489,7 +489,8 @@ public class ContentClassMetaData {
}
}
String
msg
=
ao
.
toString
()+
" should be injectable with "
+
type
.
getName
();
final
String
msg
=
ao
.
toString
()+
" should be injectable with "
+
type
.
getName
();
throw
new
IllegalContentClassMetaData
(
msg
);
}
...
...
@@ -518,7 +519,7 @@ public class ContentClassMetaData {
if
(
!
method
.
getReturnType
().
equals
(
void
.
class
)
||
method
.
getParameterTypes
().
length
!=
0
)
{
String
str
=
Arrays
.
deepToString
(
names
);
String
msg
=
final
String
msg
=
"The signature of the @"
+
str
+
" annotated method ("
+
method
.
getName
()+
") should be ():void"
;
throw
new
IllegalContentClassMetaData
(
msg
);
...
...
@@ -555,7 +556,7 @@ public class ContentClassMetaData {
if
(
!
fcContentClass
.
isAssignableFrom
(
rtype
)
||
method
.
getParameterTypes
().
length
!=
0
)
{
String
str
=
Arrays
.
deepToString
(
names
);
String
msg
=
final
String
msg
=
"The signature of the @"
+
str
+
" annotated method ("
+
method
.
getName
()+
") should be ():"
+
fcContentClass
.
getName
();
throw
new
IllegalContentClassMetaData
(
msg
);
...
...
@@ -584,7 +585,7 @@ public class ContentClassMetaData {
if
(
methods
.
length
>
1
)
{
String
str
=
Arrays
.
deepToString
(
names
);
String
msg
=
final
String
msg
=
"More than one method annotated with @"
+
str
+
" in "
+
fcContentClass
.
getName
();
throw
new
IllegalContentClassMetaData
(
msg
);
...
...
@@ -606,19 +607,19 @@ public class ContentClassMetaData {
int
space
=
duration
.
indexOf
(
' '
);
if
(
space
==
-
1
)
{
String
msg
=
"No space in duration string: "
+
duration
;
final
String
msg
=
"No space in duration string: "
+
duration
;
throw
new
IllegalContentClassMetaData
(
msg
);
}
String
numberStr
=
duration
.
substring
(
0
,
space
);
int
number
=
Integer
.
parseInt
(
numberStr
);
if
(
number
<
0
)
{
String
msg
=
"Negative duration: "
+
duration
;
final
String
msg
=
"Negative duration: "
+
duration
;
throw
new
IllegalContentClassMetaData
(
msg
);
}
if
(
space
+
1
==
duration
.
length
()
)
{
String
msg
=
"No time unit in: "
+
duration
;
final
String
msg
=
"No time unit in: "
+
duration
;
throw
new
IllegalContentClassMetaData
(
msg
);
}
...
...
@@ -630,7 +631,7 @@ public class ContentClassMetaData {
else
if
(
unit
.
equals
(
"days"
)
)
{
l
*=
24
*
60
*
60
*
1000
;
}
else
if
(
unit
.
equals
(
"years"
)
)
{
l
*=
365
*
24
*
60
*
60
*
1000
;
}
else
{
String
msg
=
"Unsupported time unit in: "
+
duration
;
final
String
msg
=
"Unsupported time unit in: "
+
duration
;
throw
new
IllegalContentClassMetaData
(
msg
);
}
...
...
tinfi/runtime/oo/src/main/java/org/ow2/frascati/tinfi/control/content/scope/AbstractScopeManager.java
View file @
e4778b8e
...
...
@@ -50,7 +50,7 @@ import org.objectweb.fractal.julia.Interceptor;
import
org.objectweb.fractal.juliac.commons.ipf.InjectionPoint
;
import
org.objectweb.fractal.juliac.commons.ipf.InjectionPointFieldImpl
;
import
org.objectweb.fractal.juliac.commons.lang.annotation.AnnotationHelper
;
import
org.objectweb.fractal.juliac.commons.lang.reflect.
SetterMethodFilt
er
;
import
org.objectweb.fractal.juliac.commons.lang.reflect.
MethodHelp
er
;
import
org.ow2.frascati.tinfi.CallbackManager
;
import
org.ow2.frascati.tinfi.TinfiComponentOutInterface
;
import
org.ow2.frascati.tinfi.TinfiRuntimeException
;
...
...
@@ -380,13 +380,13 @@ public abstract class AbstractScopeManager implements ScopeManager {
InterfaceType
it
=
ct
.
getFcInterfaceType
(
name
);
// Should we test that this is a client interface?
Object
sr
=
getServiceReference
(
it
);
SetterMethodFilt
er
.
invokeSetter
(
content
,
setter
,
sr
);
MethodHelp
er
.
invokeSetter
(
content
,
setter
,
sr
);
}
catch
(
NoSuchInterfaceException
nsie
)
{
// Check whether this is a property
if
(
scapc
.
containsPropertyName
(
name
)
)
{
Object
value
=
scapc
.
getValue
(
name
);
SetterMethodFilt
er
.
invokeSetter
(
content
,
setter
,
value
);
MethodHelp
er
.
invokeSetter
(
content
,
setter
,
value
);
}
/*
* Else, this is neither a reference, nor a property. We do not
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment