@ -11,9 +11,8 @@ import com.fr.plugin.observer.PluginEventListener;
import com.fr.report.ExtraReportClassManager ;
import com.fr.report.fun.ReportSupportedFileProvider ;
import java.util.ArrayList ;
import java.util.Arrays ;
import java.util.List ;
import java.util.LinkedHa shSe t ;
import java.util.Set ;
import java.util.concurrent.locks.ReadWriteLock ;
import java.util.concurrent.locks.ReentrantReadWriteLock ;
@ -23,7 +22,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
* /
public class FileNodeConstants {
private static Lis t< String > supportFileType ;
private static Se t< String > supportFileType ;
private static ReadWriteLock rwl = new ReentrantReadWriteLock ( ) ;
private FileNodeConstants ( ) {
@ -47,16 +46,14 @@ public class FileNodeConstants {
private static void addAppExtensions ( FileExtension [ ] extensions ) {
for ( int i = 0 , size = extensions . length ; i < size ; i + + ) {
if ( ! supportFileType . contains ( extensions [ i ] . getExtension ( ) ) ) {
supportFileType . add ( extensions [ i ] . getExtension ( ) ) ;
}
supportFileType . add ( extensions [ i ] . getExtension ( ) ) ;
}
}
private static void initSupportedTypes ( ) {
try {
rwl . writeLock ( ) . lock ( ) ;
supportFileType = new Array List< String > ( ) ;
supportFileType = new LinkedHa shSe t < > ( ) ;
//通过插件扩展的
Set < ReportSupportedFileProvider > providers = ExtraReportClassManager . getInstance ( ) . getArray ( ReportSupportedFileProvider . XML_TAG ) ;
for ( ReportSupportedFileProvider provider : providers ) {