Streamlined use of org.apache.commons.io.IOUtils
This commit is contained in:
		
							parent
							
								
									fe716296ae
								
							
						
					
					
						commit
						cc543f79da
					
				
					 7 changed files with 12 additions and 12 deletions
				
			
		|  | @ -12,7 +12,7 @@ import java.io.IOException; | ||||||
| import java.io.InputStream; | import java.io.InputStream; | ||||||
| import java.io.OutputStream; | import java.io.OutputStream; | ||||||
| 
 | 
 | ||||||
| import org.apache.tomcat.util.http.fileupload.IOUtils; | import org.apache.commons.io.IOUtils; | ||||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||||
| import org.springframework.beans.factory.annotation.Value; | import org.springframework.beans.factory.annotation.Value; | ||||||
|  |  | ||||||
|  | @ -12,7 +12,7 @@ import java.io.IOException; | ||||||
| import java.io.InputStream; | import java.io.InputStream; | ||||||
| import java.io.OutputStream; | import java.io.OutputStream; | ||||||
| 
 | 
 | ||||||
| import org.apache.tomcat.util.http.fileupload.IOUtils; | import org.apache.commons.io.IOUtils; | ||||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||||
| import org.springframework.context.annotation.Lazy; | import org.springframework.context.annotation.Lazy; | ||||||
|  |  | ||||||
|  | @ -12,7 +12,7 @@ import java.io.IOException; | ||||||
| import java.io.InputStream; | import java.io.InputStream; | ||||||
| import java.io.OutputStream; | import java.io.OutputStream; | ||||||
| 
 | 
 | ||||||
| import org.apache.tomcat.util.http.fileupload.IOUtils; | import org.apache.commons.io.IOUtils; | ||||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||||
| import org.springframework.context.annotation.Lazy; | import org.springframework.context.annotation.Lazy; | ||||||
|  |  | ||||||
|  | @ -27,8 +27,7 @@ import javax.xml.parsers.ParserConfigurationException; | ||||||
| import javax.xml.parsers.SAXParser; | import javax.xml.parsers.SAXParser; | ||||||
| import javax.xml.parsers.SAXParserFactory; | import javax.xml.parsers.SAXParserFactory; | ||||||
| 
 | 
 | ||||||
