Project

General

Profile

« Previous | Next » 

Revision 886ba3e2

Added by Andreas Müller about 5 years ago

ref #3767 ref #3572 some more tests for DOI parsing

View differences:

cdmlib-commons/src/main/java/eu/etaxonomy/cdm/common/DOI.java
77 77

  
78 78

  
79 79
// ******************************* CONSTRUCTOR ************************************/
80
	private DOI(){}; //empty constructor required for JAXB
80
	private DOI(){} //empty constructor required for JAXB
81 81

  
82 82

  
83 83
    /**
......
174 174
		}
175 175
		//suffix
176 176
		String suffix = doi.replaceFirst(registrant + sep,"");
177
		if (suffix.equals("")){
178
            String message = "Suffix must not be empty";
179
            throw new IllegalArgumentException(message);
180
        }
177 181
		if (! suffix.matches("\\p{Print}+")){
178 182
			String message = "Suffix should only include printable characters";
179 183
			throw new IllegalArgumentException(message);

Also available in: Unified diff