Svatopluk Dedic created NETBEANS-5720: -----------------------------------------
Summary: Unify filename checks to use FileUtil.findFreeFileName or .isValidFileName Key: NETBEANS-5720 URL: https://issues.apache.org/jira/browse/NETBEANS-5720 Project: NetBeans Issue Type: Bug Components: ide - UI, javaee - JSF, javafx - Project, projects - Maven, serverplugins - GlassFish, serverplugins - Sun Appserver 9, web - HTML Project Reporter: Svatopluk Dedic Assignee: Svatopluk Dedic Multple definitions of invalid filenames are scattered throughout the codebase. Should be unified. Sample list (perhaps not exhaustive): {code:java} enterprise/web.jsf/src/org/netbeans/modules/web/jsf/wizards/CompositeComponentWizardPanel.java: if ("".equals(filename) || INVALID_FILENAME_CHARACTERS.matcher(filename).find()) { enterprise/weblogic.common/src/org/netbeans/modules/weblogic/common/api/DomainConfiguration.java: private static final Pattern FILE_NAME_PATTERN = enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/db/VendorNameMgr.java: private final static char [] ILLEGAL_FILENAME_CHARS = {'/', '\\', ':', '*', '?', '"', '<', '>', '|', ',', '=', ';' }; enterprise/j2ee.sun.appsrv/src/org/netbeans/modules/j2ee/sun/api/restricted/ResourceConfigurator.java: private final static char[] ILLEGAL_FILENAME_CHARS = {'/', '\\', ':', '*', '?', '"', '<', '>', '|', ',', '=', ';' }; enterprise/j2ee.sun.appsrv/src/org/netbeans/modules/j2ee/sun/api/restricted/ResourceUtils.java: private final static char[] ILLEGAL_FILENAME_CHARS = {'/', '\\', ':', '*', '?', '"', '<', '>', '|', ',' }; ide/target.iterator/src/org/netbeans/modules/target/iterator/api/TargetChooserPanel.java: private static final Pattern INVALID_FILENAME_CHARACTERS = java/maven/src/org/netbeans/modules/maven/actions/CreateLibraryPanel.java:// StringValidators.REQUIRE_VALID_FILENAME, javafx/javafx2.project/src/org/netbeans/modules/javafx2/project/fxml/FXMLTemplateWizardIterator.java: static final char[] NO_FILENAME_CHARS = { '/', '<', '>', '\\', '|', '\"', '\n', '\r', '\t', '\0', '\f', '`', '?', '*', ':' }; //NOI18N webcommon/web.clientproject.api/src/org/netbeans/modules/web/clientproject/api/util/ValidationUtilities.java: private static final char[] INVALID_FILENAME_CHARS = new char[] {'/', '\\', '|', ':', '*', '?', '"', '<', '>'}; // NOI18N {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists