Skip to content

Commit 5e79228

Browse files
authored
Merge pull request #98 from epics-base/release/7.0
Release/7.0
2 parents 2c40370 + 820efdd commit 5e79228

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

pvAccessJava/src/org/epics/ca/BaseV3ChannelStructure.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,10 @@ public PVStructure createPVStructure(PVStructure pvRequest,boolean propertiesAll
227227
nativeDBRType = DBRType.STRING;
228228
}
229229
}
230-
String[] propertyNames = new String[propertyList.size()];
231-
for(int i=0; i<propertyNames.length; i++) propertyNames[i] = propertyList.get(i);
230+
232231
DBRProperty dbrProperty = DBRProperty.none;
233-
if(propertyNames.length>0) {
234-
for(String propertyName : propertyNames) {
232+
if(propertyList.size()>0) {
233+
for(String propertyName : propertyList) {
235234
if(propertyName.equals("alarm")&& (dbrProperty.compareTo(DBRProperty.status)<0)) {
236235
dbrProperty = DBRProperty.status;
237236
continue;
@@ -958,15 +957,18 @@ public void toStructure(DBR fromDBR) {
958957
String message = status.getName();
959958
setAlarm(statusMap.get(status),alarmSeverity,message);
960959
}
961-
if(displayLow<displayHigh) {
960+
if(units!=null) {
962961
pvStructure = this.pvStructure.getStructureField("display");
963962
if(pvStructure!=null) {
964-
if(units!=null) {
965963
PVString pvUnits = pvStructure.getStringField("units");
966964
if(pvUnits!=null) {
967965
pvUnits.put(units.toString());
968966
}
969967
}
968+
}
969+
if(displayLow<displayHigh) {
970+
pvStructure = this.pvStructure.getStructureField("display");
971+
if(pvStructure!=null) {
970972
PVDouble pvLow = pvStructure.getDoubleField("limitLow");
971973
PVDouble pvHigh = pvStructure.getDoubleField("limitHigh");
972974
if(pvLow!=null && pvHigh!=null) {

0 commit comments

Comments
 (0)