Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ITS - Intelligent Transport Systems
ITS
Commits
e16da27a
Commit
e16da27a
authored
Aug 24, 2016
by
garciay
Browse files
Wrong code merging between TCT3 & TTWB Codec code
parent
0d9a4cde
Changes
2
Hide whitespace changes
Inline
Side-by-side
javasrc/codec/org/etsi/codec/ITciCDWrapper.java
View file @
e16da27a
...
...
@@ -138,9 +138,5 @@ public interface ITciCDWrapper {
*/
public
Type
getTypeForName
(
final
String
type
);
void
logDebug
(
String
debugMessage
);
void
logError
(
String
errorMessage
);
// FIXME To be continued
}
// End of interface ITciCDWrapper
javasrc/codec/org/etsi/ttcn/codec/CodecFactory.java
View file @
e16da27a
...
...
@@ -9,9 +9,9 @@ import java.lang.reflect.Constructor;
import
java.util.Map
;
import
java.util.TreeMap
;
import
org.etsi.adapter.TERFactory
;
import
org.etsi.ttcn.tci.TciCDProvided
;
import
org.etsi.ttcn.tci.TciTypeClass
;
import
org.etsi.codec.TciCDWrapperFactory
;
import
org.etsi.ttcn.codec.generic.Bitstring
;
import
org.etsi.ttcn.codec.generic.Boolean
;
import
org.etsi.ttcn.codec.generic.Charstring
;
...
...
@@ -77,11 +77,11 @@ public class CodecFactory {
return
null
;
}
//
TciCDWrapper
.getInstance().logDebug("getExternalCodec: Search external codec for " + encoding);
//TERFactory
.getInstance().logDebug("getExternalCodec: Search external codec for " + encoding);
codec
=
externalCodecs
.
get
(
encoding
);
if
(
codec
!=
null
)
{
TciCDWrapper
Factory
.
get
TciCD
Instance
().
logDebug
(
String
.
format
(
"%50s"
,
encoding
));
TciCDWrapper
Factory
.
get
TciCD
Instance
().
logDebug
(
" ==> "
+
codec
.
getClass
().
getName
());
TER
Factory
.
getInstance
().
logDebug
(
String
.
format
(
"%50s"
,
encoding
));
TER
Factory
.
getInstance
().
logDebug
(
" ==> "
+
codec
.
getClass
().
getName
());
return
codec
;
}
return
null
;
...
...
@@ -89,11 +89,11 @@ public class CodecFactory {
public
ICodec
getCodec
(
MainCodec
mainCodec
,
int
classType
,
String
encoding
,
String
typeName
)
{
TciCDWrapper
Factory
.
get
TciCD
Instance
().
logDebug
(
String
.
format
(
"%50s"
,
typeName
+
"("
+
encoding
+
")"
));
TER
Factory
.
getInstance
().
logDebug
(
String
.
format
(
"%50s"
,
typeName
+
"("
+
encoding
+
")"
));
Class
<?
extends
ICodec
>
cls
=
null
;
Class
<?>[]
ctorParams
=
{
MainCodec
.
class
};
T
ciCDWrapper
Factory
.
get
TciCD
Instance
().
logDebug
(
"getCodec: Search internal codec for "
+
classType
+
'/'
+
encoding
+
'/'
+
typeName
);
T
ER
Factory
.
getInstance
().
logDebug
(
"getCodec: Search internal codec for "
+
classType
+
'/'
+
encoding
+
'/'
+
typeName
);
cls
=
codecs
.
get
(
classType
+
'/'
+
encoding
+
'/'
+
typeName
);
if
(
cls
==
null
)
{
cls
=
codecs
.
get
(
classType
+
'/'
+
encoding
+
'/'
);
...
...
@@ -103,7 +103,7 @@ public class CodecFactory {
}
if
(
cls
!=
null
)
{
TciCDWrapper
Factory
.
get
TciCD
Instance
().
logDebug
(
" ==> "
+
cls
.
getName
());
TER
Factory
.
getInstance
().
logDebug
(
" ==> "
+
cls
.
getName
());
try
{
Constructor
<?
extends
ICodec
>
ctor
=
cls
.
getConstructor
(
ctorParams
);
return
ctor
.
newInstance
(
mainCodec
);
...
...
@@ -113,12 +113,12 @@ public class CodecFactory {
}
}
T
ciCDWrapper
Factory
.
get
TciCD
Instance
().
logDebug
(
" ==> No codec found !"
);
T
ER
Factory
.
getInstance
().
logDebug
(
" ==> No codec found !"
);
return
new
Dummy
(
mainCodec
);
}
public
void
setCodec
(
int
classType
,
String
encoding
,
String
typeName
,
Class
<?
extends
ICodec
>
codec
)
{
//
TciCDWrapper
.getInstance().logDebug("setCodec: add " + classType + "/" + encoding + "/" + typeName + "/" + codec);
//TERFactory
.getInstance().logDebug("setCodec: add " + classType + "/" + encoding + "/" + typeName + "/" + codec);
codecs
.
put
(
classType
+
'/'
+
encoding
+
'/'
+
typeName
,
codec
);
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment