Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
SnapArchivingApi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Tango controls archiving
SnapArchivingApi
Commits
c46aa7f9
Commit
c46aa7f9
authored
1 year ago
by
gwen-soleil
Browse files
Options
Downloads
Patches
Plain Diff
Fix conversion for short values.
parent
1e4bc4c0
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/fr/soleil/archiving/snap/api/tools/TangoJAVAUtils.java
+147
-148
147 additions, 148 deletions
...va/fr/soleil/archiving/snap/api/tools/TangoJAVAUtils.java
with
147 additions
and
148 deletions
src/main/java/fr/soleil/archiving/snap/api/tools/TangoJAVAUtils.java
+
147
−
148
View file @
c46aa7f9
package
fr.soleil.archiving.snap.api.tools
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
fr.esrf.TangoDs.TangoConst
;
import
fr.soleil.archiving.common.api.tools.StringFormater
;
import
fr.soleil.lib.project.math.MathConst
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
public
class
TangoJAVAUtils
{
public
static
Object
initPrimitiveArray
(
int
dataType
,
int
length
)
{
...
...
@@ -114,21 +114,20 @@ public class TangoJAVAUtils {
return
resultSet
.
getString
(
index
);
case
TangoConst
.
Tango_DEV_UCHAR
:
case
TangoConst
.
Tango_DEV_CHAR
:
return
Byte
.
valueOf
(
resultSet
.
get
Byte
(
index
)
)
;
return
resultSet
.
get
Short
(
index
);
case
TangoConst
.
Tango_DEV_LONG
:
case
TangoConst
.
Tango_DEV_ULONG
:
case
TangoConst
.
Tango_DEV_STATE
:
return
Integer
.
valueOf
(
resultSet
.
getInt
(
index
));
case
TangoConst
.
Tango_DEV_BOOLEAN
:
return
Boolean
.
valueOf
(
resultSet
.
getInt
(
index
)
!=
0
);
case
TangoConst
.
Tango_DEV_SHORT
:
case
TangoConst
.
Tango_DEV_USHORT
:
return
Short
.
valueOf
(
resultSet
.
getShort
(
index
));
return
resultSet
.
getInt
(
index
);
case
TangoConst
.
Tango_DEV_BOOLEAN
:
return
resultSet
.
getInt
(
index
)
!=
0
;
case
TangoConst
.
Tango_DEV_FLOAT
:
return
Float
.
valueOf
(
resultSet
.
getFloat
(
index
)
)
;
return
resultSet
.
getFloat
(
index
);
case
TangoConst
.
Tango_DEV_DOUBLE
:
default
:
return
Double
.
valueOf
(
resultSet
.
getDouble
(
index
)
)
;
return
resultSet
.
getDouble
(
index
);
}
}
...
...
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