Java 8 InvalidPropertiesFormatException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 InvalidPropertiesFormatException class.

This code example shows how to use the following methods:getCause
    /** 
     * @tests {@link java.util.InvalidPropertiesFormatException#InvalidPropertiesFormatException(Throwable)} 
     */ 
    public void test_Constructor_Ljava_lang_Throwable() { 
        Throwable throwable = new Throwable();
        InvalidPropertiesFormatException exception = new InvalidPropertiesFormatException(
                throwable);
        assertEquals("the casue did not equals argument passed in constructor",
                throwable, exception.getCause());
    } 
 
} 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getCause
    /** 
     * @tests {@link java.util.InvalidPropertiesFormatException#InvalidPropertiesFormatException(Throwable)} 
     */ 
    public void test_Constructor_Ljava_lang_Throwable() { 
        Throwable throwable = new Throwable();
        InvalidPropertiesFormatException exception = new InvalidPropertiesFormatException(
                throwable);
        assertEquals("the casue did not equals argument passed in constructor",
                throwable, exception.getCause());
    } 
 
} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
    /** 
     * java.util.InvalidPropertiesFormatException#SerializationTest() 
     */ 
    public void test_Serialization() throws Exception { 
        InvalidPropertiesFormatException ipfe = new InvalidPropertiesFormatException( 
                "Hey, this is InvalidPropertiesFormatException"); 
        try { 
            SerializationTest.verifySelf(ipfe); 
        } catch (NotSerializableException e) { 
            // expected 
        } 
    } 
 
} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
    @Test
    public void testMatchPath() { 
	// create random exceptions, nest them and check if the path matches 
	Throwable root = new NullPointerException();
	Throwable ex = new InvalidAlgorithmParameterException(root);
	ex = new InvalidPropertiesFormatException(ex);
	NullPointerException result = ExceptionUtils.matchPath(ex, NullPointerException.class,
		InvalidAlgorithmParameterException.class);
	Assert.assertNotNull(result);
	Assert.assertEquals(result, root);
    } 
 
} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
	private final static File getAutoCompClientDir(File autoCompPropFile)
			throws InvalidPropertiesFormatException { 
		String name = autoCompPropFile.getName();
		if (name.length() <= 4 || !name.endsWith(".xml"))
			throw new InvalidPropertiesFormatException(
					"File is not an XML file: " 
							+ autoCompPropFile.getAbsolutePath());
		return new File(autoCompPropFile.getParent(), name.substring(0,
				name.length() - 4));
	} 
 
	public AutoCompletionItem(Config config, File autoCompPropFile)
			throws SearchLibException, InvalidPropertiesFormatException, 
			IOException { 
		this.config = config;
		this.propFields = new TreeSet<String>();
		this.propFile = autoCompPropFile;
		this.autoCompClientDir = getAutoCompClientDir(autoCompPropFile);
		Properties properties = PropertiesUtils.loadFromXml(propFile);
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
			try { 
				newProperties = new Properties();
				newProperties.loadFromXML(in);
				properties = newProperties;
			} catch (InvalidPropertiesFormatException e) {
				e.printStackTrace();
			} catch (IOException e) {
				e.printStackTrace();
			} finally { 
				try { 
					in.close();
				} catch (IOException e) {
					throw new RuntimeException("Not able to create the Visio Stencil Set to BPMN mapping properties.",
							e);
				} 
			} 
		} 
	} 
 
	public String getStencilIdForName(String name) {
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
			in = ClassLoader.getSystemResourceAsStream("conf/pig.properties");
			 
			PROP.load(in);
		} catch (InvalidPropertiesFormatException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} finally { 
			if (in != null) {
				try { 
					in.close();
				} catch (IOException e) {
					// TODO Auto-generated catch block 
					e.printStackTrace();
				} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:toString
            System.err.println("Could not read testing properties from file \"" + path
                               + "\" due to invalid Unicode escape sequence; " + e.toString());
        } 
        catch (InvalidPropertiesFormatException e)
        { 
            System.err.println("Testing properties in file \"" + path + "\" are invalid: " + e.toString());
        } 
        catch (IOException e)
        { 
            System.err.println("Could not read testing properties from file \"" + path + "\"; " + e.toString());
        } 
        catch (Exception e)
        { 
            System.err.println("Unexpected error reading testing properties from file \"" + path + "\": ");
            e.printStackTrace();
        } 
    } 
 
    /** 
     * Creates a new rule with a set of required properties. 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
urlProp = new Properties();
		try { 
			urlProp.load(new FileInputStream(ConfigUtil.defaultTomcatCommonConfigPath() + "url.properties"));
		} catch (InvalidPropertiesFormatException e) {
			e.printStackTrace();
			urlProp = null;
		} catch (IOException e) {
			e.printStackTrace();
			urlProp = null;
		} 
		return urlProp;
	} 
    /** 
     * 得到某个URL 
     * @param name			配置名 
     * @return 
     */ 
    public static String getUrl(String name){
    	Properties prpo = getUrlProp();
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
		InputStream input = Configuration.class.getResourceAsStream(FILE_NAME);
		if(input != null){
			try { 
				props.loadFromXML(input);
			} catch (InvalidPropertiesFormatException e) {
				e.printStackTrace();
			} catch (IOException e) {
				e.printStackTrace();
			} 
		} 
	} 
	 
	/** 
	 * 获取扩展字典配置路径 
	 * @return List<String> 相对类加载器的路径 
	 */ 
	public static List<String> getExtDictionarys(){
		List<String> extDictFiles = new ArrayList<String>(2);
		String extDictCfg = CFG.props.getProperty(EXT_DICT);
		if(extDictCfg != null){
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Java 8 InvalidPropertiesFormatException Methods: