File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
main/java/org/metafacture/biblio/iso2709
test/java/org/metafacture/biblio/iso2709 Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ public void setSystemChars(final char[] systemChars) {
122122 }
123123
124124 public void setSystemChar (final int index , final char value ) {
125- Require .that (0 <= index && index < IMPL_CODES_LENGTH );
125+ Require .that (0 <= index && index < SYSTEM_CHARS_LENGTH );
126126 Require .that (value < Iso646Constants .MAX_CHAR_CODE );
127127 label .setSystemChar (index , value );
128128 }
Original file line number Diff line number Diff line change @@ -183,6 +183,11 @@ public void shouldThrowExceptionIfSystemCharsIsNull() {
183183 builder .setSystemChars (null ); // Exception expected
184184 }
185185
186+ @ Test (expected = IllegalArgumentException .class )
187+ public void shouldThrowExceptionIfSystemCharIndexGreaterThan2 () {
188+ builder .setSystemChar (3 , '1' );
189+ }
190+
186191 @ Test
187192 public void shouldWriteReserverdCharToRecordLabel () {
188193 builder .setReservedChar ('R' );
You can’t perform that action at this time.
0 commit comments