@Test public void testNormalize() { assertEquals(System.getProperty("user.dir") + File.separator+ "n", new WorkdirPrefixer().normalize("n")); }
public String normalize(final String name) { if(StringUtils.equals(name, ".")) { return finder.find().getAbsolute(); } if(StringUtils.equals(name, "..")) { return finder.find().getParent().getAbsolute(); } if(!this.isAbsolute(name)) { return String.format("%s%s%s", finder.find().getAbsolute(), PreferencesFactory.get().getProperty("local.delimiter"), name); } return name; }
WorkdirPrefixer { public String normalize(final String name) { if(StringUtils.equals(name, ".")) { return finder.find().getAbsolute(); } if(StringUtils.equals(name, "..")) { return finder.find().getParent().getAbsolute(); } if(!this.isAbsolute(name)) { return String.format("%s%s%s", finder.find().getAbsolute(), PreferencesFactory.get().getProperty("local.delimiter"), name); } return name; } }
WorkdirPrefixer { public String normalize(final String name) { if(StringUtils.equals(name, ".")) { return finder.find().getAbsolute(); } if(StringUtils.equals(name, "..")) { return finder.find().getParent().getAbsolute(); } if(!this.isAbsolute(name)) { return String.format("%s%s%s", finder.find().getAbsolute(), PreferencesFactory.get().getProperty("local.delimiter"), name); } return name; }  }
WorkdirPrefixer { public String normalize(final String name) { if(StringUtils.equals(name, ".")) { return finder.find().getAbsolute(); } if(StringUtils.equals(name, "..")) { return finder.find().getParent().getAbsolute(); } if(!this.isAbsolute(name)) { return String.format("%s%s%s", finder.find().getAbsolute(), PreferencesFactory.get().getProperty("local.delimiter"), name); } return name; }  String normalize(final String name); }
WorkdirPrefixer { public String normalize(final String name) { if(StringUtils.equals(name, ".")) { return finder.find().getAbsolute(); } if(StringUtils.equals(name, "..")) { return finder.find().getParent().getAbsolute(); } if(!this.isAbsolute(name)) { return String.format("%s%s%s", finder.find().getAbsolute(), PreferencesFactory.get().getProperty("local.delimiter"), name); } return name; }  String normalize(final String name);  }