Skip to content

Commit

Permalink
Revert "just fixing indentation"
Browse files Browse the repository at this point in the history
This reverts commit bc248fb.
  • Loading branch information
barspi committed Feb 23, 2023
1 parent 78df15c commit e01a156
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions jpos/src/main/java/org/jpos/iso/ISOMsg.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,32 +285,32 @@ public void set(String fpath, String value) {
* @param c component
* @throws ISOException on error
*/
public void set(String fpath, ISOComponent c) throws ISOException {
StringTokenizer st = new StringTokenizer (fpath, ".");
ISOMsg m = this;
for (;;) {
int fldno = parseInt(st.nextToken());
if (st.hasMoreTokens()) {
Object obj = m.getValue(fldno);
if (obj instanceof ISOMsg)
m = (ISOMsg) obj;
else
/*
* we need to go deeper, however, if the value == null then
* there is nothing to do (unset) at the lower levels, so break now and save some processing.
*/
if (c == null) {
break;
} else {
// We have a value to set, so adding a level to hold it is sensible.
m.set(m = new ISOMsg(fldno));
}
} else {
m.set(c);
break;
}
}
}
public void set (String fpath, ISOComponent c) throws ISOException {
StringTokenizer st = new StringTokenizer (fpath, ".");
ISOMsg m = this;
for (;;) {
int fldno = parseInt(st.nextToken());
if (st.hasMoreTokens()) {
Object obj = m.getValue(fldno);
if (obj instanceof ISOMsg)
m = (ISOMsg) obj;
else
/*
* we need to go deeper, however, if the value == null then
* there is nothing to do (unset) at the lower levels, so break now and save some processing.
*/
if (c == null) {
break;
} else {
// We have a value to set, so adding a level to hold it is sensible.
m.set (m = new ISOMsg (fldno));
}
} else {
m.set (c);
break;
}
}
}

/**
* Creates an ISOField associated with fldno within this ISOMsg.
Expand Down Expand Up @@ -520,7 +520,7 @@ public void dump (PrintStream p, String indent) {
((Loggeable) header).dump (p, newIndent);

for (int i : fields.keySet()) {
//If you want the bitmap dumped in the log, change the condition from (i >= 0) to (i >= -1).
//If you want the bitmap dumped in the log, change the condition from (i >= 0) to (i >= -1).
if (i >= 0) {
if ((c = (ISOComponent) fields.get(i)) != null)
c.dump(p, newIndent);
Expand Down

0 comments on commit e01a156

Please sign in to comment.