| import ch.ethz.seb.sebserver.gbl.util.Cryptor; | import org.apache.commons.io.IOUtils; | ||||||
| import org.apache.tomcat.util.http.fileupload.IOUtils; |  | ||||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||||
| import org.springframework.context.annotation.Lazy; | import org.springframework.context.annotation.Lazy; | ||||||
|  | @ -41,6 +40,7 @@ import ch.ethz.seb.sebserver.gbl.async.AsyncServiceSpringConfig; | ||||||
| import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute; | import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute; | ||||||
| import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationValue; | import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationValue; | ||||||
| import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile; | import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile; | ||||||
|  | import ch.ethz.seb.sebserver.gbl.util.Cryptor; | ||||||
| import ch.ethz.seb.sebserver.gbl.util.Utils; | import ch.ethz.seb.sebserver.gbl.util.Utils; | ||||||
| import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ConfigurationAttributeDAO; | import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ConfigurationAttributeDAO; | ||||||
| import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ConfigurationDAO; | import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ConfigurationDAO; | ||||||
|  | @ -192,7 +192,7 @@ public class ExamConfigIO { | ||||||
|             // the SAX handler with a ConfigValue sink that saves the values to DB |             // the SAX handler with a ConfigValue sink that saves the values to DB | ||||||
|             // and a attribute-name/id mapping function with pre-created mapping |             // and a attribute-name/id mapping function with pre-created mapping | ||||||
|             final ExamConfigXMLParser examConfigImportHandler = new ExamConfigXMLParser( |             final ExamConfigXMLParser examConfigImportHandler = new ExamConfigXMLParser( | ||||||
|                     cryptor, |                     this.cryptor, | ||||||
|                     institutionId, |                     institutionId, | ||||||
|                     configurationId, |                     configurationId, | ||||||
|                     value -> this.configurationValueDAO |                     value -> this.configurationValueDAO | ||||||
|  |  | ||||||
|  | @ -16,7 +16,7 @@ import java.io.OutputStream; | ||||||
| import java.io.SequenceInputStream; | import java.io.SequenceInputStream; | ||||||
| import java.util.Set; | import java.util.Set; | ||||||
| 
 | 
 | ||||||
| import org.apache.tomcat.util.http.fileupload.IOUtils; | import org.apache.commons.io.IOUtils; | ||||||
| import org.cryptonode.jncryptor.AES256JNCryptorInputStream; | import org.cryptonode.jncryptor.AES256JNCryptorInputStream; | ||||||
| import org.cryptonode.jncryptor.AES256JNCryptorOutputStream; | import org.cryptonode.jncryptor.AES256JNCryptorOutputStream; | ||||||
| import org.cryptonode.jncryptor.CryptorException; | import org.cryptonode.jncryptor.CryptorException; | ||||||
|  |  | ||||||
|  | @ -14,7 +14,7 @@ import java.io.OutputStream; | ||||||
| import java.util.zip.GZIPInputStream; | import java.util.zip.GZIPInputStream; | ||||||
| import java.util.zip.GZIPOutputStream; | import java.util.zip.GZIPOutputStream; | ||||||
| 
 | 
 | ||||||
| import org.apache.tomcat.util.http.fileupload.IOUtils; | import org.apache.commons.io.IOUtils; | ||||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||||
| import org.springframework.context.annotation.Lazy; | import org.springframework.context.annotation.Lazy; | ||||||
|  |  | ||||||
|  | @ -17,8 +17,7 @@ import java.util.function.Function; | ||||||
| import javax.xml.parsers.SAXParser; | import javax.xml.parsers.SAXParser; | ||||||
| import javax.xml.parsers.SAXParserFactory; | import javax.xml.parsers.SAXParserFactory; | ||||||
| 
 | 
 | ||||||
| import ch.ethz.seb.sebserver.gbl.util.Cryptor; | import org.apache.commons.io.IOUtils; | ||||||
| import org.apache.tomcat.util.http.fileupload.IOUtils; |  | ||||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||||
| import org.springframework.context.annotation.Lazy; | import org.springframework.context.annotation.Lazy; | ||||||
|  | @ -28,6 +27,7 @@ import org.springframework.stereotype.Component; | ||||||
| import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute; | import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute; | ||||||
| import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationValue; | import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationValue; | ||||||
| import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile; | import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile; | ||||||
|  | import ch.ethz.seb.sebserver.gbl.util.Cryptor; | ||||||
| import ch.ethz.seb.sebserver.gbl.util.Utils; | import ch.ethz.seb.sebserver.gbl.util.Utils; | ||||||
| import ch.ethz.seb.sebserver.webservice.servicelayer.sebconfig.impl.ExamConfigXMLParser; | import ch.ethz.seb.sebserver.webservice.servicelayer.sebconfig.impl.ExamConfigXMLParser; | ||||||
| 
 | 
 | ||||||
|  | @ -40,7 +40,7 @@ public class XMLAttributeLoader { | ||||||
| 
 | 
 | ||||||
|     private final Cryptor cryptor; |     private final Cryptor cryptor; | ||||||
| 
 | 
 | ||||||
|     public XMLAttributeLoader(Cryptor cryptor) { |     public XMLAttributeLoader(final Cryptor cryptor) { | ||||||
|         this.cryptor = cryptor; |         this.cryptor = cryptor; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | @ -64,7 +64,7 @@ public class XMLAttributeLoader { | ||||||
|             final Collection<ConfigurationValue> values = new ArrayList<>(); |             final Collection<ConfigurationValue> values = new ArrayList<>(); | ||||||
| 
 | 
 | ||||||
|             final ExamConfigXMLParser examConfigImportHandler = new ExamConfigXMLParser( |             final ExamConfigXMLParser examConfigImportHandler = new ExamConfigXMLParser( | ||||||
|                     cryptor, |                     this.cryptor, | ||||||
|                     institutionId, |                     institutionId, | ||||||
|                     configurationId, |                     configurationId, | ||||||
|                     values::add, |                     values::add, | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 anhefti
						anhefti